Scippy

SCIP

Solving Constraint Integer Programs

dualascent.h File Reference

Detailed Description

Includes dual-ascent for classic Steiner tree and some variants.

Author
Daniel Rehfeldt

Definition in file dualascent.h.

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

Go to the source code of this file.

Data Structures

struct  reduce_cost_parameters
 

Typedefs

typedef struct reduce_cost_parameters DAPARAMS
 

Functions

SCIP_RETCODE dualascent_exec (SCIP *scip, const GRAPH *g, const int *result, const DAPARAMS *daparams, SCIP_Real *RESTRICT redcost, SCIP_Real *objval)
 
SCIP_RETCODE dualascent_execDegCons (SCIP *scip, const GRAPH *g, const int *result, const DAPARAMS *daparams, SCIP_Real *RESTRICT redcost, SCIP_Real *objval)
 
SCIP_RETCODE dualascent_update (SCIP *scip, const GRAPH *g, const int *result, const DAPARAMS *daparams, SCIP_Real *RESTRICT redcost, SCIP_Real *objval)
 
SCIP_RETCODE dualascent_execPcMw (SCIP *scip, GRAPH *g, SCIP_Real *redcost, SCIP_Real *objval, SCIP_Bool addcuts, SCIP_Bool ascendandprune, int nruns)
 
SCIP_RETCODE dualascent_pathsPcMw (SCIP *scip, const GRAPH *transgraph, SCIP_Real *RESTRICT redcost, SCIP_Real *objval, const int *result)
 
SCIP_RETCODE dualascent_paths (SCIP *scip, GRAPH *graph, SCIP_Real *RESTRICT redcost, SCIP_Real *objval, const int *result)
 
SCIP_Bool dualascent_allTermsReachable (SCIP *scip, const GRAPH *g, int root, const SCIP_Real *redcost)
 

Typedef Documentation

◆ DAPARAMS

reduced cost parameters

Function Documentation

◆ dualascent_exec()

SCIP_RETCODE dualascent_exec ( SCIP scip,
const GRAPH g,
const int *  result,
const DAPARAMS daparams,
SCIP_Real *RESTRICT  redcost,
SCIP_Real objval 
)

dual ascent heuristic

Parameters
scipSCIP data structure
ggraph data structure
resultsolution array or NULL
daparamsparameter
redcostarray to store reduced costs or NULL
objvalpointer to store objective value

Definition at line 1191 of file dualascent.c.

References daExec(), GRAPH::edges, FALSE, GRAPH::knots, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, and SCIPfreeBufferArray.

Referenced by computeDualSolution(), computeDualSolutionGuided(), computePertubedSol(), createInitialCuts(), reduce_daPcMw(), reduce_daSlackPrune(), runDualAscent(), termcompComputeSubgraphSol(), termcompReduceWithParams(), and updateSolution().

◆ dualascent_execDegCons()

SCIP_RETCODE dualascent_execDegCons ( SCIP scip,
const GRAPH g,
const int *  result,
const DAPARAMS daparams,
SCIP_Real *RESTRICT  redcost,
SCIP_Real objval 
)

dual-ascent for reduced costs

dual ascent heuristic for degree constrained problem

Parameters
scipSCIP data structure
ggraph data structure
resultsolution array or NULL
daparamsparameter
redcostarray to store reduced costs or NULL
objvalpointer to store objective value

Definition at line 1256 of file dualascent.c.

References reduce_cost_parameters::addcuts, BMScopyMemoryArray, GRAPH::cost, daExec(), EAT_LAST, FALSE, FARAWAY, graph_get_nEdges(), graph_get_nNodes(), graph_knot_isInRange(), Is_term, GRAPH::maxdeg, nnodes, NULL, GRAPH::oeat, GRAPH::outbeg, reduce_cost_parameters::root, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, GRAPH::source, STP_DCSTP, GRAPH::stp_type, and GRAPH::term.

Referenced by computeDualSolution(), computeDualSolutionGuided(), and createInitialCuts().

◆ dualascent_update()

SCIP_RETCODE dualascent_update ( SCIP scip,
const GRAPH g,
const int *  result,
const DAPARAMS daparams,
SCIP_Real *RESTRICT  redcost,
SCIP_Real objval 
)

updates reduced costs with dual ascent heuristic

Parameters
scipSCIP data structure
ggraph data structure
resultsolution array or NULL
daparamsparameter
redcostarray to store reduced costs
objvalpointer to store objective value

Definition at line 1225 of file dualascent.c.

References daExec(), dualascent_allTermsReachable(), GE, GRAPH::knots, reduce_cost_parameters::root, SCIP_CALL, SCIP_OKAY, and TRUE.

◆ dualascent_execPcMw()

SCIP_RETCODE dualascent_execPcMw ( SCIP scip,
GRAPH g,
SCIP_Real redcost,
SCIP_Real objval,
SCIP_Bool  addcuts,
SCIP_Bool  ascendandprune,
int  nruns 
)

