reduce_da.c
Go to the documentation of this file.
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
52 #define DEFAULT_NMAXROOTS 8 /**< max number of roots to use for new graph in dual ascent heuristic */
61 #define DAMAXDEVIATION_RANDOM_LOWER 0.20 /**< random upper bound for max deviation for dual ascent */
62 #define DAMAXDEVIATION_RANDOM_UPPER 0.30 /**< random upper bound for max deviation for dual ascent */
66 /** returns solution value for given edge-solution array (CONNECT/UNKNOWN) and offset, takes prizes into account! */
84 /** computes dual solution with dual-ascent and guided solution (and possibly reroots given solution) */
139 SCIPdebugMessage("RPC: add %f to dual objective \n", graph_pc_getNonLeafTermOffset(scip, graph));
179 SCIPdebugMessage("RPC: add %f to dual objective \n", graph_pc_getNonLeafTermOffset(scip, graph));
232 graph, startstm, NULL, result, runstm, graph->source, cost, costrev, &hopfactor, NULL, success) );
282 SCIP_CALL( SCIPStpHeurAscendPruneRun(scip, NULL, graph, redcosts, result, daroot, &success, FALSE));
302 SCIP_CALL(SCIPStpHeurRecRun(scip, pool, NULL, NULL, graph, NULL, &solindex, 1, pool->size, FALSE, &solfound));
388 SCIP_CALL( SCIPStpHeurAscendPruneRun(scip, NULL, graph, redcosts, result, daroot, &success, FALSE));
425 /** compute primal solution during dual-ascent routine for PCSTP or MWCSP based on reduced costs */
434 int* result2, /**< sol int array corresponding to best new solution (might be worse than upper bound) */
456 SCIPdebugMessage("DA: first new sol value in computeSteinerTreeRedCostsPcMw: %f ... old value: %f \n", ub2, *upperbound);
479 SCIP_CALL( SCIPStpHeurRecRun(scip, pool, NULL, NULL, graph, NULL, &solindex, 3, pool->size, FALSE, &solfound) );
528 SCIP_CALL( SCIPStpHeurRecExclude(scip, graph, result1, result2, pathedge, nodearrchar, &success) );
737 SCIP_CALL( reduce_extendedCheck3Tree(scip, graph, root, redcost, pathdist, vnoi, vbase, cutoff, tree3outedges, rootedge,
757 assert(SCIPisGE(scip, fixbnd, pathdist[node] + vnoi[node].dist + vnoi[node + nnodes].dist + lpobjval)
883 SCIPdebugMessage("delete knot %d %f < %f %d\n", k, upperbound, fixingbounds[k], graph->grad[k]);
936 deleteEdge = (SCIPisFeasLT(scip, upperbound, fixingbounds[e]) && SCIPisFeasLT(scip, upperbound, fixingbounds[erev]));
938 deleteEdge = (SCIPisLE(scip, upperbound, fixingbounds[e]) && SCIPisLE(scip, upperbound, fixingbounds[erev]));
944 SCIPdebugMessage("delete edge %d (upperbound=%f fixingbound=%f) \n", e, upperbound, fixingbounds[e]);
1012 //(void) SCIPsnprintf(filename, SCIP_MAXSTRLEN,"/nfs/optimi/kombadon/bzfrehfe/projects/scip/applications/STP/x%d_pred.stp", node);
1013 fp = fopen("/nfs/optimi/kombadon/bzfrehfe/projects/scip/applications/STP/STATS/stpall_hash.txt", "a+");
1072 const int* termmark, /**< terminal mark (2 for proper terminal, 1 for non-proper terminal, 0 otherwise) */
1111 assert(pseudoedge == e2); /* that holds because of correspondence between graph and transgraph for the pseudo-terminal edge */
1122 if( SCIPisGT(scip, cost[pseudoedge], objgap) || SCIPisGT(scip, bestcost[pseudoedge], objgap_best) )
1134 mark = graph_sdWalksConnected(scip, graph, termmark, graph->cost, isfixedterm, realterm, 1500, dist, pathedge, &nvisits,
1148 assert((termmark[node] == 2) == (Is_term(graph->term[node]) && !graph_pc_termIsNonLeafTerm(graph, node)));
1185 /** special method for RPC/RMW that deletes incident edges of terminal, but not the terminal and the extension itself */
1224 assert(graph->outbeg[term] == graph->term2edge[term] && twinterm == graph_pc_getTwinTerm(graph, term));
1310 findRootsMark(scip, graph, transgraph, termmark, cost, bestcost, lpobjval, bestlpobjval, upperbound, rerun, probrooted, pseudoterm, e,
1324 findRootsMark(scip, graph, transgraph, termmark, cost, bestcost, lpobjval, bestlpobjval, upperbound, rerun, probrooted, pseudoterm, e,
1330 SCIPdebugMessage("...after: new roots in rerun %d all roots: %d, nodes: %d edges: %d terms: %d \n\n", nroots - *rootscount,
1358 connected = graph_sdWalksConnected(scip, graph, termmark, graph->cost, isfixedterm, i, 1500, dist, pathedge, &nvisits,
1387 SCIPdebugMessage("new roots in rerun %d all roots: %d, nodes: %d \n", nroots - *rootscount, nroots, nnodes);
1416 graph, NULL, NULL, result, BND_TMHEUR_NRUNS_RPC, graph->source, graph->cost, graph->cost, NULL, NULL, &success) );
1486 /** are the reduced costs still valid, i.e. are there zero cost paths from the root to all terminals? */
1553 damaxdeviation = SCIPrandomGetReal(randnumgen, DAMAXDEVIATION_RANDOM_LOWER, DAMAXDEVIATION_RANDOM_UPPER);
1556 damaxdeviation = SCIPrandomGetReal(randnumgen, DAMAXDEVIATION_RANDOM_LOWER, DAMAXDEVIATION_RANDOM_UPPER);
1843 SCIP_CALL( computeSteinerTreeRedCostsPcMw(scip, graph, pool, cost, upperbound, result, result2, pathedge, nodearrchar, apsol) );
1897 SCIP_CALL( computeSteinerTreeRedCostsPcMw(scip, graph, pool, cost, upperbound, result, result2, pathedge, nodearrchar, apsol) );
1952 /** reduce graph with non-artificial root (SPG, RPC ...) based on information from dual ascent and given upper bound */
2012 if( isRpcmw && Is_term(graph->term[k]) && !graph_pc_knotIsFixedTerm(graph, k) && !graph_pc_termIsNonLeafTerm(graph, k)
2021 (SCIPisFeasGT(scip, redcost, cutoffbound) || (solgiven && SCIPisEQ(scip, redcost, cutoffbound) && !nodearrchar[k])) )
2045 || (solgiven && SCIPisEQ(scip, redcost, cutoffbound) && result[e] != CONNECT && result[flipedge(e)] != CONNECT) )
2128 ((SCIPisGT(scip, tmpcost, minpathcost) && (!keepsol || (result[e] != CONNECT && result[flipedge(e)] != CONNECT))) ||
2129 (solgiven && tmpcost >= minpathcost && result[e] != CONNECT && result[flipedge(e)] != CONNECT)) )
2171 if( (SCIPisGT(scip, tmpcost, minpathcost) && (!keepsol || (result[e] != CONNECT && result[flipedge(e)] != CONNECT))) ||
2172 (solgiven && tmpcost >= minpathcost && result[e] != CONNECT && result[flipedge(e)] != CONNECT) )
2236 const SCIP_Bool dualisvalid = daRedCostIsValid(scip, transgraph, bestcost, state, nodearrchar);
2256 return reducePcMw(scip, graph, transgraph, vnoi, bestcost, pathdist, *minpathcost, result, marked, nodearrchar, *solgiven, TRUE);
2325 SCIP_CALL( updateNodeReplaceBounds(scip, redcostdata, g, nodereplacebounds, objbound_upper, TRUE, FALSE));
2327 SCIP_CALL( reduce_applyPseudoDeletions(scip, pseudoDelNodes, redcostdata, g, offsetp, &nreplacings) );
2424 SCIP_CALL( dualascent_paths(scip, g, redcosts_getEdgeCostsTop(redcostdata), &dualobjval, result) );
2452 SCIP_CALL( dapathsReplaceNodes(scip, redcostdata, result, objbound_upper, g, offsetp, nelims) );
2599 SCIP_CALL( computeSteinerTreeRedCostsDirected(scip, graph, redcostdata, result, bestresult, &havebestsol, &upperbound) );
2618 printf("WRONG BOUND: upper=%f lower=%f (round=%d havenewsol=%d)\n", upperbound, redcosts_getDualBoundTop(redcostdata), run, havebestsol);
2622 SCIPdebugMessage("upper=%f lower=%f (round=%d havenewsol=%d)\n", upperbound, redcosts_getDualBoundTop(redcostdata), run, havebestsol);
2627 redcosts_getNodeToTermsPathsTop(redcostdata), redcosts_getDualBoundTop(redcostdata), (run == 0));
2629 redcosts_getRootToNodeDistTop(redcostdata), redcosts_getNodeToTermsPathsTop(redcostdata), redcosts_getDualBoundTop(redcostdata),
2632 SCIP_CALL( reduceRootedProb(scip, graph, arcsdeleted, redcostdata, bestresult, havebestsol, &ndeletions_run) );
2635 ndeletions_run += reduceWithEdgeFixingBounds(scip, graph, NULL, edgefixingbounds, (havebestsol ? bestresult : NULL), upperbound);
2643 SCIP_CALL( extreduce_init(scip, useSd, paramsda->extredMode, graph, redcostdata, &extpermanent) );
2654 SCIP_CALL( updateNodeReplaceBounds(scip, redcostdata, graph, nodereplacebounds, upperbound, (run == 0), FALSE));
2696 SCIP_CALL( reduce_applyPseudoDeletions(scip, pseudoDelNodes, redcostdata, graph, offsetp, &nreplacings) );
2902 SCIP_CALL( SCIPStpHeurAscendPruneRun(scip, NULL, graph, cost, edgearrint2, root, &success, FALSE) );
3029 if( !Is_term(graph->term[k]) && (!eliminate || pathdist[k] + vnoi[k].dist >= minpathcost) && solnode[k] != CONNECT )
3126 if( SCIPisLE(scip, cost[e], 0.0) || SCIPisLE(scip, cost[e2], 0.0) || SCIPisLE(scip, cost[e3], 0.0) )
3284 SCIP_CALL( computeSteinerTreeRedCostsPcMw(scip, graph, NULL, cost, &upperbound, result, result2, pathedge, nodearrchar, &havenewsol) );
3292 SCIPdebugMessage("havenewsol=%d upperbound=%f lpobjval=%f \n", havenewsol, upperbound, lpobjval);
3314 updateEdgeFixingBounds(edgefixingbounds, graph, cost, pathdist, vnoi, lpobjval, extnedges, TRUE, FALSE);
3319 nfixed += reducePcMw(scip, graph, transgraph, vnoi, cost, pathdist, minpathcost, result, marked, nodearrchar,
3343 SCIP_CALL( computePertubedSol(scip, graph, transgraph, pool, vnoi, cost, bestcost, pathdist, pathedge, result, result2,
3344 transresult, nodearrchar, &upperbound, &lpobjval, &bestlpobjval, &minpathcost, &havenewsol, offset, extnedges) );
3353 updateEdgeFixingBounds(edgefixingbounds, graph, cost, pathdist, vnoi, lpobjval, extnedges, FALSE, FALSE);
3356 nfixed += reducePcMw(scip, graph, transgraph, vnoi, cost, pathdist, minpathcost, result, marked, nodearrchar, havenewsol, TRUE);
3358 nfixed += reducePcMwTryBest(scip, graph, transgraph, vnoi, cost, costrev, bestcost, pathdist, &upperbound,
3359 &lpobjval, &bestlpobjval, &minpathcost, oldupperbound, result, vbase, state, pathedge, marked, nodearrchar, &havenewsol, extnedges);
3361 nfixed += reduceWithEdgeFixingBounds(scip, graph, transgraph, edgefixingbounds, NULL, upperbound);
3365 SCIPdebugMessage("eliminations after sol based run2 with best dual sol %d bestlb %f newlb %f\n", nfixed, bestlpobjval, lpobjval);
3388 SCIP_CALL( daPcFindRoots(scip, graph, transgraph, cost, bestcost, lpobjval, bestlpobjval, upperbound, FALSE, FALSE,
3482 SCIP_CALL( computeSteinerTreeRedCostsPcMw(scip, graph, pool, cost, &upperbound, result, result2, pathedge, nodearrchar, &havenewsol) );
3497 SCIP_CALL( daPcFindRoots(scip, graph, transgraph, cost, cost, lpobjval, lpobjval, upperbound, TRUE, TRUE,
3533 updateEdgeFixingBounds(edgefixingbounds, graph, cost, pathdist, vnoi, lpobjval, extnedges, FALSE, TRUE);
3540 nfixed += reducePcMw(scip, graph, transgraph, vnoi, cost, pathdist, minpathcost, result, marked, nodearrchar, havenewsol, TRUE);
3541 nfixed += reduceWithEdgeFixingBounds(scip, graph, transgraph, edgefixingbounds, NULL, upperbound);
SCIP_RETCODE reduce_daPcMw(SCIP *scip, GRAPH *graph, const RPDA *paramsda, REDSOLLOCAL *redprimal, PATH *vnoi, SCIP_Real *pathdist, int *vbase, int *pathedge, int *state, STP_Bool *nodearrchar, int *nelims, SCIP_RANDNUMGEN *randnumgen, SCIP_Real prizesum)
Definition: reduce_da.c:3174
SCIP_Bool graph_valid_ancestors(SCIP *, const GRAPH *)
Definition: graph_history.c:753
void redcosts_setAndReturnCutoffFromBoundTop(SCIP_Real upperbound, REDCOST *redcostdata, SCIP_Real *cutoffbound)
Definition: redcosts.c:624
SCIP_Bool graph_sdWalksConnected(SCIP *, const GRAPH *, const int *, const SCIP_Real *, const STP_Bool *, int, int, SCIP_Real *, int *, int *, STP_Bool *, SCIP_Bool)
Definition: graph_sdpath.c:2285
static SCIP_RETCODE daRoundInit(SCIP *scip, SCIP_Real upperbound, GRAPH *graph, REDCOST *redcostdata, STP_Bool *arcsdeleted, SCIP_Real *cutoffbound)
Definition: reduce_da.c:1740
Definition: graphdefs.h:184
static void updateNodeFixingBounds(SCIP_Real *fixingbounds, const GRAPH *graph, const SCIP_Real *pathdist, const PATH *vnoi, SCIP_Real lpobjval, SCIP_Bool initialize)
Definition: reduce_da.c:575
SCIP_Bool SCIPisFeasLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:786
Definition: struct_scip.h:59
SCIP_RETCODE dualascent_execDegCons(SCIP *scip, const GRAPH *g, const int *result, const DAPARAMS *daparams, SCIP_Real *RESTRICT redcost, SCIP_Real *objval)
Definition: dualascent.c:1256
static void daRpcmwDeleteTermIncidents(SCIP *scip, const PATH *vnoi, int term, GRAPH *graph, int *incidents, int *nfixedp)
Definition: reduce_da.c:1187
SCIP_Bool pcmw_useMultRoots
Definition: reducedefs.h:154
static void computeTransVoronoi(SCIP *scip, GRAPH *transgraph, PATH *vnoi, const SCIP_Real *cost, SCIP_Real *costrev, SCIP_Real *pathdist, int *vbase, int *pathedge)
Definition: reduce_da.c:1915
SCIP_RETCODE reduce_daSlackPrune(SCIP *scip, GRAPH *graph, int minelims, SCIP_Bool solgiven, int *soledge, int *solnode, int *nelims, SCIP_Real *upperbound, SCIP_Bool *solImproved, SCIP_Bool *solReconstructed)
Definition: reduce_da.c:2741
void reduce_identifyNonLeafTerms(SCIP *, GRAPH *)
Definition: reduce_simple.c:1052
static SCIP_Bool daGuidedIsPromising(const GRAPH *graph, int run, SCIP_RANDNUMGEN *randnumgen)
Definition: reduce_da.c:1567
void graph_pc_termMarkProper(const GRAPH *, int *)
Definition: graph_pcbase.c:1500
static int reducePcMwTryBest(SCIP *scip, GRAPH *graph, GRAPH *transgraph, PATH *vnoi, const SCIP_Real *cost, SCIP_Real *costrev, SCIP_Real *bestcost, SCIP_Real *pathdist, SCIP_Real *upperbound, SCIP_Real *lpobjval, SCIP_Real *bestlpobjval, SCIP_Real *minpathcost, SCIP_Real oldupperbound, const int *result, int *vbase, int *state, int *pathedge, STP_Bool *marked, STP_Bool *nodearrchar, SCIP_Bool *solgiven, int extnedges)
Definition: reduce_da.c:2212
SCIP_Real redcosts_getCutoffTop(const REDCOST *redcostdata)
Definition: redcosts.c:300
Definition: dualascent.h:39
static SCIP_RETCODE reduceWithEdgeExtReds(SCIP *scip, SCIP_Real upperbound, EXTPERMA *extperma, GRAPH *graph, int *ndeletions_run)
Definition: reduce_da.c:979
void reduce_sollocalSetOffset(SCIP_Real, REDSOLLOCAL *)
Definition: reduce_sol.c:488
STPSOL * solpool_solFromIndex(STPSOLPOOL *pool, const int soindex)
Definition: solpool.c:66
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:490
void graph_path_exec(SCIP *, const GRAPH *, int, int, const SCIP_Real *, PATH *)
Definition: graph_path.c:541
includes methods for Steiner tree problem solutions
SCIP_RETCODE SCIPStpHeurLocalRunFast(SCIP *scip, GRAPH *graph, int *solEdges)
Definition: heur_local.c:3911
static SCIP_RETCODE daPcFindRoots(SCIP *scip, GRAPH *graph, const GRAPH *transgraph, const SCIP_Real *cost, const SCIP_Real *bestcost, SCIP_Real lpobjval, SCIP_Real bestlpobjval, SCIP_Real upperbound, SCIP_Bool rerun, SCIP_Bool probrooted, PATH *vnoi, int *pathedge, int *vbase, STP_Bool *isfixedterm, int *roots, int *rootscount)
Definition: reduce_da.c:1229
SCIP_Bool pcmw_markroots
Definition: reducedefs.h:155
Definition: extreducedefs.h:101
SCIP_RETCODE SCIPStpHeurTMRun(SCIP *scip, enum PCMW_TmMode pcmw_tmmode, GRAPH *graph, int *starts, const SCIP_Real *prize, int *best_result, int runs, int bestincstart, SCIP_Real *cost, SCIP_Real *costrev, SCIP_Real *hopfactor, SCIP_Real *nodepriority, SCIP_Bool *success)
Definition: heur_tm.c:3418
dual-ascent and reduction based primal heuristic for Steiner problems
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:825
reduction and dual-cost based primal heuristic for Steiner problems
SCIP_RETCODE reduce_da(SCIP *scip, GRAPH *graph, const RPDA *paramsda, REDSOLLOCAL *redsollocal, SCIP_Real *offsetp, int *nelims, SCIP_RANDNUMGEN *randnumgen)
Definition: reduce_da.c:2471
Includes dual-ascent for classic Steiner tree and some variants.
SCIP_Bool solstp_isUnreduced(SCIP *scip, const GRAPH *graph, const int *result)
Definition: solstp.c:1596
Definition: reducedefs.h:71
SCIP_Bool pcmw_solbasedda
Definition: reducedefs.h:153
Problem data for stp problem.
includes various files containing graph methods used for Steiner tree problems
Definition: struct_misc.h:259
Definition: graphdefs.h:284
SCIP_RETCODE solpool_init(SCIP *scip, STPSOLPOOL **pool, const int nedges, const int maxsize)
Definition: solpool.c:91
SCIP_RETCODE graph_transPcGetSap(SCIP *, GRAPH *, GRAPH **, SCIP_Real *)
Definition: graph_trans.c:931
void SCIPsortDownIntInt(int *intarray1, int *intarray2, int len)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
Definition: misc.c:10003
SCIP_Real graph_pc_getNonLeafTermOffset(SCIP *, const GRAPH *)
Definition: graph_pcbase.c:2209
static SCIP_Real daGetMaxDeviation(const RPDA *paramsda, SCIP_RANDNUMGEN *randnumgen)
Definition: reduce_da.c:1543
static SCIP_RETCODE computePertubedSol(SCIP *scip, GRAPH *graph, GRAPH *transgraph, STPSOLPOOL *pool, PATH *vnoi, SCIP_Real *cost, SCIP_Real *bestcost, SCIP_Real *pathdist, int *pathedge, int *result, int *result2, int *transresult, STP_Bool *nodearrchar, SCIP_Real *upperbound, SCIP_Real *lpobjval, SCIP_Real *bestlpobjval, SCIP_Real *minpathcost, SCIP_Bool *apsol, SCIP_Real offset, int extnedges)
Definition: reduce_da.c:1810
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:438
SCIP_RETCODE redcosts_initializeDistancesTop(SCIP *scip, GRAPH *g, REDCOST *redcostdata)
Definition: redcosts.c:573
SCIP_RETCODE reduce_sollocalRebuildTry(SCIP *, GRAPH *, REDSOLLOCAL *)
Definition: reduce_sol.c:507
void graph_get2nextTermPaths(GRAPH *, const SCIP_Real *, const SCIP_Real *, PATH *, int *, int *)
Definition: graph_tpath.c:1542
SCIP_RETCODE dualascent_exec(SCIP *scip, const GRAPH *g, const int *result, const DAPARAMS *daparams, SCIP_Real *RESTRICT redcost, SCIP_Real *objval)
Definition: dualascent.c:1191
static void markPseudoDeletablesFromBounds(SCIP *scip, GRAPH *graph, const SCIP_Real *replacebounds, SCIP_Real upperbound, SCIP_Bool *pseudoDelNodes)
Definition: reduce_da.c:1029
SCIP_Bool graph_pc_termIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1431
SCIP_RETCODE reduce_sollocalUpdateNodesol(SCIP *, const int *, GRAPH *, REDSOLLOCAL *)
Definition: reduce_sol.c:565
static void findRootsMark(SCIP *scip, GRAPH *graph, const GRAPH *transgraph, const int *termmark, const SCIP_Real *cost, const SCIP_Real *bestcost, SCIP_Real lpobjval, SCIP_Real bestlpobjval, SCIP_Real upperbound, SCIP_Bool rerun, SCIP_Bool probrooted, int pseudoterm, int pseudoedge, STP_Bool *isfixedterm, int *roots, int *rootscount, int *pathedge, STP_Bool *visited, SCIP_Real *dist)
Definition: reduce_da.c:1068
SCIP_RETCODE solstp_rerootInfeas(SCIP *scip, GRAPH *g, int *result, int newroot, SCIP_Bool *isInfeasible)
Definition: solstp.c:1579
#define SCIPallocCleanBufferArray(scip, ptr, num)
Definition: scip_mem.h:133
Definition: heur_tm.h:48
SCIP_RETCODE dualascent_paths(SCIP *scip, GRAPH *graph, SCIP_Real *RESTRICT redcost, SCIP_Real *objval, const int *result)
Definition: dualascent.c:1803
This file implements extended reduction techniques for several Steiner problems.
static int reducePcMw(SCIP *scip, GRAPH *graph, GRAPH *transgraph, const PATH *vnoi, const SCIP_Real *cost, const SCIP_Real *pathdist, SCIP_Real minpathcost, const int *result, STP_Bool *marked, STP_Bool *nodearrchar, SCIP_Bool solgiven, SCIP_Bool deleteTransEdges)
Definition: reduce_da.c:2071
SCIP_Real redcosts_getDualBoundTop(const REDCOST *redcostdata)
Definition: redcosts.c:324
int graph_pc_getRoot2PtermEdge(const GRAPH *, int)
Definition: graph_pcbase.c:2499
void graph_path_execX(SCIP *, const GRAPH *, int, const SCIP_Real *, SCIP_Real *, int *)
Definition: graph_path.c:905
static SCIP_RETCODE reduceRootedProb(SCIP *scip, GRAPH *graph, STP_Bool *marked, const REDCOST *redcostdata, const int *result, SCIP_Bool solgiven, int *nfixedp)
Definition: reduce_da.c:1954
void redcosts_setCutoffFromBoundTop(SCIP_Real upperbound, REDCOST *redcostdata)
Definition: redcosts.c:670
SCIP_RETCODE SCIPStpHeurAscendPruneRun(SCIP *scip, SCIP_HEUR *heur, const GRAPH *g, const SCIP_Real *redcosts, int *result, int root, SCIP_Bool *solfound, SCIP_Bool addsol)
Definition: heur_ascendprune.c:940
SCIP_RETCODE solpool_addSol(SCIP *scip, const SCIP_Real obj, const int *soledges, STPSOLPOOL *pool, SCIP_Bool *success)
Definition: solpool.c:183
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:451
SCIP_Real * redcosts_getEdgeCostsTop(const REDCOST *redcostdata)
Definition: redcosts.c:202
void SCIPStpHeurTMCompStarts(GRAPH *graph, int *starts, int *runs)
Definition: heur_tm.c:2879
void SCIPsortReal(SCIP_Real *realarray, int len)
static SCIP_RETCODE daRedcostsInit(SCIP *scip, const GRAPH *graph, const RPDA *paramsda, int nLevels, REDCOST **redcostdata)
Definition: reduce_da.c:1650
enum EXTRED_MODE extredMode
Definition: reducedefs.h:148
SCIP_RETCODE SCIPStpHeurLocalRun(SCIP *scip, GRAPH *graph, int *solEdges)
Definition: heur_local.c:3899
SCIP_RETCODE reduce_applyPseudoDeletions(SCIP *, const SCIP_Bool *, REDCOST *, GRAPH *, SCIP_Real *, int *)
Definition: reduce_util.c:1042
Definition: type_retcode.h:33
SCIP_RETCODE SCIPStpHeurRecExclude(SCIP *scip, const GRAPH *graph, const int *result, int *newresult, int *dnodemap, STP_Bool *stvertex, SCIP_Bool *success)
Definition: heur_rec.c:1649
static SCIP_RETCODE daPcAddTmSolToPool(SCIP *scip, GRAPH *graph, int *result, STPSOLPOOL *pool)
Definition: reduce_da.c:1404
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:812
static void daRedcostsExit(SCIP *scip, REDCOST **redcostdata)
Definition: reduce_da.c:1676
SCIP_Real redcosts_getCutoff(const REDCOST *redcostdata, int level)
Definition: redcosts.c:288
static SCIP_RETCODE computeSteinerTreeRedCostsPcMw(SCIP *scip, GRAPH *graph, STPSOLPOOL *pool, const SCIP_Real *cost, SCIP_Real *upperbound, int *result1, int *result2, int *pathedge, STP_Bool *nodearrchar, SCIP_Bool *apsol)
Definition: reduce_da.c:427
SCIP_Real graph_pc_solGetObj(SCIP *, const GRAPH *, const int *, SCIP_Real)
Definition: graph_pcbase.c:2603
static SCIP_RETCODE computeDualSolution(SCIP *scip, GRAPH *graph, SCIP_Real damaxdeviation, REDCOST *redcostdata)
Definition: reduce_da.c:152
Improvement heuristic for Steiner problems.
SCIP_Bool dualascent_allTermsReachable(SCIP *scip, const GRAPH *g, int root, const SCIP_Real *redcost)
Definition: dualascent.c:1835
includes solution pool for Steiner tree problems
Definition: type_retcode.h:34
SCIP_Real solstp_getObjBounded(const GRAPH *g, const int *soledge, SCIP_Real offset, int nedges)
Definition: solstp.c:1833
static int daGetNruns(const GRAPH *graph, const RPDA *paramsda, int nterms)
Definition: reduce_da.c:1687
static SCIP_RETCODE dapathsFixPotTerms(SCIP *scip, const REDCOST *redcostdata, GRAPH *g, SCIP_Real *offsetp, int *nelims)
Definition: reduce_da.c:2339
static void daRoundExit(SCIP *scip, int ndeletions_run, GRAPH *graph, int *nelims)
Definition: reduce_da.c:1776
void reduce_sollocalUpdateUpperBound(SCIP_Real, REDSOLLOCAL *)
Definition: reduce_sol.c:610
PATH * redcosts_getNodeToTermsPathsTop(const REDCOST *redcostdata)
Definition: redcosts.c:253
static SCIP_RETCODE computeDualSolutionGuided(SCIP *scip, GRAPH *graph, SCIP_Real damaxdeviation, REDCOST *redcostdata, int *result)
Definition: reduce_da.c:86
SCIP_RETCODE redcosts_init(SCIP *scip, int nnodes, int nedges, SCIP_Real cutoff, int redCostRoot, REDCOST **redcostdata)
Definition: redcosts.c:605
SCIP_RETCODE SCIPStpHeurSlackPruneRun(SCIP *scip, SCIP_VAR **vars, GRAPH *g, int *soledge, SCIP_Bool *success, SCIP_Bool initialreduce, SCIP_Bool fullreduce)
Definition: heur_slackprune.c:532
void graph_getEdgeCosts(const GRAPH *, SCIP_Real *RESTRICT, SCIP_Real *RESTRICT)
SCIP_Bool graph_pc_knotIsNonLeafTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1383
static SCIP_RETCODE daOrderRoots(SCIP *scip, const GRAPH *graph, int *terms, int nterms, SCIP_Bool randomize, SCIP_RANDNUMGEN *randnumgen)
Definition: reduce_da.c:1587
SCIP_RETCODE reduce_unconnectedForDirected(SCIP *, GRAPH *)
Definition: reduce_simple.c:1134
static int reduceWithEdgeFixingBounds(SCIP *scip, GRAPH *graph, GRAPH *transgraph, const SCIP_Real *fixingbounds, const int *result, SCIP_Real upperbound)
Definition: reduce_da.c:899
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
Definition: misc.c:10025
int * redcosts_getNodeToTermsBasesTop(const REDCOST *redcostdata)
Definition: redcosts.c:277
void redcosts_setCutoffFromBound(SCIP_Real upperbound, int level, REDCOST *redcostdata)
Definition: redcosts.c:645
Definition: reduce_sol.c:44
static SCIP_RETCODE computeSteinerTreeRedCostsDirected(SCIP *scip, GRAPH *graph, const REDCOST *redcostdata, int *result, int *bestresult, SCIP_Bool *havebestsol, SCIP_Real *bestobjval)
Definition: reduce_da.c:369
static void deleteEdge(SCIP *scip, int edge, GRAPH *g, PR *pr)
Definition: reduce_path.c:127
SCIP_RETCODE reduce_extendedCheck3Tree(SCIP *, const GRAPH *, int, const SCIP_Real *, const SCIP_Real *, const PATH *, const int *, SCIP_Real, const int *, int, SCIP_Real *, SCIP_Bool *, unsigned int *, int *, SCIP_Bool *)
Definition: reduce_ext.c:842
SCIP_RETCODE SCIPStpHeurRecRun(SCIP *scip, STPSOLPOOL *pool, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, const GRAPH *graph, SCIP_VAR **vars, int *newsolindex, int runs, int nsols, SCIP_Bool restrictheur, SCIP_Bool *solfound)
Definition: heur_rec.c:1455
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:477
SCIP_RETCODE extreduce_deleteEdges(SCIP *, EXTPERMA *, GRAPH *, int *)
Definition: extreduce_base.c:1569
void redcosts_setDualBoundTop(SCIP_Real dualbound, REDCOST *redcostdata)
Definition: redcosts.c:420
static SCIP_RETCODE dapathsDeleteEdges(SCIP *scip, const REDCOST *redcostdata, const int *result, GRAPH *g, int *nelims)
Definition: reduce_da.c:2283
SCIP_RETCODE graph_transPcGetRsap(SCIP *, GRAPH *, GRAPH **, const int *, int, int)
Definition: graph_trans.c:1043
SCIP_Bool graph_pc_knotIsDummyTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1344
Definition: solpool.h:38
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1257
SCIP_RETCODE solstp_reroot(SCIP *scip, const GRAPH *g, int *result, int newroot)
Definition: solstp.c:1559
void graph_add2ndTermPaths(const GRAPH *, const SCIP_Real *, const SCIP_Real *, PATH *, int *, int *)
Definition: graph_tpath.c:1482
static SCIP_RETCODE dapathsReplaceNodes(SCIP *scip, REDCOST *redcostdata, const int *result, SCIP_Real objbound_upper, GRAPH *g, SCIP_Real *offsetp, int *nelims)
Definition: reduce_da.c:2308
static void daPcMarkRoots(SCIP *scip, const int *roots, int nrootsold, int nrootsnew, SCIP_Real prizesum, GRAPH *graph, SCIP_Bool *userec, STPSOLPOOL **solpool)
Definition: reduce_da.c:1431
Primal recombination heuristic for Steiner problems.
Definition: solpool.h:46
SCIP_Real * redcosts_getRootToNodeDistTop(const REDCOST *redcostdata)
Definition: redcosts.c:228
static SCIP_RETCODE computeSteinerTreeTM(SCIP *scip, GRAPH *graph, int *result, SCIP_Real *bestobjval, SCIP_Bool *success)
Definition: reduce_da.c:192
shortest paths based primal heuristics for Steiner problems
reduction based primal heuristic for Steiner problems
Definition: redcosts.h:42
static int reduceWithNodeFixingBounds(SCIP *scip, GRAPH *graph, GRAPH *transgraph, const SCIP_Real *fixingbounds, SCIP_Real upperbound)
Definition: reduce_da.c:859
SCIP_RETCODE reduce_dapaths(SCIP *scip, GRAPH *g, SCIP_Real *offsetp, int *nelims)
Definition: reduce_da.c:2397
void graph_pc_knotToFixedTerm(SCIP *, GRAPH *, int, SCIP_Real *)
Definition: graph_pcbase.c:1079
SCIP_RETCODE extreduce_init(SCIP *, SCIP_Bool, enum EXTRED_MODE, GRAPH *, REDCOST *, EXTPERMA **)
Definition: extreduce_base.c:1425
void solstp_setVertexFromEdge(const GRAPH *g, const int *result, STP_Bool *solnode)
Definition: solstp.c:2078
static SCIP_Real getSolObj(SCIP *scip, const GRAPH *g, const int *soledge)
Definition: reduce_da.c:68
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:464
static SCIP_Bool daRedCostIsValid(SCIP *scip, GRAPH *transgraph, const SCIP_Real *cost, int *nodearrint, STP_Bool *nodearrbool)
Definition: reduce_da.c:1488
static void updateEdgeFixingBounds(SCIP_Real *fixingbounds, const GRAPH *graph, const SCIP_Real *cost, const SCIP_Real *pathdist, const PATH *vnoi, SCIP_Real lpobjval, int extnedges, SCIP_Bool initialize, SCIP_Bool undirected)
Definition: reduce_da.c:788
void graph_add1stTermPaths(const GRAPH *, const SCIP_Real *, PATH *, int *, int *)
Definition: graph_tpath.c:1464
Definition: redcosts.c:34
void extreduce_extPermaAddRandnumgen(SCIP_RANDNUMGEN *, EXTPERMA *)
Definition: extreduce_data.c:267
static SCIP_RETCODE updateNodeReplaceBounds(SCIP *scip, const REDCOST *redcostdata, const GRAPH *graph, SCIP_Real *replacebounds, SCIP_Real upperbound, SCIP_Bool initialize, SCIP_Bool extendedsearch)
Definition: reduce_da.c:612
SCIP_Bool solstp_isValid(SCIP *scip, const GRAPH *graph, const int *result)
Definition: solstp.c:1650
Definition: objbenders.h:33
includes various reduction methods for Steiner tree problems
static void collectFixedTerminals(const GRAPH *graph, int *terminals, int *nterms)
Definition: reduce_da.c:545
SCIP_Real reduce_sollocalGetUpperBound(const REDSOLLOCAL *)
Definition: reduce_sol.c:633
SCIP_Real solstp_getObj(const GRAPH *g, const int *soledge, SCIP_Real offset)
Definition: solstp.c:1859
void redcosts_setRootTop(int root, REDCOST *redcostdata)
Definition: redcosts.c:447
SCIP_RETCODE dualascent_pathsPcMw(SCIP *scip, const GRAPH *transgraph, SCIP_Real *RESTRICT redcost, SCIP_Real *objval, const int *result)
Definition: dualascent.c:1780
SCIP_RETCODE redcosts_initFromParams(SCIP *scip, const RCPARAMS *parameters, REDCOST **redcostdata)
Definition: redcosts.c:590
void redcosts_increaseOnDeletedArcsTop(const GRAPH *graph, const STP_Bool *arcsdeleted, REDCOST *redcostdata)
Definition: redcosts.c:728
SCIP_Bool reduce_sollocalUsesNodesol(const REDSOLLOCAL *)
Definition: reduce_sol.c:554
static SCIP_RETCODE computeSteinerTreeRedCosts(SCIP *scip, GRAPH *graph, const REDCOST *redcostdata, SCIP_Bool useSlackPrune, SCIP_Bool useRec, STPSOLPOOL *pool, int *result, int *bestresult, SCIP_Bool *havebestsol, SCIP_Real *bestobjval)
Definition: reduce_da.c:260
SCIP_RETCODE extreduce_pseudoDeleteNodes(SCIP *, const SCIP_Bool *, EXTPERMA *, GRAPH *, SCIP_Real *, int *)
Definition: extreduce_base.c:1668