cons_stpcomponents.c
Go to the documentation of this file.
26 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
47 #define CONSHDLR_ENFOPRIORITY -1 /**< priority of the constraint handler for constraint enforcing */
48 #define CONSHDLR_CHECKPRIORITY -1 /**< priority of the constraint handler for checking feasibility */
49 #define CONSHDLR_SEPAFREQ -1 /**< frequency for separating cuts; zero means to separate only in the root node */
50 #define CONSHDLR_PROPFREQ 0 /**< frequency for propagating domains; zero means only preprocessing propagation */
51 #define CONSHDLR_EAGERFREQ -1 /**< frequency for using all instead of only the useful constraints in separation,
53 #define CONSHDLR_DELAYSEPA FALSE /**< should separation method be delayed, if other separators found cuts? */
54 #define CONSHDLR_DELAYPROP FALSE /**< should propagation method be delayed, if other propagators found reductions? */
55 #define CONSHDLR_NEEDSCONS FALSE /**< should the constraint handler be skipped, if no constraints are available? */
58 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP // SCIP_PROPTIMING_DURINGLPLOOP // SCIP_PROPTIMING_BEFORELP
89 {
477 SCIP_CALL( decomposeExec(scip, conshdlrdata->bidecomposition, conshdlrdata->cutnodes, orggraph, success) );
503 /** destructor of constraint handler to free constraint handler data (called when SCIP is exiting) */
524 /** solving process initialization method of constraint handler (called when branch and bound process is about to begin) */
586 SCIPconsIsDynamic(sourcecons), SCIPconsIsRemovable(sourcecons), SCIPconsIsStickingAtNode(sourcecons)) );
591 /** LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) */
723 consEnfolpStpcomponents, consEnfopsStpcomponents, consCheckStpcomponents, consLockStpcomponents,
734 SCIP_CALL( SCIPsetConshdlrProp(scip, conshdlr, consPropStpcomponents, CONSHDLR_PROPFREQ, CONSHDLR_DELAYPROP,
void SCIPconshdlrSetData(SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons.c:4205
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
Definition: scip_cons.c:563
Definition: type_result.h:33
static SCIP_RETCODE decomposeGetSubgraph(SCIP *scip, const BIDECOMP *bidecomp, int compindex, GRAPH *orggraph, GRAPH **subgraph)
Definition: cons_stpcomponents.c:252
Definition: graphdefs.h:184
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
Definition: scip_cons.c:586
Definition: struct_scip.h:59
SCIP_RETCODE SCIPStpFixEdgeVarTo1(SCIP *scip, SCIP_VAR *edgevar, SCIP_Bool *success)
Definition: prop_stp.c:2443
SCIP_Bool bidecomposition_isPossible(const GRAPH *g)
Definition: bidecomposition.c:887
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
Definition: scip_cons.c:877
SCIP_RETCODE graph_subinoutActivateEdgeMap(const GRAPH *, SUBINOUT *)
Definition: graph_sub.c:769
static void freeDecompose(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata)
Definition: cons_stpcomponents.c:440
SCIP_Bool graph_subinoutUsesNewHistory(const SUBINOUT *)
Definition: graph_sub.c:848
static SCIP_RETCODE divideAndConquer(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_Bool *success)
Definition: cons_stpcomponents.c:460
Definition: type_set.h:37
Definition: substpsolver.c:58
Definition: struct_var.h:198
includes methods for Steiner tree problem solutions
static SCIP_RETCODE subsolGet(SUBSTP *substp, SUBSOL *subcomp)
Definition: cons_stpcomponents.c:104
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
Definition: scip_cons.c:166
void graph_subinoutActivateNewHistory(SUBINOUT *)
Definition: graph_sub.c:788
includes various files containing graph methods used for Steiner tree problems
static SCIP_DECL_CONSINITLP(consInitlpStpcomponents)
Definition: cons_stpcomponents.c:594
void bidecomposition_free(SCIP *scip, BIDECOMP **bidecomposition)
Definition: bidecomposition.c:759
Definition: graph_sub.c:54
static SCIP_RETCODE initDecompose(SCIP *scip, SCIP_CONSHDLRDATA *conshdlrdata, GRAPH *orggraph, SCIP_Bool *isPromsing)
Definition: cons_stpcomponents.c:390
SCIP_Bool SCIPStpcomponentsAllowsDecomposition(SCIP *scip)
Definition: cons_stpcomponents.c:689
SCIP_RETCODE substpsolver_init(SCIP *scip, GRAPH *subgraph, SUBSTP **substp)
Definition: substpsolver.c:313
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITLP((*consinitlp)))
Definition: scip_cons.c:609
several decomposition methods for Steiner tree problems
static SCIP_DECL_CONSINITSOL(consInitsolStpcomponents)
Definition: cons_stpcomponents.c:527
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
Definition: scip_cons.c:934
Components constraint handler for Steiner problems.
Definition: bidecomposition.h:57
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSINITSOL((*consinitsol)))
Definition: scip_cons.c:429
SCIP_RETCODE SCIPStpFixEdgeVarTo0(SCIP *scip, SCIP_VAR *edgevar, SCIP_Bool *success)
Definition: prop_stp.c:2419
static SCIP_RETCODE subsolInit(SCIP *scip, const SUBSTP *substp, SUBSOL **subsolution)
Definition: cons_stpcomponents.c:166
static SCIP_DECL_CONSTRANS(consTransStpcomponents)
Definition: cons_stpcomponents.c:563
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
Definition: scip_cons.c:332
SCIP_RETCODE substpsolver_transferHistory(const int *edgeMapToOrg, GRAPH *orggraph, SUBSTP *substp)
Definition: substpsolver.c:404
void bidecomposition_markSub(const BIDECOMP *bidecomp, int compindex, GRAPH *g)
Definition: bidecomposition.c:782
Definition: type_result.h:35
void bidecomposition_cutnodesCompute(const GRAPH *g, CUTNODES *cutnodes)
Definition: bidecomposition.c:676
static SCIP_DECL_CONSDELETE(consDeleteStpcomponents)
Definition: cons_stpcomponents.c:549
Definition: struct_cons.h:117
struct sub_solution SUBSOL
static SCIP_DECL_CONSLOCK(consLockStpcomponents)
Definition: cons_stpcomponents.c:644
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
Definition: scip_cons.c:357
static SCIP_DECL_CONSPROP(consPropStpcomponents)
Definition: cons_stpcomponents.c:603
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
Definition: cons.c:4195
SCIP_RETCODE graph_subgraphExtract(SCIP *, GRAPH *, SUBINOUT *, GRAPH **)
Definition: graph_sub.c:712
SCIP_Real bidecomposition_getMaxcompNodeRatio(const BIDECOMP *bidecomp)
Definition: bidecomposition.c:938
Solver for Steiner tree (sub-) problems.
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
Definition: scip_param.c:260
Definition: type_retcode.h:33
Definition: cons_stpcomponents.c:89
static SCIP_RETCODE decomposeExec(SCIP *scip, BIDECOMP *bidecomp, CUTNODES *cutnodes, GRAPH *orggraph, SCIP_Bool *success)
Definition: cons_stpcomponents.c:352
SCIP_RETCODE bidecomposition_cutnodesInit(SCIP *scip, const GRAPH *g, CUTNODES **cutnodes)
Definition: bidecomposition.c:573
propagator for Steiner tree problems, using the LP reduced costs
static SCIP_RETCODE subcompFixOrgEdges(SCIP *scip, const SUBINOUT *subinout, SUBSTP *substp)
Definition: cons_stpcomponents.c:208
static SCIP_RETCODE decomposeSolveSub(SCIP *scip, const BIDECOMP *bidecomp, int compindex, GRAPH *orggraph, SCIP_Bool *success)
Definition: cons_stpcomponents.c:295
SCIP_RETCODE bidecomposition_initSubInOut(SCIP *scip, const GRAPH *g, BIDECOMP *bidecomposition)
Definition: bidecomposition.c:743
SCIP_RETCODE substpsolver_getSolution(SUBSTP *substp, int *edgesol)
Definition: substpsolver.c:500
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyStpcomponents)
Definition: cons_stpcomponents.c:490
void bidecomposition_cutnodesFree(SCIP *scip, CUTNODES **cutnodes)
Definition: bidecomposition.c:647
static SCIP_DECL_CONSEXITSOL(consExitsolStpcomponents)
Definition: cons_stpcomponents.c:535
static SCIP_DECL_CONSFREE(consFreeStpcomponents)
Definition: cons_stpcomponents.c:506
static void subsolFree(SCIP *subscip, SUBSOL **subsolution)
Definition: cons_stpcomponents.c:190
static SCIP_RETCODE subsolFixOrgEdges(SCIP *scip, const SUBINOUT *subinout, SUBSOL *subsol)
Definition: cons_stpcomponents.c:117
const int * graph_subinoutGetSubToOrgEdgeMap(const SUBINOUT *)
Definition: graph_sub.c:812
int substpsolver_getNsubedges(const SUBSTP *substp)
Definition: substpsolver.c:488
static SCIP_Bool decomposeIsPromising(const GRAPH *g, const BIDECOMP *bidecomp)
Definition: cons_stpcomponents.c:229
SCIPallocBlockMemory(scip, subsol))
SCIP_Bool bidecomposition_componentIsTrivial(const BIDECOMP *bidecomp, int compindex)
Definition: bidecomposition.c:861
Definition: objbenders.h:33
SCIP_RETCODE bidecomposition_getMarkedSubRoot(SCIP *scip, const BIDECOMP *bidecomp, const GRAPH *orggraph, const GRAPH *subgraph, int *subroot)
Definition: bidecomposition.c:830
SCIP_RETCODE substpsolver_solve(SCIP *scip, SUBSTP *substp, SCIP_Bool *success)
Definition: substpsolver.c:452
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSEXITSOL((*consexitsol)))
Definition: scip_cons.c:453
SCIP_RETCODE SCIPincludeConshdlrStpcomponents(SCIP *scip)
Definition: cons_stpcomponents.c:706
SCIP_RETCODE bidecomposition_init(SCIP *scip, const CUTNODES *cutnodes, const GRAPH *g, BIDECOMP **bidecomposition)
Definition: bidecomposition.c:710
SCIP callable library.
SCIP_RETCODE SCIPStpcomponentsSetUp(SCIP *scip, GRAPH *graph)
Definition: cons_stpcomponents.c:660
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
Definition: scip_cons.c:266