Scippy

SCIP

Solving Constraint Integer Programs

stptest_extreduce.c File Reference

Detailed Description

tests for Steiner tree extended reductions

Author
Daniel Rehfeldt

This file implements tests for Steiner problem extended reductions.

A list of all interface methods can be found in stptest.h.

Definition in file stptest_extreduce.c.

#include <stdio.h>
#include <assert.h>
#include "stptest.h"
#include "portab.h"
#include "graph.h"
#include "reduce.h"
#include "extreduce.h"

Go to the source code of this file.

Macros

#define STPTEST_EXT_MAXNCLOSENODES   64
 

Functions

static SCIP_RETCODE extCheckArc (SCIP *scip, GRAPH *graph, REDCOST *redcostdata, STP_Bool *edgedeleted, int edge, int edgedelete, int nclosenodes, SCIP_Bool *deletable, SCIP_Bool equality)
 
static SCIP_RETCODE extCheckEdge (SCIP *scip, GRAPH *graph, REDCOST *redcostdata, STP_Bool *edgedeleted, int edge, SCIP_Bool *deletable, SCIP_Bool allowEquality)
 
static SCIP_RETCODE extCheckNode (SCIP *scip, GRAPH *graph, REDCOST *redcostdata, STP_Bool *edgedeleted, int node, SCIP_Bool *deletable, SCIP_Bool allowEquality)
 
static SCIP_RETCODE extDeleteNodes (SCIP *scip, GRAPH *graph, REDCOST *redcostdata, SCIP_Bool allowEquality)
 
static void extInitRedCostArrays (const GRAPH *graph, REDCOST *redcostdata)
 
static void extInitRedCostArraysPc (const GRAPH *graph, REDCOST *redcostdata)
 
static SCIP_RETCODE testEdgeDeletion5_deprecated (SCIP *scip, int variant)
 
static SCIP_RETCODE testEdgeDeletion4_deprecated (SCIP *scip, int variant)
 
static SCIP_RETCODE testEdgeDeletion3_deprecated (SCIP *scip, int variant)
 
static SCIP_RETCODE testEdgeDeletion2_deprecated (SCIP *scip, int variant)
 
