Scippy

SCIP

Solving Constraint Integer Programs

heur_tm.h File Reference

Detailed Description

shortest paths based primal heuristics for Steiner problems

Author
Gerald Gamrath
Thorsten Koch
Daniel Rehfeldt
Michael Winkler

This file implements several shortest paths based primal heuristics for Steiner problems, see "SCIP-Jack - A solver for STP and variants with parallelization extensions" by Gamrath, Koch, Maher, Rehfeldt and Shinano

Definition in file heur_tm.h.

#include "scip/scip.h"
#include "graph.h"

Go to the source code of this file.

Macros

#define DEFAULT_HOPFACTOR   0.33
 

Enumerations

enum  PCMW_TmMode {
  pcmode_simple = 0,
  pcmode_bias = 1,
  pcmode_biasfull = 2,
  pcmode_fulltree = 3,
  pcmode_all = 4,
  pcmode_biasAndFulltree = 5,
  pcmode_fromheurdata = 6
}
 

Functions

void SCIPStpHeurTMCompStarts (GRAPH *graph, int *starts, int *runs)
 
SCIP_RETCODE SCIPStpIncludeHeurTM (SCIP *scip)
 
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)
 
SCIP_RETCODE SCIPStpHeurTMRunLP (SCIP *scip, GRAPH *graph, SCIP_HEUR *heur, int *result, int runs, SCIP_Bool *success)
 
SCIP_RETCODE SCIPStpHeurTMBuildTreePcMw (SCIP *scip, const GRAPH *g, SCIP_Bool useRootSym, PATH *mst, const SCIP_Real *cost, SCIP_Real *objresult, int *connected)
 
void SCIPStpHeurTMBuildTree (SCIP *scip, GRAPH *g, PATH *mst, const SCIP_Real *cost, SCIP_Real *objresult, int *connected)
 
SCIP_RETCODE SCIPStpHeurTMBuildTreeDc (SCIP *scip, const GRAPH *g, int *result, STP_Bool *connected)
 

Macro Definition Documentation

◆ DEFAULT_HOPFACTOR

#define DEFAULT_HOPFACTOR   0.33

Definition at line 42 of file heur_tm.h.

Referenced by dhcstpWarmUp(), reduce_boundHopRc(), and SCIPStpIncludeHeurTM().

Enumeration Type Documentation

◆ PCMW_TmMode

TM mode for PC/MW NOTE: bias_simple is only used for PC/RPC

Enumerator
pcmode_simple 
pcmode_bias 
pcmode_biasfull 
pcmode_fulltree 
pcmode_all 
pcmode_biasAndFulltree 
pcmode_fromheurdata 

Definition at line 47 of file heur_tm.h.

Function Documentation

◆ SCIPStpHeurTMCompStarts()

void SCIPStpHeurTMCompStarts ( GRAPH graph,
int *  starts,
int *  runs 
)

compute starting points among marked (w.r.t. g->mark) vertices for constructive heuristics

Parameters
graphgraph data structure
startsstarting points array
runspointer to number of runs

Definition at line 2879 of file heur_tm.c.

References Is_term, GRAPH::knots, GRAPH::mark, nnodes, TM_base_data::nruns, nterms, NULL, r, GRAPH::source, GRAPH::term, and GRAPH::terms.

Referenced by computeNewSols(), computeSteinerTree(), computeSteinerTreeTM(), redcostGraphComputeSteinerTreeDirected(), and updateSolution().

◆ SCIPStpIncludeHeurTM()

◆ SCIPStpHeurTMRun()

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 
)

execute shortest paths heuristic to obtain a Steiner tree

Parameters
scipSCIP data structure
pcmw_tmmodemode for PC/MW
graphgraph data structure
startsarray containing start vertices (NULL to not provide any)
prizeprizes (for PCMW) or NULL
best_resultarray indicating whether an arc is part of the solution (CONNECTED/UNKNOWN)
runsnumber of runs
bestincstartbest incumbent start vertex
costarc costs
costrevreversed arc costs
hopfactoredge cost multiplicator for HC problems
nodepriorityvertex priorities for vertices to be starting points (NULL for no priorities)
successpointer to store whether a solution could be found

Definition at line 3418 of file heur_tm.c.

