reduce_sepa.c
Go to the documentation of this file.
21 * It contains rather simple test with articulation points, and more involved ones with terminal-separators.
27 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
166 printf(" belowterms=%d, belownodes=%d ... \n", cutnodes->childcount_terms[node], cutnodes->childcount_nodes[node]);
584 SCIP_CALL( reduce_solLevelTopTransferSolTo(graph_subinoutGetOrgToSubNodeMap(subinout), redsol) );
595 redparams->reductbound = BIDECOMP_MINRED_MULTIPLIER * reduce_getMinNreductions(subgraph, redparams->reductbound_min);
643 SCIPdebugMessage("(depth %d) reduce component %d: \n", redbase->bidecompparams->depth, compindex);
775 SCIPdebugMessage("(depth %d) solve component %d to optimality \n", redbase->bidecompparams->depth, compindex);
807 const SCIP_Real mincompratio = bidecompparams->depth == 0 ? BIDECOMP_MINMAXCOMPRATIO_FIRST : BIDECOMP_MINMAXCOMPRATIO;
894 SCIPdebugMessage("solving problem by partial exact decomposition at depth %d (%d components) \n",
918 printf("TIME FOR PARTIAL EXACT DECOMPISITION: %f (total: %f) \n", endTime - startTime, totalTime);
955 SCIP_CALL( decomposePartialExact(scip, BIDECOMP_MAXCOMPRATIO_PARTIAL, g, bidecomp, solnode, redbase, NULL) );
988 SCIP_CALL( decomposePartialExact(scip, BIDECOMP_MAXCOMPRATIO_AGGRESSIVE, g, bidecomp, solnode, redbase, nelims) );
1072 SCIP_CALL( reduce_nonTerminalComponents(scip, cutnodes, g, reduce_solGetOffsetPointer(redbase->redsol), &dummy) );
1117 SCIP_CALL( reduce_nonTerminalComponents(scip, cutnodes, g, reduce_solGetOffsetPointer(redbase->redsol), nelims) );
static SCIP_RETCODE cutNodesTreeInit(SCIP *scip, const GRAPH *g, const CUTNODES *cutnodes, CUTTREE *cuttree)
Definition: reduce_sepa.c:517
SCIP_Bool newLevelStarted
Definition: reducedefs.h:95
#define BIDECOMP_MAXCOMPRATIO_AGGRESSIVE
Definition: reduce_sepa.c:51
Definition: graphdefs.h:184
void reduce_solLevelTopTransferSolBack(const int *, REDSOL *)
Definition: reduce_sol.c:1010
SCIP_RETCODE reduce_solLevelTopTransferSolTo(const int *, REDSOL *)
Definition: reduce_sol.c:1067
Definition: struct_scip.h:59
SCIP_Bool bidecomposition_isPossible(const GRAPH *g)
Definition: bidecomposition.c:887
SCIP_RETCODE graph_subinoutActivateEdgeMap(const GRAPH *, SUBINOUT *)
Definition: graph_sub.c:769
Definition: reduce_sepa.c:60
int reduce_getMinNreductions(const GRAPH *, int)
Definition: reduce_base.c:1087
Definition: substpsolver.c:58
SCIP_RETCODE substpsolver_setProbFullPresolve(SUBSTP *substp)
Definition: substpsolver.c:568
static void cutNodesTreeMakeTerms(SCIP *scip, const CUTNODES *cutnodes, const CUTTREE *cuttree, GRAPH *g)
Definition: reduce_sepa.c:445
void graph_subinoutActivateNewHistory(SUBINOUT *)
Definition: graph_sub.c:788
SCIP_RETCODE reduce_nonTerminalComponents(SCIP *scip, const CUTNODES *cutnodes, GRAPH *g, SCIP_Real *fixedp, int *nelims)
Definition: reduce_sepa.c:1004
#define BIDECOMP_MINMAXCOMPRATIO_PARTIAL
Definition: reduce_sepa.c:49
includes various files containing graph methods used for Steiner tree problems
void bidecomposition_free(SCIP *scip, BIDECOMP **bidecomposition)
Definition: bidecomposition.c:759
const int * graph_subinoutGetSubToOrgNodeMap(const SUBINOUT *)
Definition: graph_sub.c:799
Definition: graph_sub.c:54
SCIP_RETCODE substpsolver_init(SCIP *scip, GRAPH *subgraph, SUBSTP **substp)
Definition: substpsolver.c:313
Definition: reducedefs.h:100
header only, simple implementation of an STL like vector
several decomposition methods for Steiner tree problems
struct cut_tree_data CUTTREE
static SCIP_Bool decomposePartialIsPromising(const GRAPH *g, const REDBASE *redbase, const BIDECOMP *bidecomp)
Definition: reduce_sepa.c:821
static SCIP_RETCODE decomposeExactSubTry(SCIP *scip, const BIDECOMP *bidecomp, int compindex, GRAPH *g, REDBASE *redbase, int *nelims)
Definition: reduce_sepa.c:754
SCIP_Bool graph_pc_termIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1431
static void cutNodesTreeDeleteComponents(SCIP *scip, const CUTNODES *cutnodes, const CUTTREE *cuttree, GRAPH *g, SCIP_Real *fixedp, int *nelims)
Definition: reduce_sepa.c:323
SCIP_RETCODE reduce_articulations(SCIP *scip, GRAPH *g, SCIP_Real *fixedp, int *nelims)
Definition: reduce_sepa.c:1130
static SCIP_RETCODE decomposeReduceSub(SCIP *scip, const BIDECOMP *bidecomp, int compindex, GRAPH *g, REDBASE *redbase)
Definition: reduce_sepa.c:627
SCIP_Real bidecomposition_getCompNodeRatio(const BIDECOMP *bidecomp, int compindex)
Definition: bidecomposition.c:912
Definition: bidecomposition.h:57
static void cutNodesTreeAddNode(int node, const CUTNODES *cutnodes, int lastcutnode, CUTTREE *cuttree)
Definition: reduce_sepa.c:225
SCIP_RETCODE substpsolver_transferHistory(const int *edgeMapToOrg, GRAPH *orggraph, SUBSTP *substp)
Definition: substpsolver.c:404
void bidecomposition_markSub(const BIDECOMP *bidecomp, int compindex, GRAPH *g)
Definition: bidecomposition.c:782
void bidecomposition_cutnodesCompute(const GRAPH *g, CUTNODES *cutnodes)
Definition: bidecomposition.c:676
Definition: reduce_sol.c:70
void reduce_solLevelTopFinalize(SCIP *, GRAPH *, REDSOL *)
Definition: reduce_sol.c:956
static SCIP_RETCODE decomposePartialExact(SCIP *scip, SCIP_Real maxcompratio, GRAPH *g, BIDECOMP *bidecomp, int *solnode, REDBASE *redbase, int *nelims)
Definition: reduce_sepa.c:874
static int cutNodesGetLastCutnode(const CUTNODES *cutnodes)
Definition: reduce_sepa.c:75
SCIP_RETCODE graph_subgraphExtract(SCIP *, GRAPH *, SUBINOUT *, GRAPH **)
Definition: graph_sub.c:712
SCIP_Real bidecomposition_getMaxcompNodeRatio(const BIDECOMP *bidecomp)
Definition: bidecomposition.c:938
Solver for Steiner tree (sub-) problems.
Definition: type_retcode.h:33
SCIP_RETCODE reduce_bidecompositionExact(SCIP *scip, GRAPH *g, REDBASE *redbase, int *solnode, int *nelims)
Definition: reduce_sepa.c:1085
Definition: reducedefs.h:75
SCIP_RETCODE reduce_solLevelAdd(SCIP *, const GRAPH *, REDSOL *)
Definition: reduce_sol.c:897
SCIP_RETCODE bidecomposition_cutnodesInit(SCIP *scip, const GRAPH *g, CUTNODES **cutnodes)
Definition: bidecomposition.c:573
static SCIP_Bool decomposeIsPromising(const GRAPH *g, const BIDECPARAMS *bidecompparams, const BIDECOMP *bidecomp)
Definition: reduce_sepa.c:801
static SCIP_Bool cutNodesTreeMakeTermsIsComplete(const CUTNODES *cutnodes, const GRAPH *g)
Definition: reduce_sepa.c:376
SCIP_RETCODE bidecomposition_initSubInOut(SCIP *scip, const GRAPH *g, BIDECOMP *bidecomposition)
Definition: bidecomposition.c:743
SCIP_RETCODE reduce_bidecomposition(SCIP *scip, GRAPH *g, REDBASE *redbase, int *solnode, SCIP_Bool *wasDecomposed)
Definition: reduce_sepa.c:1039
static void cutNodesTreeExit(SCIP *scip, CUTTREE *cuttree)
Definition: reduce_sepa.c:554
SCIP_RETCODE substpsolver_getSolution(SUBSTP *substp, int *edgesol)
Definition: substpsolver.c:500
const int * graph_subinoutGetOrgToSubNodeMap(const SUBINOUT *)
Definition: graph_sub.c:825
static SCIP_RETCODE decomposeReduce(SCIP *scip, GRAPH *g, BIDECOMP *bidecomp, REDBASE *redbase)
Definition: reduce_sepa.c:845
void bidecomposition_cutnodesFree(SCIP *scip, CUTNODES **cutnodes)
Definition: bidecomposition.c:647
Portable definitions.
static SCIP_RETCODE decomposeExec(SCIP *scip, const CUTNODES *cutnodes, GRAPH *g, REDBASE *redbase, int *solnode, SCIP_Bool *wasDecomposed)
Definition: reduce_sepa.c:927
static SCIP_RETCODE decomposeExecExact(SCIP *scip, const CUTNODES *cutnodes, GRAPH *g, REDBASE *redbase, int *solnode, int *nelims)
Definition: reduce_sepa.c:967
static SCIP_RETCODE decomposeExactFixSol(SCIP *scip, const SUBINOUT *subinout, SUBSTP *substp, GRAPH *orggraph, REDBASE *redbase, int *nelims)
Definition: reduce_sepa.c:654
static SCIP_RETCODE decomposeReduceSubDoIt(SCIP *scip, const BIDECOMP *bidecomp, int compindex, GRAPH *graph, REDBASE *redbase)
Definition: reduce_sepa.c:567
int graph_pc_deleteTerm(SCIP *, GRAPH *, int, SCIP_Real *)
Definition: graph_pcbase.c:2235
const int * graph_subinoutGetSubToOrgEdgeMap(const SUBINOUT *)
Definition: graph_sub.c:812
SCIP_Real * reduce_solGetOffsetPointer(REDSOL *)
Definition: reduce_sol.c:1285
static void cutNodesTreeBuildSteinerTree(SCIP *scip, const GRAPH *g, const CUTNODES *cutnodes, CUTTREE *cuttree)
Definition: reduce_sepa.c:252
SCIP_RETCODE reduce_solLevelTopUpdate(SCIP *, const GRAPH *, REDSOL *)
Definition: reduce_sol.c:922
int substpsolver_getNsubedges(const SUBSTP *substp)
Definition: substpsolver.c:488
SCIP_RETCODE reduce_redLoopStp(SCIP *, GRAPH *, REDBASE *)
Definition: reduce_base.c:2074
SCIP_RETCODE reduce_contract0Edges(SCIP *, GRAPH *, int *, SCIP_Bool)
Definition: reduce_simple.c:733
SCIP_Bool bidecomposition_componentIsTrivial(const BIDECOMP *bidecomp, int compindex)
Definition: bidecomposition.c:861
Definition: objbenders.h:33
SCIP_RETCODE bidecomposition_getMarkedSubRoot(SCIP *scip, const BIDECOMP *bidecomp, const GRAPH *orggraph, const GRAPH *subgraph, int *subroot)
Definition: bidecomposition.c:830
SCIP_RETCODE graph_subgraphReinsert(SCIP *, SUBINOUT *, GRAPH *, GRAPH **)
Definition: graph_sub.c:983
SCIP_RETCODE substpsolver_solve(SCIP *scip, SUBSTP *substp, SCIP_Bool *success)
Definition: substpsolver.c:452
includes various reduction methods for Steiner tree problems
SCIP_RETCODE bidecomposition_init(SCIP *scip, const CUTNODES *cutnodes, const GRAPH *g, BIDECOMP **bidecomposition)
Definition: bidecomposition.c:710
static SCIP_RETCODE decomposeExactSubDoIt(SCIP *scip, const BIDECOMP *bidecomp, GRAPH *orggraph, GRAPH *subgraph, REDBASE *redbase, int *nelims)
Definition: reduce_sepa.c:712
SCIP callable library.