Scippy

SCIP

Solving Constraint Integer Programs

probdata_stp.c File Reference

Detailed Description

Problem data for Steiner problems.

Author
Gerald Gamrath
Thorsten Koch
Michael Winkler
Daniel Rehfeldt

This file implements the problem data for Steiner problems. For more details see Main problem data page.

Definition in file probdata_stp.c.

#include <string.h>
#include "probdata_stp.h"
#include <stdio.h>
#include "cons_stp.h"
#include "dualascent.h"
#include "graph.h"
#include "reduce.h"
#include "stptest.h"
#include "solstp.h"
#include "solpool.h"
#include "solhistory.h"
#include "cons_stpcomponents.h"
#include "scip/cons_linear.h"
#include "scip/cons_setppc.h"
#include "scip/misc.h"
#include "scip/struct_misc.h"
#include "heur_tm.h"
#include "heur_slackprune.h"
#include "relax_stpdp.h"

Go to the source code of this file.

Macros

#define VERSION_SCIPJACK   "2.0"
 
#define STP_SYM_PRIZE
 
#define STP_AGG_SYM
 
#define FLOWB   FALSE
 
#define USEOFFSETVAR   FALSE
 
#define SYM_CONS_LIMIT   20000
 
#define CYC_CONS_LIMIT   10000
 
#define CUT_MINREDUCTION_RATIO   0.95
 
#define MINREDUCTION_RATIO_STP   0.90
 
#define MINREDUCTION_RATIO_PCMW   0.85
 
#define CUT_MAXNTERMINALS   500
 
#define CUT_MAXNEDGES   10000
 
#define CUT_MAXTOTNEDGES   50000
 
#define CUT_MINTOTNEDGES   12000
 

Functions

Local methods
static void writeCommentSection (SCIP *scip, GRAPH *graph, const char *filename)
 
static SCIP_RETCODE probdataCreate (SCIP *scip, SCIP_PROBDATA **probdata, GRAPH *graph)
 