dual ascent heuristic for the PCSPG and the MWCSP

dual ascent heuristic for PCSPG and MWCSP

Parameters
scipSCIP data structure
ggraph data structure
redcostarray to store reduced costs or NULL
objvalpointer to store objective value
addcutsshould dual-ascent add Steiner cuts?
ascendandpruneperform ascend-and-prune and add solution?
nrunsnumber of dual ascent runs

Definition at line 1319 of file dualascent.c.

References a, active, GRAPH::cost, dacons_linear, dacons_logicor, daconsCreateEmpty(), daconsGetParams(), DEFAULT_DAMAXDEVIATION, Graph_Node::dist, dualascent_allTermsReachable(), EAT_LAST, GRAPH::edges, FALSE, FARAWAY, GNODECmpByDist(), GRAPH::grad, graph_free(), graph_transPcGetSap(), GRAPH::head, GRAPH::ieat, GRAPH::inpbeg, Is_term, GRAPH::knots, GRAPH::mark, nnodes, nterms, NULL, Graph_Node::number, GRAPH::oeat, GRAPH::outbeg, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_STAGE_INITSOLVE, SCIPaddCoefLinear(), SCIPaddCoefLogicor(), SCIPaddCoefSetppc(), SCIPaddCons(), SCIPaddRow(), SCIPaddVarToRow(), SCIPallocBuffer, SCIPallocBufferArray, SCIPcacheRowExtensions(), SCIPcreateEmptyRowConshdlr(), SCIPdebugMessage, SCIPfindConshdlr(), SCIPflushRowExtensions(), SCIPfreeBuffer, SCIPfreeBufferArray, SCIPgetStage(), SCIPinfinity(), SCIPisEQ(), SCIPisGE(), SCIPisLE(), SCIPisLT(), SCIPisStopped(), SCIPisZero(), SCIPpqueueCreate(), SCIPpqueueFree(), SCIPpqueueInsert(), SCIPpqueueNElems(), SCIPpqueueRemove(), SCIPprobdataGetOffset(), SCIPprobdataGetVars(), SCIPreleaseCons(), SCIPreleaseRow(), SCIPStpHeurAscendPruneRun(), GRAPH::source, GRAPH::tail, GRAPH::term, GRAPH::terms, and TRUE.

Referenced by createInitialCuts(), and runDualAscent().

◆ dualascent_pathsPcMw()

SCIP_RETCODE dualascent_pathsPcMw ( SCIP scip,
const GRAPH transgraph,
SCIP_Real *RESTRICT  redcost,
SCIP_Real objval,
const int *  result 
)

path based dual ascent heuristic

Parameters
scipSCIP data structure
transgraphtransformed SAP graph
redcostarray to store reduced costs
objvalpointer to store (dual) objective value
resultsolution array or NULL

Definition at line 1780 of file dualascent.c.

References dapathsFreeMembers(), dapathsInit(), dapathsRunShortestPaths(), NULL, SCIP_CALL, SCIP_OKAY, and TRUE.

Referenced by reduce_daPcMw(), and testDaPathsPcMw3EdgesWorks().

◆ dualascent_paths()

SCIP_RETCODE dualascent_paths ( SCIP scip,
GRAPH graph,
SCIP_Real *RESTRICT  redcost,
SCIP_Real objval,
const int *  result 
)

path based dual ascent heuristic

Parameters
scipSCIP data structure
graphgraph
redcostarray to store reduced costs
objvalpointer to store (dual) objective value
resultsolution array or NULL

Definition at line 1803 of file dualascent.c.

References dapathsFreeMembers(), dapathsInit(), dapathsRunShortestPaths(), dapathsSortStarts(), FALSE, graph_pc_2transcheck(), graph_pc_isPcMw(), graph_pc_isRootedPcMw(), NULL, SCIP_CALL, and SCIP_OKAY.

Referenced by reduce_dapaths().

◆ dualascent_allTermsReachable()

SCIP_Bool dualascent_allTermsReachable ( SCIP scip,
const GRAPH g,
int  root,
const SCIP_Real redcost 
)

can all terminal be reached via reduced costs from given root?

Parameters
scipSCIP
ggraph
rootroot for reduced costs
redcostreduced costs

Definition at line 1835 of file dualascent.c.

References a, BMSclearMemoryArray, EAT_LAST, graph_get_nNodes(), graph_knot_isInRange(), GRAPH::head, Is_term, GRAPH::oeat, GRAPH::outbeg, SCIP_CALL_ABORT, SCIPallocMemoryArray, SCIPfreeMemoryArray, SCIPisZero(), GRAPH::term, GRAPH::terms, and TRUE.

Referenced by daExec(), dualascent_execPcMw(), dualascent_update(), reduce_daPcMw(), and reduce_daSlackPrune().