heur_lurkprune.c
Go to the documentation of this file.
20 * This file implements a reduction based heuristic for Steiner problems that makes use of lurking bounds.
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
54 #define HEUR_TIMING (SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_AFTERLPLOOP | SCIP_HEURTIMING_AFTERNODE)
57 #define DEFAULT_LURKPRUNE_MAXFREQ FALSE /**< executions of the heuristic at maximum frequency? */
59 #define LURKPRUNE_MINREDELIMS 10 /**< minimum number of eliminations for reduction package when called by lurk-and-prune heuristic */
60 #define LURKPRUNE_MAXREDROUNDS 10 /**< maximum number of reduction rounds in lurk-prune heuristic */
62 #define LURKPRUNE_MINSTALLPROPORTION 0.25 /**< minimum proportion of arcs to be fixed before restarting lurk-prune heuristic */
63 #define LURKPRUNE_MAXSTALLPROPORTION 0.5 /**< maximum proportion of arcs to be fixed before restarting lurk-prune heuristic */
267 RPARAMS parameters = { .dualascent = FALSE, .boundreduce = FALSE, .nodereplacing = TRUE, .reductbound_min = LURKPRUNE_MINREDELIMS,
268 .reductbound = LURKPRUNE_MINREDELIMS, .userec = FALSE, .fullreduce = FALSE, .usestrongreds = TRUE };
357 SCIPdebugMessage("first/last %f %f \n", lurkingbounds_local[0], lurkingbounds_local[nedges / 2 - 1]);
460 SCIP_CALL( SCIPStpHeurAscendPruneRun(scip, NULL, prunegraph, redcost, soledge, -1, &success, FALSE) );
475 SCIP_CALL( SCIPStpHeurTMRun(scip, pcmode_fromheurdata, prunegraph, starts, NULL, soledge, nruns,
551 /** solving process initialization method of primal heuristic (called when branch and bound process is about to begin) */
572 /** solving process deinitialization method of primal heuristic (called before branch and bound process data is freed) */
663 SCIP_CALL( SCIPStpHeurLurkPruneRun(scip, vars, NULL, graph, FALSE, (graph->edges < LURK_MAXTOTNEDGES), soledge, &success) );
689 SCIPdebugMessage("SP final solution: best: old %f, new %f \n", SCIPgetSolOrigObj(scip, bestsol), pobj + SCIPprobdataGetOffset(scip));
697 SCIPdebugMessage("better solution added by LURKPRUNE %f \n", pobj + SCIPprobdataGetOffset(scip));
SCIP_RETCODE SCIPsetHeurExitsol(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEUREXITSOL((*heurexitsol)))
Definition: scip_heur.c:233
Definition: misc_stp.h:88
static SCIP_RETCODE prunegraphInit(SCIP *scip, const GRAPH *g, GRAPH **prunegraph)
Definition: heur_lurkprune.c:103
Definition: type_result.h:33
Definition: type_result.h:47
Definition: graphdefs.h:184
Definition: struct_scip.h:59
static SCIP_DECL_HEUREXITSOL(heurExitsolLurkPrune)
Definition: heur_lurkprune.c:574
SCIP_RETCODE SCIPStpHeurPruneUpdateSols(SCIP *scip, GRAPH *g, GRAPH *prunegraph, int *solnode, int *soledge, int *globalsoledge, SCIP_Real *globalobj, SCIP_Bool incumbentgiven, SCIP_Bool *success)
Definition: heur_prune.c:489
Constraint handler for Steiner problems.
SCIP_RETCODE reduce_solInit(SCIP *, const GRAPH *, SCIP_Bool, REDSOL **)
Definition: reduce_sol.c:687
Definition: dualascent.h:39
SCIP_RETCODE reduce_redLoopPc(SCIP *, REDSOL *, GRAPH *, PATH *, PATH *, SCIP_Real *, int *, int *, int *, int *, int *, int *, STP_Bool *, SCIP_Bool, SCIP_Bool, SCIP_Bool, int, SCIP_Bool, SCIP_Bool, SCIP_Bool)
Definition: reduce_base.c:1896
Definition: struct_var.h:198
includes methods for Steiner tree problem solutions
SCIP_RETCODE SCIPStpHeurLurkPruneRun(SCIP *scip, SCIP_VAR **vars, const SCIP_Real *lurkingbounds, GRAPH *g, SCIP_Bool initialreduce, SCIP_Bool ascendprune, int *soledge, SCIP_Bool *solimproved)
Definition: heur_lurkprune.c:731
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
Includes dual-ascent for classic Steiner tree and some variants.
static SCIP_RETCODE reduceLurk(SCIP *scip, LURKPRUNE *lurkprune, GRAPH *prunegraph, SCIP_Bool *success)
Definition: heur_lurkprune.c:300
Problem data for stp problem.
includes various files containing graph methods used for Steiner tree problems
SCIP_RETCODE reduce_redLoopMw(SCIP *, REDSOL *, GRAPH *, PATH *, SCIP_Real *, int *, int *, int *, STP_Bool *, STP_Bool, STP_Bool, STP_Bool, int, SCIP_Bool, SCIP_Bool)
Definition: reduce_base.c:1771
Definition: graphdefs.h:284
static void lurkpruneFinalize(SCIP *scip, const GRAPH *g, GRAPH *prunegraph, int *soledge, LURKPRUNE *lurkprune, SCIP_Bool *solimproved)
Definition: heur_lurkprune.c:192
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 SCIPsortDownRealInt(SCIP_Real *realarray, int *intarray, int len)
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
Definition: heur.c:1362
Definition: reducedefs.h:100
GRAPH * SCIPprobdataGetGraph(SCIP_PROBDATA *probdata)
Definition: probdata_stp.c:2948
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 SCIP_DECL_HEURINITSOL(heurInitsolLurkPrune)
Definition: heur_lurkprune.c:553
Definition: struct_sol.h:64
Definition: heur_tm.h:48
SCIP_Bool graph_pc_edgeIsExtended(const GRAPH *, int)
Definition: graph_pcbase.c:1232
SCIP_RETCODE SCIPsetHeurInitsol(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINITSOL((*heurinitsol)))
Definition: scip_heur.c:217
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 SCIPStpHeurTMCompStarts(GRAPH *graph, int *starts, int *runs)
Definition: heur_tm.c:2879
Definition: reduce_sol.c:70
SCIP_RETCODE SCIPprobdataAddNewSol(SCIP *scip, SCIP_Real *nval, SCIP_HEUR *heur, SCIP_Bool *success)
Definition: probdata_stp.c:3693
SCIP_RETCODE SCIPStpHeurLocalRun(SCIP *scip, GRAPH *graph, int *solEdges)
Definition: heur_local.c:3899
Definition: type_retcode.h:33
Definition: reducedefs.h:75
SCIP_RETCODE SCIPStpIncludeHeurLurkPrune(SCIP *scip)
Definition: heur_lurkprune.c:792
Definition: struct_heur.h:88
Improvement heuristic for Steiner problems.
reduction-based primal heuristic for Steiner problems
static SCIP_RETCODE lurkpruneInit(SCIP *scip, const GRAPH *g, const SCIP_Real *lurkingbounds, int *soledge, LURKPRUNE *lurkprune, GRAPH **prunegraph)
Definition: heur_lurkprune.c:122
SCIP_Real solstp_getObjBounded(const GRAPH *g, const int *soledge, SCIP_Real offset, int nedges)
Definition: solstp.c:1833
propagator for Steiner tree problems, using the LP reduced costs
struct lurking_prune LURKPRUNE
Constraint handler for linear constraints in their most general form, .
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:477
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))
Definition: scip_heur.c:185
SCIP_Real * SCIPprobdataGetXval(SCIP *scip, SCIP_SOL *sol)
Definition: probdata_stp.c:3190
shortest paths based primal heuristics for Steiner problems
reduction based primal heuristic for Steiner problems
static void reduceFixedVars(SCIP *scip, SCIP_VAR **vars, const int *soledge, GRAPH *prunegraph)
Definition: heur_lurkprune.c:403
static SCIP_RETCODE updateSolution(SCIP *scip, GRAPH *g, LURKPRUNE *lurkprune, GRAPH *prunegraph)
Definition: heur_lurkprune.c:434
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))
Definition: scip_heur.c:153
static SCIP_RETCODE reduceExact(SCIP *scip, LURKPRUNE *lurkprune, GRAPH *prunegraph)
Definition: heur_lurkprune.c:220
SCIP_RETCODE reduce_redLoopStp(SCIP *, GRAPH *, REDBASE *)
Definition: reduce_base.c:2074
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
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
Definition: heur_lurkprune.c:80