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
183 conshdlrdata->stallcount++;
185 conshdlrdata->stallcount = 0;
188 conshdlrdata->ncallsnode++;
194 conshdlrdata->ncallsnode = 0;
203 if( conshdlrdata->maxdepth >= 0 &&
SCIPgetDepth(
scip) > conshdlrdata->maxdepth
204 && (conshdlrdata->freq == 0 ||
SCIPgetDepth(
scip) % conshdlrdata->freq != 0)
205 && (conshdlrdata->stalllimit == 0 || conshdlrdata->stallcount < conshdlrdata->stalllimit) )
209 if(
SCIPgetDepth(
scip) > 0 && conshdlrdata->ncallsnode >= conshdlrdata->iterlimit )
220 if( conshdlrdata->stallcount >= conshdlrdata->stalllimit )
221 conshdlrdata->stallcount = 0;
237 if( conshdlrdata->maxdepth >= 0 &&
SCIPgetDepth(
scip) > conshdlrdata->maxdepth )
256 if( conshdlrdata->maxdepth >= 0 &&
SCIPgetDepth(
scip) > conshdlrdata->maxdepth )
313 consEnfolpBenderslp, consEnfopsBenderslp, consCheckBenderslp, consLockBenderslp,
327 "depth at which Benders' decomposition cuts are generated from the LP solution (-1: always, 0: only at root)",
332 "the depth frequency for generating LP cuts after the max depth is reached (0: never, 1: all nodes, ...)",
337 "the number of nodes processed without a dual bound improvement before enforcing the LP relaxation, 0: no stall count applied",
342 "after the root node, only iterlimit fractional LP solutions are used at each node to generate Benders' decomposition cuts.",
346 "constraints/" CONSHDLR_NAME "/active",
"is the Benders' decomposition LP cut constraint handler active?",
349 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_Bool SCIPconshdlrNeedsCons(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
void SCIPconshdlrSetNeedsCons(SCIP_CONSHDLR *conshdlr, SCIP_Bool needscons)
SCIP_RETCODE SCIPsetConshdlrInit(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrExit(SCIP *scip, 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)
#define SCIP_DECL_CONSEXIT(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_CONSINIT(x)
#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