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
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
-
scip SCIP data structure benders Benders' 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
-
scip SCIP data structure benders Benders' 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
-
scip SCIP data structure benders Benders' 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
-
scip SCIP data structure benders Benders' 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
-
scip SCIP data structure benders Benders' decomposition
Definition at line 743 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
-
masterprob the SCIP instance of the master problem subproblem the SCIP instance of the pricing problem benders the benders' decomposition benderscut the benders' decomposition cut method sol primal CIP solution probnumber the number of the pricing problem cutname the name for the cut to be generated objective the objective function of the subproblem primalvals the primal solutions for the NLP, can be NULL consdualvals dual variables for the constraints, can be NULL varlbdualvals the dual variables for the variable lower bounds, can be NULL varubdualvals the dual variables for the variable upper bounds, can be NULL row2idx mapping between the row in the subproblem to the index in the dual array, can be NULL var2idx mapping from variable of the subproblem to the index in the dual arrays, can be NULL type the enforcement type calling this function addcut should the Benders' cut be added as a cut or constraint feasibilitycut is this called for the generation of a feasibility cut result the result from solving the subproblems
Definition at line 783 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
-
masterprob the SCIP instance of the master problem subproblem the SCIP instance of the subproblem benders the benders' decomposition structure nlrow nonlinear row exprint expressions interpreter mult multiplier primalvals the primal solutions for the NLP, can be NULL var2idx mapping from variable of the subproblem to the index in the dual arrays, can be NULL dirderiv storage to add directional derivative vars pointer to array of variables in the generated cut with non-zero coefficient vals pointer to array of coefficients of the variables in the generated cut nvars the number of variables in the cut varssize the number of variables in the array
Definition at line 1027 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().