55#define CONSHDLR_NAME "benderslp"
56#define CONSHDLR_DESC "constraint handler for Benders' Decomposition to separate LP solutions"
57#define CONSHDLR_ENFOPRIORITY 10000000
58#define CONSHDLR_CHECKPRIORITY 10000000
59#define CONSHDLR_EAGERFREQ 100
61#define CONSHDLR_NEEDSCONS FALSE
64#define DEFAULT_CONSBENDERSLP_MAXDEPTH 0
66#define DEFAULT_CONSBENDERSLP_FREQ 0
67#define DEFAULT_CONSBENDERSLP_STALLLIMIT 100
68#define DEFAULT_CONSBENDERSLP_ITERLIMIT 100
69#define DEFAULT_ACTIVE FALSE
76struct SCIP_ConshdlrData
147 conshdlrdata->stallcount++;
149 conshdlrdata->stallcount = 0;
152 conshdlrdata->ncallsnode++;
158 conshdlrdata->ncallsnode = 0;
167 if( !conshdlrdata->active )
176 if( conshdlrdata->maxdepth >= 0 &&
SCIPgetDepth(
scip) > conshdlrdata->maxdepth
177 && (conshdlrdata->freq == 0 ||
SCIPgetDepth(
scip) % conshdlrdata->freq != 0)
178 && (conshdlrdata->stalllimit == 0 || conshdlrdata->stallcount < conshdlrdata->stalllimit) )
182 if(
SCIPgetDepth(
scip) > 0 && conshdlrdata->ncallsnode >= conshdlrdata->iterlimit )
193 if( conshdlrdata->stallcount >= conshdlrdata->stalllimit )
194 conshdlrdata->stallcount = 0;
210 if( !conshdlrdata->active || (conshdlrdata->maxdepth >= 0 &&
SCIPgetDepth(
scip) > conshdlrdata->maxdepth) )
229 if( !conshdlrdata->active || (conshdlrdata->maxdepth >= 0 &&
SCIPgetDepth(
scip) > conshdlrdata->maxdepth) )
284 consEnfolpBenderslp, consEnfopsBenderslp, consCheckBenderslp, consLockBenderslp,
296 "depth at which Benders' decomposition cuts are generated from the LP solution (-1: always, 0: only at root)",
301 "the depth frequency for generating LP cuts after the max depth is reached (0: never, 1: all nodes, ...)",
306 "the number of nodes processed without a dual bound improvement before enforcing the LP relaxation, 0: no stall count applied",
311 "after the root node, only iterlimit fractional LP solutions are used at each node to generate Benders' decomposition cuts.",
315 "constraints/" CONSHDLR_NAME "/active",
"is the Benders' decomposition LP cut constraint handler active?",
318 conshdlrdata->stallcount = 0;
static GRAPHNODE ** active
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
constraint handler for Benders' decomposition
#define DEFAULT_CONSBENDERSLP_ITERLIMIT
#define DEFAULT_CONSBENDERSLP_STALLLIMIT
#define DEFAULT_CONSBENDERSLP_MAXDEPTH
#define DEFAULT_CONSBENDERSLP_FREQ
constraint handler for benderslp decomposition
#define SCIP_MAXTREEDEPTH
SCIP_RETCODE SCIPconsBendersEnforceSolution(SCIP *scip, SCIP_SOL *sol, SCIP_CONSHDLR *conshdlr, SCIP_RESULT *result, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint)
SCIP_RETCODE SCIPincludeConshdlrBenderslp(SCIP *scip)
int SCIPgetSubscipDepth(SCIP *scip)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
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)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
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)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
#define SCIPallocMemory(scip, ptr)
#define SCIPfreeMemory(scip, ptr)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSclearMemory(ptr)
@ SCIP_BENDERSENFOTYPE_RELAX
@ SCIP_BENDERSENFOTYPE_LP
@ SCIP_BENDERSENFOTYPE_PSEUDO
#define SCIP_DECL_CONSENFOLP(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSFREE(x)
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_Node SCIP_NODE