heur_ascendprune.c
Go to the documentation of this file.
28 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
56 #define HEUR_TIMING (SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_AFTERLPLOOP | SCIP_HEURTIMING_AFTERNODE)
60 #define ASCENPRUNE_MINLPIMPROVE 0.2 /**< minimum percentual improvement of dual bound (wrt to gap) mandatory to execute heuristic */
274 /* NOTE: we need to be careful to not mark anti-parallel edges. We also do not mark out-going edges from the root */
626 SCIPdebugMessage("obj after prune %f \n", solstp_getObjBounded(newgraph, result, 0.0, newgraph->edges));
630 SCIPdebugMessage("obj after local %f \n", solstp_getObjBounded(newgraph, result, 0.0, newgraph->edges));
688 subgraph, startstm, NULL, subresult, runstm, subgraph->source, cost, costrev, &hopfactor, NULL, solfound) );
753 subgraph, NULL, NULL, subresult, runstm, subgraph->source, cost, costrev, NULL, NULL, solfound) );
913 SCIP_CALL( SCIPStpHeurAscendPruneRun(scip, heur, graph, redcosts, edgearrint, graph->source, &solAdded, TRUE) );
951 RCGRAPH redcostgraph = { .newgraph = NULL, .redcosts = redcosts, .edgelist = NULL, .nodeOrg2NewMap = NULL, .edgeNew2OrgMap = NULL,
SCIP_RETCODE SCIPStpHeurPruneRun(SCIP *scip, SCIP_VAR **vars, GRAPH *g, int *soledge, SCIP_Bool *success, const SCIP_Bool withinitialsol, const SCIP_Bool reducegraph)
Definition: heur_prune.c:599
Definition: type_result.h:33
Definition: type_result.h:47
Definition: graphdefs.h:184
static SCIP_RETCODE redcostGraphSolRetransform(SCIP *scip, const GRAPH *g, const RCGRAPH *redcostgraph, const int *subresult, int *result)
Definition: heur_ascendprune.c:513
Definition: struct_scip.h:59
static SCIP_RETCODE redcostGraphComputeSteinerTree(SCIP *scip, const GRAPH *g, RCGRAPH *redcostgraph, int *result)
Definition: heur_ascendprune.c:595
Constraint handler for Steiner problems.
static int redcostGetNTermsMarked(const GRAPH *g, const RCGRAPH *redcostgraph)
Definition: heur_ascendprune.c:189
Definition: struct_var.h:198
includes methods for Steiner tree problem solutions
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
reduction and dual-cost based primal heuristic for Steiner problems
Problem data for stp problem.
includes various files containing graph methods used for Steiner tree problems
static SCIP_RETCODE redcostGraphBuild(SCIP *scip, const GRAPH *g, RCGRAPH *redcostgraph)
Definition: heur_ascendprune.c:342
SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
Definition: scip_heur.c:108
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
Definition: heur.c:1362
GRAPH * SCIPprobdataGetGraph(SCIP_PROBDATA *probdata)
Definition: probdata_stp.c:2948
Definition: struct_sol.h:64
SCIP_RETCODE graph_pc_initSubgraph(SCIP *, GRAPH *)
Definition: graph_pcbase.c:763
Definition: heur_tm.h:48
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 SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree)))
Definition: scip_heur.c:169
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:451
void graph_edge_addSubgraph(SCIP *, const GRAPH *, const int *, int, GRAPH *)
Definition: graph_edge.c:341
void SCIPStpHeurTMCompStarts(GRAPH *graph, int *starts, int *runs)
Definition: heur_tm.c:2879
static void redcostGraphFree(SCIP *scip, RCGRAPH *redcostgraph)
Definition: heur_ascendprune.c:496
SCIP_RETCODE SCIPStpHeurLocalRun(SCIP *scip, GRAPH *graph, int *solEdges)
Definition: heur_local.c:3899
Definition: type_retcode.h:33
Definition: heur_ascendprune.c:81
Definition: struct_heur.h:88
Improvement heuristic for Steiner problems.
includes solution pool for Steiner tree problems
reduction-based primal heuristic for Steiner problems
Definition: type_retcode.h:34
void solstp_getTrivialSol(const GRAPH *g, int *soledge)
Definition: solstp.c:2020
SCIP_Real solstp_getObjBounded(const GRAPH *g, const int *soledge, SCIP_Real offset, int nedges)
Definition: solstp.c:1833
SCIP_RETCODE graph_pc_finalizeSubgraph(SCIP *, GRAPH *)
Definition: graph_pcbase.c:795
static SCIP_RETCODE redcostGraphComputeSteinerTreeDirected(SCIP *scip, const GRAPH *g, RCGRAPH *redcostgraph, int *result, SCIP_Bool *solfound)
Definition: heur_ascendprune.c:643
SCIP_RETCODE SCIPStpIncludeHeurAscendPrune(SCIP *scip)
Definition: heur_ascendprune.c:1015
void graph_getEdgeCosts(const GRAPH *, SCIP_Real *RESTRICT, SCIP_Real *RESTRICT)
Constraint handler for linear constraints in their most general form, .
SCIP_RETCODE reduce_unconnectedForDirected(SCIP *, GRAPH *)
Definition: reduce_simple.c:1134
SCIP_Bool redcosts_forLPareAvailable(SCIP *scip)
Definition: redcosts.c:767
Reduced cost based routines for Steiner problems.
struct redcost0_graph RCGRAPH
static SCIP_RETCODE redcostGraphMark(SCIP *scip, const GRAPH *g, RCGRAPH *redcostgraph)
Definition: heur_ascendprune.c:210
SCIP_Bool graph_pc_knotIsDummyTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1344
SCIP_Bool graph_pc_knotIsFixedTerm(const GRAPH *, int)
Definition: graph_pcbase.c:1257
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))
Definition: scip_heur.c:185
SCIP_RETCODE solstp_reroot(SCIP *scip, const GRAPH *g, int *result, int newroot)
Definition: solstp.c:1559
shortest paths based primal heuristics for Steiner problems
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))
Definition: scip_heur.c:153
SCIP_Bool solstp_isValid(SCIP *scip, const GRAPH *graph, const int *result)
Definition: solstp.c:1650
static SCIP_RETCODE redcostGraphComputeSteinerTreeDegCons(SCIP *scip, const GRAPH *g, RCGRAPH *redcostgraph, int *result, SCIP_Bool *solfound)
Definition: heur_ascendprune.c:719
Definition: objbenders.h:33
SCIP_RETCODE solstp_prune(SCIP *scip, const GRAPH *g, int *result, STP_Bool *connected)
Definition: solstp.c:1366
SCIP_RETCODE solpool_addSolToScip(SCIP *scip, SCIP_HEUR *heur, const GRAPH *g, const int *result, SCIP_Bool *success)
Definition: solpool.c:150
includes various reduction methods for Steiner tree problems
default SCIP plugins
SCIP_Real solstp_getObj(const GRAPH *g, const int *soledge, SCIP_Real offset)
Definition: solstp.c:1859
SCIP callable library.
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
Definition: scip_param.c:48
void redcosts_forLPget(SCIP *scip, SCIP_VAR **vars, const GRAPH *graph, SCIP_Real *redcosts)
Definition: redcosts.c:861