References TM_base_data::best_result, computeStarts(), TM_base_data::cost, TM_base_data::costrev, TM_base_data::dheap, FALSE, FARAWAY, getTMheurData(), getTmMode(), graph_get_nEdges(), graph_pc_2transcheck(), graph_pc_isPcMw(), graph_printInfoReduced(), NULL, runTm(), runTmDhcstp(), runTmPcMW(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPisGE(), solstp_getObj(), GRAPH::source, STP_DHCSTP, GRAPH::stp_type, TM_SP, TM_VORONOI, tmAllspFree(), tmAllspInit(), tmBaseFree(), tmBaseInit(), tmVnoiFree(), and tmVnoiInit().

Referenced by computeNewSols(), computeReducedProbSolutionBiased(), computeSteinerTree(), computeSteinerTreeTM(), createInitialCuts(), daPcAddTmSolToPool(), redcostGraphComputeSteinerTreeDegCons(), redcostGraphComputeSteinerTreeDirected(), reduce_boundHopRc(), runTmPcFull(), SCIPStpHeurRecExclude(), SCIPStpHeurTMRunLP(), and updateSolution().

◆ SCIPStpHeurTMRunLP()

SCIP_RETCODE SCIPStpHeurTMRunLP ( SCIP scip,
GRAPH graph,
SCIP_HEUR heur,
int *  result,
int  runs,
SCIP_Bool success 
)

◆ SCIPStpHeurTMBuildTreePcMw()

SCIP_RETCODE SCIPStpHeurTMBuildTreePcMw ( SCIP scip,
const GRAPH g,
SCIP_Bool  useRootSym,
PATH mst,
const SCIP_Real cost,
SCIP_Real objresult,
int *  connected 
)

build (rooted) prize collecting Steiner tree in such a way that all leaves are positive-weight vertices

build (rooted) prize collecting Steiner tree in such a way that all leaves are terminals; objresult is set FARAWAY if infeasible

Parameters
scipSCIP data structure
ggraph structure
useRootSymuse?
mstpath data structure array
costedge costs
objresultpointer to store objective value of result
connectedCONNECT/UNKNOWN

Definition at line 3012 of file heur_tm.c.

References a, CONNECT, EAT_LAST, shortest_path::edge, GRAPH::extended, FALSE, FARAWAY, graph_path_exec(), graph_pc_isRootedPcMw(), graph_pc_isUnrootedPcMw(), graph_pc_knotIsDummyTerm(), graph_pc_knotIsFixedTerm(), GRAPH::head, GRAPH::ieat, GRAPH::inpbeg, Is_pseudoTerm, Is_term, GRAPH::knots, GRAPH::mark, MST_MODE, nnodes, NULL, GRAPH::oeat, GRAPH::outbeg, GRAPH::path_state, SCIP_Bool, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPprobdataGetNNodes(), SCIPprobdataGetNTerms(), SCIPprobdataGetPctermsorder(), GRAPH::source, GRAPH::tail, GRAPH::term, GRAPH::terms, TRUE, and UNKNOWN.

Referenced by nodesolUpdate(), and SCIPStpHeurPruneUpdateSols().

◆ SCIPStpHeurTMBuildTree()

void SCIPStpHeurTMBuildTree ( SCIP scip,
GRAPH g,
PATH mst,
const SCIP_Real cost,
SCIP_Real objresult,
int *  connected 
)

build Steiner tree in such a way that all leaves are terminals

Parameters
scipSCIP data structure
ggraph structure
mstpath data structure array
costedge costs
objresultpointer to store objective value of result
connectedCONNECT/UNKNOWN

Definition at line 2932 of file heur_tm.c.

References CONNECT, EAT_LAST, shortest_path::edge, FALSE, FARAWAY, graph_path_exec(), graph_pc_isPcMw(), GRAPH::head, Is_term, GRAPH::knots, GRAPH::mark, MST_MODE, nnodes, NULL, GRAPH::oeat, GRAPH::outbeg, SCIP_Real, GRAPH::source, GRAPH::term, and UNKNOWN.

Referenced by nodesolUpdate(), and SCIPStpHeurPruneUpdateSols().

◆ SCIPStpHeurTMBuildTreeDc()

SCIP_RETCODE SCIPStpHeurTMBuildTreeDc ( SCIP scip,
const GRAPH g,
int *  result,
STP_Bool connected 
)

prune a degree constrained Steiner tree in such a way that all leaves are terminals

Parameters
scipSCIP data structure
ggraph structure
resultST edges
connectedST nodes (to be set)

Definition at line 3226 of file heur_tm.c.

References CONNECT, GRAPH::cost, EAT_LAST, FALSE, flipedge, GRAPH::head, GRAPH::ieat, GRAPH::inpbeg, Is_term, GRAPH::knots, LT, GRAPH::maxdeg, nnodes, NULL, GRAPH::oeat, GRAPH::outbeg, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPdebug, SCIPfreeBufferArray, GRAPH::source, GRAPH::term, TRUE, and UNKNOWN.

Referenced by computeDegConsTree(), and SCIPStpHeurRecRun().