static SCIP_RETCODE setStpSolvingMode (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE addRedsol (SCIP *scip, SCIP_PROBDATA *probdata, REDSOL *redsol)
 
static SCIP_RETCODE presolveStp (SCIP *scip, SCIP_PROBDATA *probdata, REDSOL *redsol)
 
static SCIP_RETCODE freeConstraintsCutModel (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE freeConstraintsNonCutModel (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE probdataFree (SCIP *scip, SCIP_PROBDATA **probdata)
 
static SCIP_RETCODE createHopConstraint (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE createBudgetConstraint (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE createDegreeConstraints (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE createPrizeConstraints (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE createConstraints (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE createVariables (SCIP *scip, SCIP_PROBDATA *probdata, SCIP_Real offset)
 
static SCIP_RETCODE createModel (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_RETCODE createLogfile (SCIP *scip, SCIP_PROBDATA *probdata, const char *intlogfilename, const char *logfilename, const char *filename, const char *probname)
 
static SCIP_RETCODE createInitialCuts (SCIP *scip, SCIP_PROBDATA *probdata)
 
static SCIP_Real getEdgeReductionRatio (SCIP_PROBDATA *probdata, const GRAPH *graph)
 
static SCIP_Bool setParamsSepaIsBad (SCIP_PROBDATA *probdata)
 
static int sepaBadGetZeroHalfMaxrounds (const GRAPH *g)
 
static SCIP_RETCODE setParams (SCIP *scip, SCIP_PROBDATA *probdata, int symcons, int cyclecons)
 
Callback methods of problem data
static SCIP_DECL_PROBCOPY (probcopyStp)
 
static SCIP_DECL_PROBDELORIG (probdelorigStp)
 
static SCIP_DECL_PROBTRANS (probtransStp)
 
static SCIP_DECL_PROBINITSOL (probinitsolStp)
 
static SCIP_DECL_PROBEXITSOL (probexitsolStp)
 
static SCIP_DECL_PROBDELTRANS (probdeltransStp)
 
Interface methods
SCIP_RETCODE SCIPprobdataSetDefaultParams (SCIP *scip)
 
SCIP_RETCODE SCIPprobdataCreate (SCIP *scip, const char *filename)
 
SCIP_RETCODE SCIPprobdataCreateFromGraph (SCIP *scip, SCIP_Real offset, const char *probname, SCIP_Bool isSubProb, GRAPH *graph_move)
 
void SCIPprobdataSetGraph (SCIP_PROBDATA *probdata, GRAPH *graph)
 
GRAPHSCIPprobdataGetGraph (SCIP_PROBDATA *probdata)
 
GRAPHSCIPprobdataGetGraph2 (SCIP *scip)
 
void SCIPprobdataSetOffset (SCIP_PROBDATA *probdata, SCIP_Real offset)
 
int SCIPprobdataGetNVars (SCIP *scip)
 
SCIP_VAR ** SCIPprobdataGetVars (SCIP *scip)
 
int SCIPprobdataGetNLayers (SCIP *scip)
 
int SCIPprobdataGetNEdges (SCIP *scip)
 
int SCIPprobdataGetNNodes (SCIP *scip)
 
int SCIPprobdataGetNTerms (SCIP *scip)
 
int SCIPprobdataGetRNTerms (SCIP *scip)
 
int SCIPprobdataGetRoot (SCIP *scip)
 
int SCIPprobdataGetNorgEdges (SCIP *scip)
 
SCIP_Real SCIPprobdataGetOffset (SCIP *scip)
 
SCIP_Real SCIPprobdataGetPresolUpperBound (SCIP *scip)
 
SCIP_Real SCIPprobdataGetPresolUpperBoundWithOffset (SCIP *scip)
 
SCIP_VARSCIPprobdataGetedgeVarByIndex (SCIP *scip, int idx)
 
SCIP_RealSCIPprobdataGetXval (SCIP *scip, SCIP_SOL *sol)
 
SCIP_CONS ** SCIPprobdataGetEdgeConstraints (SCIP *scip)
 
SCIP_CONS ** SCIPprobdataGetPathConstraints (SCIP *scip)
 
int * SCIPprobdataGetRTerms (SCIP *scip)
 
int * SCIPprobdataGetPctermsorder (SCIP *scip)
 
SCIP_VAR ** SCIPprobdataGetEdgeVars (SCIP *scip)
 
SCIP_Bool SCIPprobdataIsBigt (SCIP *scip)
 
SCIP_Bool SCIPprobdataObjIsIntegral (SCIP *scip)
 
SCIP_Bool SCIPprobdataProbIsAdversarial (SCIP *scip)
 
SCIP_Bool SCIPprobdataIsSubproblem (SCIP *scip)
 
SCIP_RETCODE SCIPprobdataPrintGraph (SCIP *scip, const char *filename, SCIP_SOL *sol, SCIP_Bool printsol)
 
SCIP_RETCODE SCIPprobdataWriteIntermediateSolution (SCIP *scip)
 
SCIP_RETCODE SCIPprobdataWriteSolution (SCIP *scip, FILE *file)
 
void SCIPprobdataWriteLogLine (SCIP *scip, const char *formatstr,...)
 
SCIP_RETCODE SCIPprobdataAddNewSol (SCIP *scip, SCIP_Real *nval, SCIP_HEUR *heur, SCIP_Bool *success)
 
int SCIPprobdataGetType (SCIP *scip)
 
SCIP_RETCODE SCIPprobdataWriteLogfileEnd (SCIP *scip)
 
void SCIPprobdataSetDualBound (SCIP *scip, SCIP_Real dual)
 
void SCIPprobdataSetNSolvers (SCIP *scip, int nSolvers)
 
void initReceivedSubproblem (SCIP *scip, const int lLinearConsNames, const char *linearConsNames, const int lSetppcConsNames, const char *setppcConsNames)
 

Macro Definition Documentation

◆ VERSION_SCIPJACK

#define VERSION_SCIPJACK   "2.0"

Definition at line 65 of file probdata_stp.c.

Referenced by writeCommentSection().

◆ STP_SYM_PRIZE

#define STP_SYM_PRIZE

Definition at line 67 of file probdata_stp.c.

◆ STP_AGG_SYM

#define STP_AGG_SYM

Definition at line 68 of file probdata_stp.c.

◆ FLOWB

#define FLOWB   FALSE

Definition at line 70 of file probdata_stp.c.

◆ USEOFFSETVAR

#define USEOFFSETVAR   FALSE

Definition at line 71 of file probdata_stp.c.

◆ SYM_CONS_LIMIT

#define SYM_CONS_LIMIT   20000

maximum number of symmetry inequalities for MWCSP and PCSPG

Definition at line 73 of file probdata_stp.c.

Referenced by setParams().

◆ CYC_CONS_LIMIT

#define CYC_CONS_LIMIT   10000

maximum number of symmetry inequalities for PCSPG

Definition at line 74 of file probdata_stp.c.

Referenced by setParams().

◆ CUT_MINREDUCTION_RATIO

#define CUT_MINREDUCTION_RATIO   0.95

Definition at line 76 of file probdata_stp.c.

Referenced by setParamsSepaIsBad().

◆ MINREDUCTION_RATIO_STP

#define MINREDUCTION_RATIO_STP   0.90

Definition at line 77 of file probdata_stp.c.

Referenced by SCIPprobdataProbIsAdversarial().

◆ MINREDUCTION_RATIO_PCMW

#define MINREDUCTION_RATIO_PCMW   0.85

Definition at line 78 of file probdata_stp.c.

Referenced by SCIPprobdataProbIsAdversarial().

◆ CUT_MAXNTERMINALS

#define CUT_MAXNTERMINALS   500

Definition at line 79 of file probdata_stp.c.

Referenced by setParamsSepaIsBad().

◆ CUT_MAXNEDGES

#define CUT_MAXNEDGES   10000

Definition at line 80 of file probdata_stp.c.

Referenced by setParamsSepaIsBad().

◆ CUT_MAXTOTNEDGES

#define CUT_MAXTOTNEDGES   50000

Definition at line 81 of file probdata_stp.c.

Referenced by setParamsSepaIsBad().

◆ CUT_MINTOTNEDGES

#define CUT_MINTOTNEDGES   12000

Definition at line 82 of file probdata_stp.c.

Referenced by setParamsSepaIsBad().

Function Documentation

◆ writeCommentSection()

static void writeCommentSection ( SCIP scip,
GRAPH graph,
const char *  filename 
)
static
Parameters
scipSCIP data structure
graphgraph data structure
filenameproblem file name

Definition at line 164 of file probdata_stp.c.

References SCIPprobdataWriteLogLine(), STP_BRMWCSP, STP_DCSTP, STP_DHCSTP, STP_MWCSP, STP_NWSPG, STP_OARSMT, STP_PCSPG, STP_RMWCSP, STP_RPCSPG, STP_RSMT, STP_SAP, STP_SPG, GRAPH::stp_type, and VERSION_SCIPJACK.

Referenced by SCIPprobdataCreate().

◆ probdataCreate()

static SCIP_RETCODE probdataCreate ( SCIP scip,
SCIP_PROBDATA **  probdata,
GRAPH graph 
)
static

creates problem data

Parameters
scipSCIP data structure
probdatapointer to problem data
graphgraph data structure

Definition at line 238 of file probdata_stp.c.

References FALSE, FARAWAY, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocMemory, STP_SPG, and GRAPH::stp_type.

Referenced by SCIP_DECL_PROBCOPY(), SCIP_DECL_PROBTRANS(), and SCIPprobdataCreateFromGraph().

◆ setStpSolvingMode()

static SCIP_RETCODE setStpSolvingMode ( SCIP scip,
SCIP_PROBDATA probdata 
)
static

sets STP solving mode

Parameters
scipSCIP data structure
probdatapointer to problem data

Definition at line 280 of file probdata_stp.c.

References SCIP_CALL, SCIP_OKAY, SCIPgetCharParam(), STP_MODE_CUT, and STP_MODE_FLOW.

Referenced by SCIPprobdataCreateFromGraph().

◆ addRedsol()

static SCIP_RETCODE addRedsol ( SCIP scip,
SCIP_PROBDATA probdata,
REDSOL redsol 
)
static

adds solution obtained during reduction...if existent

Parameters
scipSCIP data structure
probdatapointer to problem data
redsolsolution storage for r

Definition at line 304 of file probdata_stp.c.

References GRAPH::edges, FARAWAY, graph_pc_isPcMw(), graph_typeIsSpgLike(), LT, NULL, reduce_solGetEdgesol(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMessage, SCIPfreeBufferArray, solpool_addSolToScip(), solstp_isValid(), STP_MODE_CUT, and GRAPH::terms.

Referenced by SCIPprobdataCreateFromGraph().

◆ presolveStp()

static SCIP_RETCODE presolveStp ( SCIP scip,
SCIP_PROBDATA probdata,
REDSOL redsol 
)
static

◆ freeConstraintsCutModel()

static SCIP_RETCODE freeConstraintsCutModel ( SCIP scip,
SCIP_PROBDATA probdata 
)
static

frees the constraints of CUT model

Parameters
scipSCIP data structure
probdatapointer to problem data

Definition at line 423 of file probdata_stp.c.

References SCIP_CALL, SCIP_OKAY, SCIPfreeMemoryArrayNull, SCIPreleaseCons(), STP_DCSTP, STP_MODE_CUT, STP_MWCSP, STP_PCSPG, and STP_RPCSPG.

Referenced by probdataFree().

◆ freeConstraintsNonCutModel()

static SCIP_RETCODE freeConstraintsNonCutModel ( SCIP scip,
SCIP_PROBDATA probdata 
)
static

frees the constraints of non-CUT model

Parameters
scipSCIP data structure
probdatapointer to problem data

Definition at line 490 of file probdata_stp.c.

References SCIP_CALL, SCIP_OKAY, SCIPfreeMemoryArrayNull, SCIPreleaseCons(), SCIPreleaseVar(), STP_MODE_CUT, STP_MODE_FLOW, and STP_MODE_PRICE.

Referenced by probdataFree().

◆ probdataFree()

static SCIP_RETCODE probdataFree ( SCIP scip,
SCIP_PROBDATA **  probdata 
)
static

frees the memory of the given problem data

Parameters
scipSCIP data structure
probdatapointer to problem data

Definition at line 542 of file probdata_stp.c.

References freeConstraintsCutModel(), freeConstraintsNonCutModel(), NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPfreeMemory, SCIPfreeMemoryArrayNull, SCIPreleaseCons(), SCIPreleaseVar(), STP_BRMWCSP, STP_DHCSTP, and STP_MODE_CUT.

Referenced by SCIP_DECL_PROBDELORIG(), and SCIP_DECL_PROBDELTRANS().

◆ createHopConstraint()

static SCIP_RETCODE createHopConstraint ( SCIP scip,
SCIP_PROBDATA probdata 
)
static

create (edge-) HOP constraint (cut mode only)

Parameters
scipSCIP data structure
probdataproblem data

Definition at line 590 of file probdata_stp.c.

References FALSE, GRAPH::hoplimit, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPinfinity(), and TRUE.

Referenced by createModel().

◆ createBudgetConstraint()

static SCIP_RETCODE createBudgetConstraint ( SCIP scip,
SCIP_PROBDATA probdata 
)
static
Parameters
scipSCIP data structure
probdataproblem data

Definition at line 617 of file probdata_stp.c.

References GRAPH::budget, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCons(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPinfinity(), and TRUE.

Referenced by createModel().

◆ createDegreeConstraints()

static SCIP_RETCODE createDegreeConstraints ( SCIP scip,
SCIP_PROBDATA probdata 
)
static

create (node-) degree constraints (cut mode only)

Parameters
scipSCIP data structure
probdataproblem data

Definition at line 641 of file probdata_stp.c.

References FALSE, GRAPH::maxdeg, nnodes, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocMemoryArray, SCIPcreateConsLinear(), SCIPdebugMessage, SCIPinfinity(), SCIPsnprintf(), and TRUE.

Referenced by createModel().

◆ createPrizeConstraints()

◆ createConstraints()

static SCIP_RETCODE createConstraints ( SCIP scip,
SCIP_PROBDATA probdata 
)
static

create constraints (in Flow or Price Mode)

Parameters
scipSCIP data structure
probdataproblem data

Definition at line 954 of file probdata_stp.c.

References FALSE, nnodes, NULL, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddCons(), SCIPallocMemoryArray, SCIPcreateConsLinear(), SCIPdebugMessage, SCIPinfinity(), SCIPsnprintf(), GRAPH::source, STP_MODE_CUT, STP_MODE_FLOW, STP_MODE_PRICE, GRAPH::term, and TRUE.

Referenced by createModel().

◆ createVariables()

◆ createModel()

◆ createLogfile()

static SCIP_RETCODE createLogfile ( SCIP scip,
SCIP_PROBDATA probdata,
const char *  intlogfilename,
const char *  logfilename,
const char *  filename,
const char *  probname 
)
static

creates a log file

Parameters
scipSCIP data structure
probdataproblem data
intlogfilenameuser parameter
logfilenameuser parameter
filenamefile name
probnameproblem name

Definition at line 1657 of file probdata_stp.c.

References NULL, SCIP_FILECREATEERROR, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPerrorMessage, SCIPprintSysError(), and SCIPsnprintf().

Referenced by SCIPprobdataCreate().

◆ createInitialCuts()

◆ getEdgeReductionRatio()

static SCIP_Real getEdgeReductionRatio ( SCIP_PROBDATA probdata,
const GRAPH graph 
)
static

ratio of remaining edges

Parameters
probdataproblem data
graphthe graph

Definition at line 1783 of file probdata_stp.c.

References GRAPH::edges, GE, graph_pc_getReductionRatios(), graph_pc_isPcMw(), GRAPH::knots, LE, and SCIP_Real.

Referenced by SCIPprobdataProbIsAdversarial(), and setParamsSepaIsBad().

◆ setParamsSepaIsBad()

static SCIP_Bool setParamsSepaIsBad ( SCIP_PROBDATA probdata)
static

helper

Parameters
probdataproblem data

Definition at line 1811 of file probdata_stp.c.

References CUT_MAXNEDGES, CUT_MAXNTERMINALS, CUT_MAXTOTNEDGES, CUT_MINREDUCTION_RATIO, CUT_MINTOTNEDGES, GRAPH::edges, FALSE, getEdgeReductionRatio(), SCIP_Bool, SCIP_Real, GRAPH::terms, and TRUE.

Referenced by setParams().

◆ sepaBadGetZeroHalfMaxrounds()

static int sepaBadGetZeroHalfMaxrounds ( const GRAPH g)
static

helper

Parameters
ggraph data structure

Definition at line 1844 of file probdata_stp.c.

References nterms, and GRAPH::terms.

Referenced by setParams().

◆ setParams()

static SCIP_RETCODE setParams ( SCIP scip,
SCIP_PROBDATA probdata,
int  symcons,
int  cyclecons 
)
static

◆ SCIP_DECL_PROBCOPY()

◆ SCIP_DECL_PROBDELORIG()

static SCIP_DECL_PROBDELORIG ( probdelorigStp  )
static

frees user data of original problem (called when the original problem is freed)

Definition at line 2335 of file probdata_stp.c.

References graph_free(), graph_mincut_exit(), graph_path_exit(), NULL, probdataFree(), SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, STP_MODE_CUT, and TRUE.

◆ SCIP_DECL_PROBTRANS()

static SCIP_DECL_PROBTRANS ( probtransStp  )
static

◆ SCIP_DECL_PROBINITSOL()

static SCIP_DECL_PROBINITSOL ( probinitsolStp  )
static

Definition at line 2540 of file probdata_stp.c.

References NULL, and SCIP_OKAY.

◆ SCIP_DECL_PROBEXITSOL()

◆ SCIP_DECL_PROBDELTRANS()

static SCIP_DECL_PROBDELTRANS ( probdeltransStp  )
static

frees user data of transformed problem (called when the transformed problem is freed)

Definition at line 2627 of file probdata_stp.c.

References probdataFree(), SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.

◆ SCIPprobdataSetDefaultParams()

SCIP_RETCODE SCIPprobdataSetDefaultParams ( SCIP scip)

sets up the problem data

Parameters
scipSCIP data structure

Definition at line 2645 of file probdata_stp.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPlpiGetSolverName(), SCIPsetBoolParam(), SCIPsetCharParam(), SCIPsetIntParam(), SCIPsetRealParam(), SCIPsetSubscipsOff(), and TRUE.

Referenced by initReceivedSubproblem(), runShell(), and subscipSetupParameters().

◆ SCIPprobdataCreate()

SCIP_RETCODE SCIPprobdataCreate ( SCIP scip,
const char *  filename 
)

◆ SCIPprobdataCreateFromGraph()

◆ SCIPprobdataSetGraph()

void SCIPprobdataSetGraph ( SCIP_PROBDATA probdata,
GRAPH graph 
)

sets the probdata graph

Parameters
probdataproblem data
graphgraph data structure

Definition at line 2936 of file probdata_stp.c.

References NULL.

◆ SCIPprobdataGetGraph()

◆ SCIPprobdataGetGraph2()

◆ SCIPprobdataSetOffset()

void SCIPprobdataSetOffset ( SCIP_PROBDATA probdata,
SCIP_Real  offset 
)

sets the offset

Parameters
probdataproblem data
offsetthe offset value

Definition at line 2973 of file probdata_stp.c.

References NULL.

◆ SCIPprobdataGetNVars()

int SCIPprobdataGetNVars ( SCIP scip)

returns the number of variables

Parameters
scipSCIP data structure

Definition at line 2985 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by consdataCheck(), SCIP_DECL_CONSACTIVE(), SCIP_DECL_CONSDEACTIVE(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPROP(), SCIP_DECL_HEUREXEC(), selectBranchingVertexBySol(), and solpool_addSolToScip().

◆ SCIPprobdataGetVars()

◆ SCIPprobdataGetNLayers()

int SCIPprobdataGetNLayers ( SCIP scip)

returns the number of layers

Parameters
scipSCIP data structure

Definition at line 3015 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

◆ SCIPprobdataGetNEdges()

int SCIPprobdataGetNEdges ( SCIP scip)

returns the number of edges

Parameters
scipSCIP data structure

Definition at line 3030 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_PRICERINIT(), and SCIP_DECL_PRICERINITSOL().

◆ SCIPprobdataGetNNodes()

int SCIPprobdataGetNNodes ( SCIP scip)

returns the number of nodes

Parameters
scipSCIP data structure

Definition at line 3045 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIPStpHeurTMBuildTreePcMw(), and solstp_pcGetSolRoot().

◆ SCIPprobdataGetNTerms()

int SCIPprobdataGetNTerms ( SCIP scip)

returns the number of terminals

Parameters
scipSCIP data structure

Definition at line 3060 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIPStpHeurTMBuildTreePcMw(), and solstp_pcGetSolRoot().

◆ SCIPprobdataGetRNTerms()

int SCIPprobdataGetRNTerms ( SCIP scip)

returns the number of terminals without the root node

Parameters
scipSCIP data structure

Definition at line 3075 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_PRICERINIT(), and SCIP_DECL_PRICERINITSOL().

◆ SCIPprobdataGetRoot()

int SCIPprobdataGetRoot ( SCIP scip)

returns root

Parameters
scipSCIP data structure

Definition at line 3090 of file probdata_stp.c.

References NULL, SCIPgetProbData(), and GRAPH::source.

Referenced by SCIP_DECL_PRICERINIT().

◆ SCIPprobdataGetNorgEdges()

int SCIPprobdataGetNorgEdges ( SCIP scip)

returns numer of original edges

Parameters
scipSCIP data structure

Definition at line 3109 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by abortSlackPruneEarly(), and SCIPintListNodeAppendCopy().

◆ SCIPprobdataGetOffset()

SCIP_Real SCIPprobdataGetOffset ( SCIP scip)

returns offset of the problem

Parameters
scipSCIP data structure

Definition at line 3124 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by dualascent_execPcMw(), SCIP_DECL_HEUREXEC(), SCIP_DECL_READERWRITE(), SCIP_DECL_RELAXEXEC(), SCIPStpHeurSlackPruneRun(), and solAddTry().

◆ SCIPprobdataGetPresolUpperBound()

SCIP_Real SCIPprobdataGetPresolUpperBound ( SCIP scip)

returns upper bound from presolving NOTE: Mind to call the method in transformed stage!

Parameters
scipSCIP data structure

Definition at line 3141 of file probdata_stp.c.

References GT, NULL, SCIP_Real, SCIPgetProbData(), SCIPgetTransObjoffset(), and SCIPgetTransObjscale().

Referenced by getCutoffbound().

◆ SCIPprobdataGetPresolUpperBoundWithOffset()

SCIP_Real SCIPprobdataGetPresolUpperBoundWithOffset ( SCIP scip)

returns upper bound from presolving

Parameters
scipSCIP data structure

Definition at line 3157 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

◆ SCIPprobdataGetedgeVarByIndex()

SCIP_VAR* SCIPprobdataGetedgeVarByIndex ( SCIP scip,
int  idx 
)

returns the variable for a given index

Parameters
scipSCIP data structure
idxindex of the edge

Definition at line 3173 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

◆ SCIPprobdataGetXval()

◆ SCIPprobdataGetEdgeConstraints()

SCIP_CONS** SCIPprobdataGetEdgeConstraints ( SCIP scip)

returns all edge constraints

Parameters
scipSCIP data structure

Definition at line 3218 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_PRICERINIT().

◆ SCIPprobdataGetPathConstraints()

SCIP_CONS** SCIPprobdataGetPathConstraints ( SCIP scip)

returns all path constraints

Parameters
scipSCIP data structure

Definition at line 3232 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_PRICERINIT().

◆ SCIPprobdataGetRTerms()

int* SCIPprobdataGetRTerms ( SCIP scip)

returns the array with all variables

Parameters
scipSCIP data structure

Definition at line 3247 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_PRICERINIT().

◆ SCIPprobdataGetPctermsorder()

int* SCIPprobdataGetPctermsorder ( SCIP scip)

returns array

Parameters
scipSCIP data structure

Definition at line 3262 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIPStpHeurTMBuildTreePcMw(), and solstp_pcGetSolRoot().

◆ SCIPprobdataGetEdgeVars()

SCIP_VAR** SCIPprobdataGetEdgeVars ( SCIP scip)

returns the array with all edge variables

Parameters
scipSCIP data structure

Definition at line 3277 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by branchOnVertex(), buildsolgraph(), selectBranchingVertexByLp(), and selectBranchingVertexByLp2Flow().

◆ SCIPprobdataIsBigt()

SCIP_Bool SCIPprobdataIsBigt ( SCIP scip)

returns if 'T' model is being used

Parameters
scipSCIP data structure

Definition at line 3292 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_PRICERINIT().

◆ SCIPprobdataObjIsIntegral()

SCIP_Bool SCIPprobdataObjIsIntegral ( SCIP scip)
Parameters
scipSCIP data structure

Definition at line 3308 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

◆ SCIPprobdataProbIsAdversarial()

SCIP_Bool SCIPprobdataProbIsAdversarial ( SCIP scip)

returns whether problem seems very hard

Parameters
scipSCIP data structure

Definition at line 3324 of file probdata_stp.c.

References FALSE, getEdgeReductionRatio(), graph_pc_isPcMw(), GT, MINREDUCTION_RATIO_PCMW, MINREDUCTION_RATIO_STP, SCIP_Real, SCIPgetProbData(), and TRUE.

Referenced by branchruleGetType(), initSolNumberBounds(), and SCIP_DECL_HEUREXEC().

◆ SCIPprobdataIsSubproblem()

SCIP_Bool SCIPprobdataIsSubproblem ( SCIP scip)

returns if in subproblem

Parameters
scipSCIP data structure

Definition at line 3359 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

◆ SCIPprobdataPrintGraph()

SCIP_RETCODE SCIPprobdataPrintGraph ( SCIP scip,
const char *  filename,
SCIP_SOL sol,
SCIP_Bool  printsol 
)

print (undirected) graph in GML format

Parameters
scipSCIP data structure
filenamename of the output file
solsolution to be printed; or NULL for LP solution
printsolshould solution be printed?

Definition at line 3375 of file probdata_stp.c.

References FALSE, graph_writeGml(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetProbData(), SCIPgetSolVal(), SCIPisZero(), and TRUE.

◆ SCIPprobdataWriteIntermediateSolution()

SCIP_RETCODE SCIPprobdataWriteIntermediateSolution ( SCIP scip)

writes the best solution to the intermediate solution file

Parameters
scipSCIP data structure

Definition at line 3419 of file probdata_stp.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPgetProbData(), and SCIPprobdataWriteSolution().

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIPprobdataWriteSolution()

◆ SCIPprobdataWriteLogLine()

void SCIPprobdataWriteLogLine ( SCIP scip,
const char *  formatstr,
  ... 
)

writes a line to the log file

Parameters
scipSCIP data structure
formatstrformat string like in printf() function

Definition at line 3659 of file probdata_stp.c.

References SCIP_Messagehdlr::logfile, NULL, SCIPgetMessagehdlr(), SCIPgetProbData(), and SCIPmessageVFPrintInfo().

Referenced by SCIP_DECL_EVENTEXEC(), SCIP_DECL_PROBEXITSOL(), SCIPprobdataWriteLogfileEnd(), SCIPprobdataWriteSolution(), and writeCommentSection().

◆ SCIPprobdataAddNewSol()

◆ SCIPprobdataGetType()

int SCIPprobdataGetType ( SCIP scip)

returns problem type

Parameters
scipSCIP data structure

Definition at line 3972 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

Referenced by SCIP_DECL_EVENTEXEC(), and SCIPintListNodeAppendCopy().

◆ SCIPprobdataWriteLogfileEnd()

◆ SCIPprobdataSetDualBound()

void SCIPprobdataSetDualBound ( SCIP scip,
SCIP_Real  dual 
)

writes end of log file

Parameters
scipSCIP data structure
dualdual bound

Definition at line 4048 of file probdata_stp.c.

References NULL, SCIPgetProbData(), and TRUE.

◆ SCIPprobdataSetNSolvers()

void SCIPprobdataSetNSolvers ( SCIP scip,
int  nSolvers 
)

writes end of log file

Parameters
scipSCIP data structure
nSolversthe number of solvers

Definition at line 4063 of file probdata_stp.c.

References NULL, and SCIPgetProbData().

◆ initReceivedSubproblem()

void initReceivedSubproblem ( SCIP scip,
const int  lLinearConsNames,
const char *  linearConsNames,
const int  lSetppcConsNames,
const char *  setppcConsNames 
)