Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods to include specific Benders' decomposition cut methods into SCIP

This module contains methods to include specific Benders' decomposition cut methods into SCIP.

Note
The Benders' decomposition cut methods are linked to each Benders' decomposition implementation. Thus, the default Benders' decomposition implementations automatically include the necessary Benders' decomposition cut methods. For custom Benders' decomposition implementations, you can call SCIPincludeDefaultBendersCuts() in the SCIPincludeBendersMybenders() include function.

creates the optimality Benders' decomposition cut and includes it in SCIP

Functions

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutFeas (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutFeasalt (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutInt (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutNogood (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutOpt (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_EXPORT SCIP_RETCODE SCIPgenerateAndApplyBendersOptCut (SCIP *masterprob, SCIP *subproblem, SCIP_BENDERS *benders, SCIP_BENDERSCUT *benderscut, SCIP_SOL *sol, int probnumber, char *cutname, SCIP_Real objective, SCIP_Real *primalvals, SCIP_Real *consdualvals, SCIP_Real *varlbdualvals, SCIP_Real *varubdualvals, SCIP_HASHMAP *row2idx, SCIP_HASHMAP *var2idx, SCIP_BENDERSENFOTYPE type, SCIP_Bool addcut, SCIP_Bool feasibilitycut, SCIP_RESULT *result)
 
SCIP_EXPORT SCIP_RETCODE SCIPaddNlRowGradientBenderscutOpt (SCIP *masterprob, SCIP *subproblem, SCIP_BENDERS *benders, SCIP_NLROW *nlrow, SCIP_EXPRINT *exprint, SCIP_Real mult, SCIP_Real *primalvals, SCIP_HASHMAP *var2idx, SCIP_Real *dirderiv, SCIP_VAR ***vars, SCIP_Real **vals, int *nvars, int *varssize)
 

Function Documentation

◆ SCIPincludeBenderscutFeas()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutFeas ( SCIP scip,
SCIP_BENDERS benders 
)

creates the Standard Feasibility Benders' decomposition cuts and includes it in SCIP

Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 494 of file benderscut_feas.c.

References BENDERSCUT_DESC, BENDERSCUT_LPCUT, BENDERSCUT_NAME, BENDERSCUT_PRIORITY, NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeBenderscutBasic().

Referenced by SCIPincludeBendersDefaultCuts().

◆ SCIPincludeBenderscutFeasalt()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutFeasalt ( SCIP scip,
SCIP_BENDERS benders 
)

creates the Alternative Feasibility Benders' decomposition cuts and includes it in SCIP

Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 461 of file benderscut_feasalt.c.

References BENDERSCUT_DESC, BENDERSCUT_LPCUT, BENDERSCUT_NAME, BENDERSCUT_PRIORITY, BMSclearMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPincludeBenderscutBasic(), SCIPsetBenderscutExit(), and SCIPsetBenderscutFree().

Referenced by SCIPincludeBendersDefaultCuts().

◆ SCIPincludeBenderscutInt()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutInt ( SCIP scip,
SCIP_BENDERS benders 
)

creates the integer optimality cut for Benders' decomposition cut and includes it in SCIP

creates the int Benders' decomposition cuts and includes it in SCIP

Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 608 of file benderscut_int.c.

References BENDERSCUT_DESC, BENDERSCUT_LPCUT, BENDERSCUT_NAME, BENDERSCUT_PRIORITY, FALSE, NULL, paramname, SCIP_CALL, SCIP_DEFAULT_ADDCUTS, SCIP_DEFAULT_CUTCONSTANT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddRealParam(), SCIPallocBlockMemory, SCIPbendersGetName(), SCIPincludeBenderscutBasic(), SCIPinfinity(), SCIPsetBenderscutExit(), SCIPsetBenderscutFree(), SCIPsetBenderscutInit(), and SCIPsnprintf().

Referenced by SCIPincludeBendersDefaultCuts().

◆ SCIPincludeBenderscutNogood()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutNogood ( SCIP scip,
SCIP_BENDERS benders 
)

creates the no good Benders' decomposition cut and includes it in SCIP

creates the nogood Benders' decomposition cuts and includes it in SCIP

Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 357 of file benderscut_nogood.c.

References BENDERSCUT_DESC, BENDERSCUT_LPCUT, BENDERSCUT_NAME, BENDERSCUT_PRIORITY, FALSE, NULL, paramname, SCIP_CALL, SCIP_DEFAULT_ADDCUTS, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPbendersGetName(), SCIPincludeBenderscutBasic(), SCIPsetBenderscutFree(), and SCIPsnprintf().

Referenced by SCIPincludeBendersDefaultCuts().

◆ SCIPincludeBenderscutOpt()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenderscutOpt ( SCIP scip,
SCIP_BENDERS benders 
)

creates the opt Benders' decomposition cuts and includes it in SCIP

Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 745 of file benderscut_opt.c.

References BENDERSCUT_DESC, BENDERSCUT_LPCUT, BENDERSCUT_NAME, BENDERSCUT_PRIORITY, FALSE, NULL, paramname, SCIP_CALL, SCIP_DEFAULT_ADDCUTS, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddBoolParam(), SCIPallocBlockMemory, SCIPbendersGetName(), SCIPincludeBenderscutBasic(), SCIPsetBenderscutFree(), and SCIPsnprintf().

Referenced by SCIPincludeBendersDefaultCuts().

◆ SCIPgenerateAndApplyBendersOptCut()

SCIP_EXPORT SCIP_RETCODE SCIPgenerateAndApplyBendersOptCut ( SCIP masterprob,
SCIP subproblem,
SCIP_BENDERS benders,
SCIP_BENDERSCUT benderscut,
SCIP_SOL sol,
int  probnumber,
char *  cutname,
SCIP_Real  objective,
SCIP_Real primalvals,
SCIP_Real consdualvals,
SCIP_Real varlbdualvals,
SCIP_Real varubdualvals,
SCIP_HASHMAP row2idx,
SCIP_HASHMAP var2idx,
SCIP_BENDERSENFOTYPE  type,
SCIP_Bool  addcut,
SCIP_Bool  feasibilitycut,
SCIP_RESULT result 
)

Generates a classical Benders' optimality cut using the dual solutions from the subproblem or the input arrays. If the dual solutions are input as arrays, then a mapping between the array indices and the rows/variables is required. This method can also be used to generate a feasiblity, is a problem to minimise the infeasibilities has been solved to generate the dual solutions

Generates a classical Benders' optimality cut using the dual solutions from the subproblem or the input arrays. If the dual solutions are input as arrays, then a mapping between the array indices and the rows/variables is required. This method can also be used to generate a feasibility cut, if a problem to minimise the infeasibilities has been solved to generate the dual solutions

Parameters
masterprobthe SCIP instance of the master problem
subproblemthe SCIP instance of the pricing problem
bendersthe benders' decomposition
benderscutthe benders' decomposition cut method
solprimal CIP solution
probnumberthe number of the pricing problem
cutnamethe name for the cut to be generated
objectivethe objective function of the subproblem
primalvalsthe primal solutions for the NLP, can be NULL
consdualvalsdual variables for the constraints, can be NULL
varlbdualvalsthe dual variables for the variable lower bounds, can be NULL
varubdualvalsthe dual variables for the variable upper bounds, can be NULL
row2idxmapping between the row in the subproblem to the index in the dual array, can be NULL
var2idxmapping from variable of the subproblem to the index in the dual arrays, can be NULL
typethe enforcement type calling this function
addcutshould the Benders' cut be added as a cut or constraint
feasibilitycutis this called for the generation of a feasibility cut
resultthe result from solving the subproblems

Definition at line 785 of file benderscut_opt.c.

References addAuxiliaryVariableToCut(), checkSetupTolerances(), computeStandardLPOptimalityCut(), computeStandardNLPOptimalityCut(), FALSE, NULL, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSENFOTYPE_PSEUDO, SCIP_BENDERSENFOTYPE_RELAX, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_FEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIPABORT, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddPoolCut(), SCIPaddRow(), SCIPaddVarsToRow(), SCIPaddVarToRow(), SCIPallocClearBufferArray, SCIPbendersInStrengthenRound(), SCIPcheckBendersSubproblemOptimality(), SCIPcreateConsBasicLinear(), SCIPcreateEmptyRowConshdlr(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPfindConshdlr(), SCIPfreeBufferArray, SCIPgetActivityLinear(), SCIPgetLhsLinear(), SCIPgetNFixedVars(), SCIPgetNNlpis(), SCIPgetNVars(), SCIPgetRowSolActivity(), SCIPgetSolVal(), SCIPinfinity(), SCIPisFeasEQ(), SCIPisNLPConstructed(), SCIPreleaseCons(), SCIPreleaseRow(), SCIProwGetLhs(), SCIPsetConsDynamic(), SCIPsetConsRemovable(), SCIPstoreBendersCut(), SCIPvarGetName(), and TRUE.

Referenced by generateAndApplyBendersCuts(), and SCIP_DECL_BENDERSCUTEXEC().

◆ SCIPaddNlRowGradientBenderscutOpt()

SCIP_EXPORT SCIP_RETCODE SCIPaddNlRowGradientBenderscutOpt ( SCIP masterprob,
SCIP subproblem,
SCIP_BENDERS benders,
SCIP_NLROW nlrow,
SCIP_EXPRINT exprint,
SCIP_Real  mult,
SCIP_Real primalvals,
SCIP_HASHMAP var2idx,
SCIP_Real dirderiv,
SCIP_VAR ***  vars,
SCIP_Real **  vals,
int *  nvars,
int *  varssize 
)

adds the gradient of a nonlinear row in the current NLP solution of a subproblem to a linear row or constraint in the master problem

Only computes gradient w.r.t. master problem variables. Computes also the directional derivative, that is, mult times gradient times solution.

Parameters
masterprobthe SCIP instance of the master problem
subproblemthe SCIP instance of the subproblem
bendersthe benders' decomposition structure
nlrownonlinear row
exprintexpressions interpreter
multmultiplier
primalvalsthe primal solutions for the NLP, can be NULL
var2idxmapping from variable of the subproblem to the index in the dual arrays, can be NULL
dirderivstorage to add directional derivative
varspointer to array of variables in the generated cut with non-zero coefficient
valspointer to array of coefficients of the variables in the generated cut
nvarsthe number of variables in the cut
varssizethe number of variables in the array

Definition at line 1029 of file benderscut_opt.c.

References addVariableToArray(), SCIP_QuadElement::coef, getNlpVarSol(), SCIP_QuadElement::idx1, SCIP_QuadElement::idx2, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPexprintCompile(), SCIPexprintGrad(), SCIPexprtreeGetInterpreterData(), SCIPexprtreeGetNVars(), SCIPexprtreeGetVars(), SCIPfreeBufferArray, SCIPgetBendersMasterVar(), SCIPnlrowGetExprtree(), SCIPnlrowGetLinearCoefs(), SCIPnlrowGetLinearVars(), SCIPnlrowGetNLinearVars(), SCIPnlrowGetNQuadElems(), SCIPnlrowGetNQuadVars(), SCIPnlrowGetQuadElems(), SCIPnlrowGetQuadVars(), TRUE, and x.

Referenced by computeStandardNLPFeasibilityCut(), and computeStandardNLPOptimalityCut().