static SCIP_RETCODE testEdgeDeletion1_deprecated (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedByCommonRedCostsTargets (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedByMultiRedCosts (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedByMst1 (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedByMst2 (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedByEqBottleneck (SCIP *scip)
 
static SCIP_RETCODE testEdgeNotDeleted1 (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedByEqBottleneck2 (SCIP *scip)
 
static SCIP_RETCODE testEdgeDeletedBy3LeafSpg (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedByRedCosts1 (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedByContraction (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedBySdBiasedSimple (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedBySdBiased (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedBySd1 (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedBySd2 (SCIP *scip)
 
static SCIP_RETCODE testNode3PseudoDeletedBySd3 (SCIP *scip)
 
static SCIP_RETCODE testNode4PseudoDeletedBySd1 (SCIP *scip)
 
static SCIP_RETCODE testNode4PseudoNotDeletedBySd1 (SCIP *scip)
 
static SCIP_RETCODE testGeneralStarDeletedEdge1 (SCIP *scip)
 
static SCIP_RETCODE testGeneralStarDeletedEdge2 (SCIP *scip)
 
static SCIP_RETCODE testGeneralStarDeletedEdge3 (SCIP *scip)
 
static SCIP_RETCODE testPcEdgeDeletedByMst1 (SCIP *scip)
 
static SCIP_RETCODE testPcEdgeNotDeleted (SCIP *scip)
 
static SCIP_RETCODE testPcNode3PseudoDeletedBySd1 (SCIP *scip)
 
static SCIP_RETCODE testPcNode4PseudoDeletedBySd1 (SCIP *scip)
 
static SCIP_RETCODE testPathReplaceDeletesEdge (SCIP *scip)
 
static SCIP_RETCODE testPathReplaceDeletesEdge2 (SCIP *scip)
 
void stptest_extreduceTearDown (SCIP *scip, GRAPH *graph, REDCOST **redcostdata)
 
SCIP_RETCODE stptest_extreduce (SCIP *scip)
 

Macro Definition Documentation

◆ STPTEST_EXT_MAXNCLOSENODES

#define STPTEST_EXT_MAXNCLOSENODES   64

Function Documentation

◆ extCheckArc()

static SCIP_RETCODE extCheckArc ( SCIP scip,
GRAPH graph,
REDCOST redcostdata,
STP_Bool edgedeleted,
int  edge,
int  edgedelete,
int  nclosenodes,
SCIP_Bool deletable,
SCIP_Bool  equality 
)
static

base method for extended edge reduction tests

Parameters
scipSCIP data structure
graphthe graph
redcostdatareduced cost data
edgedeletedmarks for each edge whether deleted
edgethe edge/arc to check
edgedeletedelete the edge if possible?
nclosenodesmax. number of close nodes to each node
deletableis the edge deletable?
equalityallow equality for checks

Definition at line 42 of file stptest_extreduce.c.

References extension_data_permanent::distdata_default, extred_full, extreduce_checkArc(), extreduce_distDataFree(), extreduce_distDataInit(), extreduce_edgeRemove(), extreduce_extPermaFree(), extreduce_extPermaInit(), FALSE, graph_free_dcsr(), graph_init_dcsr(), graph_isMarked(), extension_data_permanent::redcostEqualAllow, SCIP_CALL, and SCIP_OKAY.

Referenced by testEdgeDeletion1_deprecated(), testEdgeDeletion2_deprecated(), testEdgeDeletion3_deprecated(), testEdgeDeletion4_deprecated(), and testEdgeDeletion5_deprecated().

◆ extCheckEdge()

static SCIP_RETCODE extCheckEdge ( SCIP scip,
GRAPH graph,
REDCOST redcostdata,
STP_Bool edgedeleted,
int  edge,
SCIP_Bool deletable,
SCIP_Bool  allowEquality 
)
static

◆ extCheckNode()

static SCIP_RETCODE extCheckNode ( SCIP scip,
GRAPH graph,
REDCOST redcostdata,
STP_Bool edgedeleted,
int  node,
SCIP_Bool deletable,
SCIP_Bool  allowEquality 
)
static

◆ extDeleteNodes()

static SCIP_RETCODE extDeleteNodes ( SCIP scip,
GRAPH graph,
REDCOST redcostdata,
SCIP_Bool  allowEquality 
)
static

◆ extInitRedCostArrays()

◆ extInitRedCostArraysPc()

static void extInitRedCostArraysPc ( const GRAPH graph,
REDCOST redcostdata 
)
static

initializes to default for PC

Parameters
graphthe graph
redcostdatareduced costs data

Definition at line 226 of file stptest_extreduce.c.

References extInitRedCostArrays(), graph_pc_isPc(), GRAPH::knots, nnodes, and redcosts_getNodeToTermsBasesTop().

Referenced by testPcEdgeDeletedByMst1(), testPcEdgeNotDeleted(), testPcNode3PseudoDeletedBySd1(), and testPcNode4PseudoDeletedBySd1().

◆ testEdgeDeletion5_deprecated()

◆ testEdgeDeletion4_deprecated()

◆ testEdgeDeletion3_deprecated()

◆ testEdgeDeletion2_deprecated()

◆ testEdgeDeletion1_deprecated()

◆ testEdgeDeletedByCommonRedCostsTargets()

static SCIP_RETCODE testEdgeDeletedByCommonRedCostsTargets ( SCIP scip)
static

◆ testEdgeDeletedByMultiRedCosts()

◆ testEdgeDeletedByMst1()

static SCIP_RETCODE testEdgeDeletedByMst1 ( SCIP scip)
static

◆ testEdgeDeletedByMst2()

static SCIP_RETCODE testEdgeDeletedByMst2 ( SCIP scip)
static

◆ testEdgeDeletedByEqBottleneck()

static SCIP_RETCODE testEdgeDeletedByEqBottleneck ( SCIP scip)
static

◆ testEdgeNotDeleted1()

static SCIP_RETCODE testEdgeNotDeleted1 ( SCIP scip)
static

◆ testEdgeDeletedByEqBottleneck2()

static SCIP_RETCODE testEdgeDeletedByEqBottleneck2 ( SCIP scip)
static

◆ testEdgeDeletedBy3LeafSpg()

static SCIP_RETCODE testEdgeDeletedBy3LeafSpg ( SCIP scip)
static

◆ testNode3PseudoDeletedByRedCosts1()

static SCIP_RETCODE testNode3PseudoDeletedByRedCosts1 ( SCIP scip)
static

◆ testNode3PseudoDeletedByContraction()

static SCIP_RETCODE testNode3PseudoDeletedByContraction ( SCIP scip)
static

◆ testNode3PseudoDeletedBySdBiasedSimple()

◆ testNode3PseudoDeletedBySdBiased()

static SCIP_RETCODE testNode3PseudoDeletedBySdBiased ( SCIP scip)
static

◆ testNode3PseudoDeletedBySd1()

static SCIP_RETCODE testNode3PseudoDeletedBySd1 ( SCIP scip)
static

◆ testNode3PseudoDeletedBySd2()

static SCIP_RETCODE testNode3PseudoDeletedBySd2 ( SCIP scip)
static

◆ testNode3PseudoDeletedBySd3()

static SCIP_RETCODE testNode3PseudoDeletedBySd3 ( SCIP scip)
static

◆ testNode4PseudoDeletedBySd1()

static SCIP_RETCODE testNode4PseudoDeletedBySd1 ( SCIP scip)
static

◆ testNode4PseudoNotDeletedBySd1()

static SCIP_RETCODE testNode4PseudoNotDeletedBySd1 ( SCIP scip)
static

◆ testGeneralStarDeletedEdge1()

static SCIP_RETCODE testGeneralStarDeletedEdge1 ( SCIP scip)
static

◆ testGeneralStarDeletedEdge2()

static SCIP_RETCODE testGeneralStarDeletedEdge2 ( SCIP scip)
static

◆ testGeneralStarDeletedEdge3()

static SCIP_RETCODE testGeneralStarDeletedEdge3 ( SCIP scip)
static

◆ testPcEdgeDeletedByMst1()

static SCIP_RETCODE testPcEdgeDeletedByMst1 ( SCIP scip)
static

◆ testPcEdgeNotDeleted()

static SCIP_RETCODE testPcEdgeNotDeleted ( SCIP scip)
static

◆ testPcNode3PseudoDeletedBySd1()

◆ testPcNode4PseudoDeletedBySd1()

◆ testPathReplaceDeletesEdge()

static SCIP_RETCODE testPathReplaceDeletesEdge ( SCIP scip)
static

tests that path replacement deletes an edge

Parameters
scipSCIP data structure

Definition at line 2232 of file stptest_extreduce.c.

References graph_edge_addBi(), graph_edge_isDeleted(), graph_init(), graph_knot_add(), nnodes, reduce_pathreplace(), SCIP_CALL, SCIP_OKAY, GRAPH::source, STP_TERM, STP_TERM_NONE, STPTEST_ASSERT_MSG, stptest_graphSetUp(), and stptest_graphTearDown().

Referenced by stptest_extreduce().

◆ testPathReplaceDeletesEdge2()

static SCIP_RETCODE testPathReplaceDeletesEdge2 ( SCIP scip)
static

tests that path replacement deletes an edge

Parameters
scipSCIP data structure

Definition at line 2287 of file stptest_extreduce.c.

References graph_edge_addBi(), graph_edge_isDeleted(), graph_init(), graph_knot_add(), nnodes, reduce_pathreplace(), SCIP_CALL, SCIP_OKAY, GRAPH::source, STP_TERM, STP_TERM_NONE, STPTEST_ASSERT_MSG, stptest_graphSetUp(), and stptest_graphTearDown().

Referenced by stptest_extreduce().

◆ stptest_extreduceTearDown()

◆ stptest_extreduce()