Detailed Description
methods for Benders' decomposition plugins
Function Documentation
◆ SCIP_DECL_SORTPTRCOMP() [1/2]
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP | ( | SCIPbendersComp | ) |
◆ SCIP_DECL_SORTPTRCOMP() [2/2]
SCIP_EXPORT SCIP_DECL_SORTPTRCOMP | ( | SCIPbendersCompName | ) |
comparison method for sorting benderss w.r.t. to their name
comparison method for sorting Benders' decompositions w.r.t. to their name
Definition at line 859 of file benders.c.
References SCIPbendersGetName().
◆ SCIPbendersGetData()
SCIP_EXPORT SCIP_BENDERSDATA* SCIPbendersGetData | ( | SCIP_BENDERS * | benders | ) |
gets user data of Benders' decomposition
- Parameters
-
benders Benders' decomposition
Definition at line 5730 of file benders.c.
References SCIP_Benders::bendersdata, and NULL.
Referenced by createVariableMappings(), SCIP_DECL_BENDERSCOPY(), SCIP_DECL_BENDERSCREATESUB(), SCIP_DECL_BENDERSEXIT(), SCIP_DECL_BENDERSEXITPRE(), SCIP_DECL_BENDERSEXITSOL(), SCIP_DECL_BENDERSFREE(), SCIP_DECL_BENDERSFREESUB(), SCIP_DECL_BENDERSGETVAR(), SCIP_DECL_BENDERSINIT(), SCIP_DECL_BENDERSINITPRE(), SCIP_DECL_BENDERSINITSOL(), SCIP_DECL_BENDERSPOSTSOLVE(), SCIP_DECL_BENDERSPRESUBSOLVE(), SCIP_DECL_BENDERSSOLVESUB(), SCIP_DECL_BENDERSSOLVESUBCONVEX(), SCIPcreateBendersDefault(), SCIPfindObjBenders(), and SCIPgetObjBenders().
◆ SCIPbendersSetData()
SCIP_EXPORT void SCIPbendersSetData | ( | SCIP_BENDERS * | benders, |
SCIP_BENDERSDATA * | bendersdata | ||
) |
sets user data of Benders' decomposition; user has to free old data in advance!
- Parameters
-
benders Benders' decomposition bendersdata new Benders' decomposition user data
Definition at line 5740 of file benders.c.
References SCIP_Benders::bendersdata, and NULL.
Referenced by SCIP_DECL_BENDERSFREE().
◆ SCIPbendersGetName()
SCIP_EXPORT const char* SCIPbendersGetName | ( | SCIP_BENDERS * | benders | ) |
gets name of Benders' decomposition
- Parameters
-
benders Benders' decomposition
Definition at line 5905 of file benders.c.
References SCIP_Benders::name, and NULL.
Referenced by addAuxiliaryVariablesToMaster(), assignAuxiliaryVariables(), createAndAddTransferredCut(), doBenderscutCreate(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_SORTPTRCOMP(), SCIPbendersCopyInclude(), SCIPbendersExec(), SCIPincludeBenderscutInt(), SCIPincludeBenderscutNogood(), SCIPincludeBenderscutOpt(), SCIPprintBendersStatistics(), SCIPsetBendersSolveAndFreesub(), SCIPsetFindPricer(), and transferBendersCuts().
◆ SCIPbendersGetDesc()
SCIP_EXPORT const char* SCIPbendersGetDesc | ( | SCIP_BENDERS * | benders | ) |
gets description of Benders' decomposition
- Parameters
-
benders Benders' decomposition
Definition at line 5915 of file benders.c.
References SCIP_Benders::desc, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPbendersGetPriority()
SCIP_EXPORT int SCIPbendersGetPriority | ( | SCIP_BENDERS * | benders | ) |
gets priority of Benders' decomposition
- Parameters
-
benders Benders' decomposition
Definition at line 5925 of file benders.c.
References NULL, and SCIP_Benders::priority.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPbendersGetNSubproblems()
SCIP_EXPORT int SCIPbendersGetNSubproblems | ( | SCIP_BENDERS * | benders | ) |
gets the number of subproblems for the Benders' decomposition
- Parameters
-
benders the Benders' decomposition data structure
Definition at line 5949 of file benders.c.
References SCIP_Benders::nsubproblems, and NULL.
Referenced by addAuxiliaryVariablesToMaster(), addSlackVarsToConstraints(), assignAuxiliaryVariables(), checkSubproblemConvexity(), checkSubproblemIndependence(), constructValidSolution(), createSolveSubproblemIndexList(), createSubproblems(), generateBendersCuts(), initialiseLPSubproblem(), initialiseSubproblem(), numSubproblemsToCheck(), resetSubproblemObjectiveValue(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTINIT(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_EVENTEXEC(), SCIPbendersChgMastervarsToCont(), SCIPbendersDeactivate(), SCIPbendersExec(), SCIPbendersExit(), SCIPbendersExitsol(), SCIPbendersGetAuxiliaryVar(), SCIPbendersGetMastervarsCont(), SCIPbendersGetSubproblemLowerbound(), SCIPbendersGetSubproblemObjval(), SCIPbendersGetSubproblemType(), SCIPbendersSetMastervarsCont(), SCIPbendersSetSubproblemEnabled(), SCIPbendersSetSubproblemIsConvex(), SCIPbendersSetSubproblemIsIndependent(), SCIPbendersSetSubproblemIsNonlinear(), SCIPbendersSetSubproblemIsSetup(), SCIPbendersSetSubproblemObjval(), SCIPbendersSetSubproblemType(), SCIPbendersSetupSubproblem(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblem(), SCIPbendersSubproblemIsConvex(), SCIPbendersSubproblemIsEnabled(), SCIPbendersSubproblemIsIndependent(), SCIPbendersSubproblemIsNonlinear(), SCIPbendersSubproblemIsSetup(), SCIPbendersUpdateSubproblemLowerbound(), SCIPcheckBendersSubproblemOptimality(), SCIPgetBendersAuxiliaryVarVal(), SCIPgetBendersNSubproblems(), unboundedAuxiliaryVariables(), updateAuxiliaryVarLowerbound(), updateSubproblemLowerbound(), and updateSubproblemStatQueue().
◆ SCIPbendersSubproblem()
SCIP_EXPORT SCIP* SCIPbendersSubproblem | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns the SCIP instance for a given subproblem
- Parameters
-
benders the Benders' decomposition data structure probnumber the subproblem number
Definition at line 5959 of file benders.c.
References NULL, and SCIP_Benders::subproblems.
Referenced by addAuxiliaryVariablesToMaster(), addSlackVarsToConstraints(), checkSubproblemConvexity(), computeStandardIntegerOptCut(), createSubproblems(), initialiseLPSubproblem(), initialiseSubproblem(), resetSubproblemObjectiveValue(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_DIALOGEXEC(), SCIPbendersChgMastervarsToCont(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersDeactivate(), SCIPbendersExec(), SCIPbendersExecSubproblemSolve(), SCIPbendersFreeSubproblem(), SCIPbendersMergeSubproblemIntoMaster(), SCIPbendersSetMastervarsCont(), SCIPbendersSetupSubproblem(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblem(), SCIPbendersSolveSubproblemCIP(), SCIPbendersSolveSubproblemLP(), SCIPcheckBendersSubproblemOptimality(), solveBendersSubproblems(), updateEventhdlrUpperbound(), and updateSubproblemStatQueue().
◆ SCIPbendersGetNCalls()
SCIP_EXPORT int SCIPbendersGetNCalls | ( | SCIP_BENDERS * | benders | ) |
gets the number of times, the Bender' decomposition was called and tried to find a violated second stage constraint
gets the number of times, the Benders' decomposition was called and tried to find a variable with negative reduced costs
- Parameters
-
benders Benders' decomposition
Definition at line 5971 of file benders.c.
References SCIP_Benders::ncalls, and NULL.
Referenced by SCIP_DECL_BENDERSCUTEXEC(), SCIPbendersExec(), and SCIPprintBendersStatistics().
◆ SCIPbendersGetNCutsFound()
SCIP_EXPORT int SCIPbendersGetNCutsFound | ( | SCIP_BENDERS * | benders | ) |
gets the number of optimality cuts found by the collection of Benders' decomposition subproblems
- Parameters
-
benders Benders' decomposition
Definition at line 5981 of file benders.c.
References SCIP_Benders::ncutsfound, and NULL.
Referenced by performInteriorSolCutStrengthening(), and SCIPprintBendersStatistics().
◆ SCIPbendersGetNStrengthenCutsFound()
SCIP_EXPORT int SCIPbendersGetNStrengthenCutsFound | ( | SCIP_BENDERS * | benders | ) |
gets the number of cuts found from the strengthening round
- Parameters
-
benders Benders' decomposition
Definition at line 5991 of file benders.c.
References SCIP_Benders::nstrengthencuts, and NULL.
Referenced by SCIPprintBendersStatistics().
◆ SCIPbendersGetNStrengthenCalls()
SCIP_EXPORT int SCIPbendersGetNStrengthenCalls | ( | SCIP_BENDERS * | benders | ) |
gets the number of calls to the strengthening round
- Parameters
-
benders Benders' decomposition
Definition at line 6001 of file benders.c.
References SCIP_Benders::nstrengthencalls, and NULL.
Referenced by SCIPprintBendersStatistics().
◆ SCIPbendersGetNStrengthenFails()
SCIP_EXPORT int SCIPbendersGetNStrengthenFails | ( | SCIP_BENDERS * | benders | ) |
gets the number of calls to the strengthening round that fail
- Parameters
-
benders Benders' decomposition
Definition at line 6011 of file benders.c.
References SCIP_Benders::nstrengthenfails, and NULL.
Referenced by SCIPprintBendersStatistics().
◆ SCIPbendersGetSetupTime()
SCIP_EXPORT SCIP_Real SCIPbendersGetSetupTime | ( | SCIP_BENDERS * | benders | ) |
gets time in seconds used in this Benders' decomposition for setting up for next stages
- Parameters
-
benders Benders' decomposition
Definition at line 6021 of file benders.c.
References NULL, SCIPclockGetTime(), and SCIP_Benders::setuptime.
Referenced by SCIPprintBendersStatistics().
◆ SCIPbendersGetTime()
SCIP_EXPORT SCIP_Real SCIPbendersGetTime | ( | SCIP_BENDERS * | benders | ) |
gets execution time in seconds used in this Benders' decomposition
gets time in seconds used in this Benders' decomposition
- Parameters
-
benders Benders' decomposition
Definition at line 6031 of file benders.c.
References SCIP_Benders::bendersclock, NULL, and SCIPclockGetTime().
Referenced by SCIPprintBendersStatistics().
◆ SCIPbendersIsInitialized()
SCIP_EXPORT SCIP_Bool SCIPbendersIsInitialized | ( | SCIP_BENDERS * | benders | ) |
Is Benders' decomposition initialized?
is Benders' decomposition initialized?
- Parameters
-
benders Benders' decomposition
Definition at line 6053 of file benders.c.
References SCIP_Benders::initialized, and NULL.
◆ SCIPbendersIsActive()
SCIP_EXPORT SCIP_Bool SCIPbendersIsActive | ( | SCIP_BENDERS * | benders | ) |
returns whether the given Benders' decomposition is in use in the current problem
- Parameters
-
benders the Benders' decomposition structure
Definition at line 2683 of file benders.c.
References SCIP_Benders::active, and NULL.
Referenced by SCIP_DECL_BENDERSCOPY(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_EVENTINITSOL(), SCIPbendersCopyInclude(), and SCIPprintBendersStatistics().
◆ SCIPbendersOnlyCheckConvexRelax()
SCIP_EXPORT SCIP_Bool SCIPbendersOnlyCheckConvexRelax | ( | SCIP_BENDERS * | benders, |
SCIP_Bool | subscipsoff | ||
) |
Returns whether only the convex relaxations will be checked in this solve loop when Benders' is used in the LNS heuristics, only the convex relaxations of the master/subproblems are checked, i.e. no integer cuts are generated. In this case, then Benders' decomposition is performed under the assumption that all subproblems are convex relaxations.
- Parameters
-
benders Benders' decomposition subscipsoff flag indicating whether plugins using sub-SCIPs are deactivated
Definition at line 2995 of file benders.c.
References SCIP_Benders::iscopy, and SCIP_Benders::lnscheck.
Referenced by executeUserDefinedSolvesub(), generateBendersCuts(), numSubproblemsToCheck(), SCIP_DECL_EVENTINITSOL(), SCIPbendersExec(), and solveBendersSubproblems().
◆ SCIPbendersCutLP()
SCIP_EXPORT SCIP_Bool SCIPbendersCutLP | ( | SCIP_BENDERS * | benders | ) |
Are Benders' cuts generated from the LP solutions?
- Parameters
-
benders Benders' decomposition
Definition at line 6063 of file benders.c.
References SCIP_Benders::cutlp, and NULL.
Referenced by SCIPconsBendersEnforceSolution().
◆ SCIPbendersCutPseudo()
SCIP_EXPORT SCIP_Bool SCIPbendersCutPseudo | ( | SCIP_BENDERS * | benders | ) |
Are Benders' cuts generated from the pseudo solutions?
- Parameters
-
benders Benders' decomposition
Definition at line 6073 of file benders.c.
References SCIP_Benders::cutpseudo, and NULL.
Referenced by SCIPconsBendersEnforceSolution().
◆ SCIPbendersCutRelaxation()
SCIP_EXPORT SCIP_Bool SCIPbendersCutRelaxation | ( | SCIP_BENDERS * | benders | ) |
Are Benders' cuts generated from the relaxation solutions?
- Parameters
-
benders Benders' decomposition
Definition at line 6083 of file benders.c.
References SCIP_Benders::cutrelax, and NULL.
Referenced by SCIPconsBendersEnforceSolution().
◆ SCIPbendersShareAuxVars()
SCIP_EXPORT SCIP_Bool SCIPbendersShareAuxVars | ( | SCIP_BENDERS * | benders | ) |
Should this Benders' use the auxiliary variables from the highest priority Benders'?
should this Benders' use the auxiliary variables from the highest priority Benders'
- Parameters
-
benders Benders' decomposition
Definition at line 6093 of file benders.c.
References NULL, and SCIP_Benders::shareauxvars.
Referenced by addAuxiliaryVariablesToMaster(), and assignAuxiliaryVariables().
◆ SCIPbendersSetSubproblemIsSetup()
SCIP_EXPORT void SCIPbendersSetSubproblemIsSetup | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | issetup | ||
) |
sets the subproblem setup flag
- Parameters
-
benders Benders' decomposition probnumber the subproblem number issetup flag to indicate whether the subproblem has been setup
Definition at line 6518 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobsetup.
Referenced by SCIPbendersFreeSubproblem(), and SCIPbendersSetupSubproblem().
◆ SCIPbendersSubproblemIsSetup()
SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsSetup | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns the subproblem setup flag
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6531 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobsetup.
Referenced by SCIPbendersExecSubproblemSolve(), SCIPbendersSolveSubproblem(), and SCIPbendersSolveSubproblemLP().
◆ SCIPbendersGetAuxiliaryVar()
SCIP_EXPORT SCIP_VAR* SCIPbendersGetAuxiliaryVar | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns the auxiliary variable for the given subproblem
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6141 of file benders.c.
References SCIP_Benders::auxiliaryvars, NULL, and SCIPbendersGetNSubproblems().
Referenced by addAuxiliaryVariablesToMaster(), addAuxiliaryVariableToCut(), generateAndApplyBendersIntegerCuts(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersGetAuxiliaryVarVal(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcheckBendersSubproblemOptimality(), updateAuxiliaryVarLowerbound(), updateSubproblemCutConstant(), and updateSubproblemLowerbound().
◆ SCIPbendersGetAuxiliaryVars()
SCIP_EXPORT SCIP_VAR** SCIPbendersGetAuxiliaryVars | ( | SCIP_BENDERS * | benders | ) |
returns all auxiliary variables
- Parameters
-
benders Benders' decomposition
Definition at line 6153 of file benders.c.
References SCIP_Benders::auxiliaryvars, and NULL.
Referenced by constructValidSolution().
◆ SCIPbendersSetSubproblemObjval()
SCIP_EXPORT void SCIPbendersSetSubproblemObjval | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Real | objval | ||
) |
stores the objective function value of the subproblem for use in cut generation
- Parameters
-
benders the Benders' decomposition structure probnumber the subproblem number objval the objective function value for the subproblem
Definition at line 6163 of file benders.c.
References SCIP_Benders::bestsubprobobjval, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobobjval.
Referenced by resetSubproblemObjectiveValue(), SCIPbendersExecSubproblemSolve(), and solveBendersSubproblems().
◆ SCIPbendersGetSubproblemObjval()
SCIP_EXPORT SCIP_Real SCIPbendersGetSubproblemObjval | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns the objective function value of the subproblem for use in cut generation
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6180 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobobjval.
Referenced by computeStandardIntegerOptCut(), constructValidSolution(), SCIP_DECL_BENDERSCUTEXEC(), SCIPbendersSubproblemIsOptimal(), and solveBendersSubproblems().
◆ SCIPbendersGetNStoredCuts()
SCIP_EXPORT int SCIPbendersGetNStoredCuts | ( | SCIP_BENDERS * | benders | ) |
returns the number of cuts that have been added for storage
- Parameters
-
benders Benders' decomposition
Definition at line 6725 of file benders.c.
References SCIP_Benders::nstoredcuts, and NULL.
Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().
◆ SCIPbendersGetStoredCutData()
SCIP_EXPORT SCIP_RETCODE SCIPbendersGetStoredCutData | ( | SCIP_BENDERS * | benders, |
int | cutidx, | ||
SCIP_VAR *** | vars, | ||
SCIP_Real ** | vals, | ||
SCIP_Real * | lhs, | ||
SCIP_Real * | rhs, | ||
int * | nvars | ||
) |
returns the data for the cuts that have been added by the Benders' cut plugin
returns the cuts that have been stored for transfer
- Parameters
-
benders Benders' decomposition cutidx the index for the cut data that is requested vars the variables that have non-zero coefficients in the cut vals the coefficients of the variables in the cut lhs the left hand side of the cut rhs the right hand side of the cut nvars the number of variables with non-zero coefficients in the cut
Definition at line 6735 of file benders.c.
References SCIP_BenderscutCut::lhs, NULL, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_OKAY, SCIP_Benders::storedcuts, SCIP_BenderscutCut::vals, and SCIP_BenderscutCut::vars.
Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().
◆ SCIPbendersGetStoredCutOrigData()
SCIP_EXPORT SCIP_RETCODE SCIPbendersGetStoredCutOrigData | ( | SCIP_BENDERS * | benders, |
int | cutidx, | ||
SCIP_VAR *** | vars, | ||
SCIP_Real ** | vals, | ||
SCIP_Real * | lhs, | ||
SCIP_Real * | rhs, | ||
int * | nvars, | ||
int | varssize | ||
) |
returns the original problem data for the cuts that have been added by the Benders' cut plugin. The stored variables and values will populate the input vars and vals arrays. Thus, memory must be allocated for the vars and vals arrays
- Parameters
-
benders Benders' decomposition cut cutidx the index for the cut data that is requested vars the variables that have non-zero coefficients in the cut vals the coefficients of the variables in the cut lhs the left hand side of the cut rhs the right hand side of the cut nvars the number of variables with non-zero coefficients in the cut varssize the available slots in the array
Definition at line 6766 of file benders.c.
References SCIP_BenderscutCut::lhs, NULL, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPvarGetOrigvarSum(), SCIP_Benders::storedcuts, SCIP_BenderscutCut::vals, and SCIP_BenderscutCut::vars.
◆ SCIPfindBenderscut()
SCIP_EXPORT SCIP_BENDERSCUT* SCIPfindBenderscut | ( | SCIP_BENDERS * | benders, |
const char * | name | ||
) |
returns the Benders' cut of the given name, or NULL if not existing
- Parameters
-
benders Benders' decomposition name name of Benderscut' decomposition
Definition at line 6898 of file benders.c.
References SCIP_Benders::benderscuts, SCIP_Benders::nbenderscuts, NULL, and SCIPbenderscutGetName().
Referenced by SCIPfindObjBenderscut(), SCIPincludeBenderscut(), and SCIPincludeBenderscutBasic().
◆ SCIPbendersGetBenderscuts()
SCIP_EXPORT SCIP_BENDERSCUT** SCIPbendersGetBenderscuts | ( | SCIP_BENDERS * | benders | ) |
returns the array of currently available Benders' cuts; active Benders' decomposition are in the first slots of the array
- Parameters
-
benders Benders' decomposition
Definition at line 6920 of file benders.c.
References SCIP_Benders::benderscuts, SCIP_Benders::benderscutsnamessorted, SCIP_Benders::benderscutssorted, FALSE, SCIP_Benders::nbenderscuts, NULL, SCIPsortPtr(), and TRUE.
Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().
◆ SCIPbendersGetNBenderscuts()
SCIP_EXPORT int SCIPbendersGetNBenderscuts | ( | SCIP_BENDERS * | benders | ) |
returns the number of currently available Benders' cuts
- Parameters
-
benders Benders' decomposition
Definition at line 6937 of file benders.c.
References SCIP_Benders::nbenderscuts, and NULL.
Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().
◆ SCIPbendersSetBenderscutPriority()
SCIP_EXPORT SCIP_RETCODE SCIPbendersSetBenderscutPriority | ( | SCIP_BENDERS * | benders, |
SCIP_BENDERSCUT * | benderscut, | ||
int | priority | ||
) |
sets the priority of a Benders' decomposition
- Parameters
-
benders Benders' decomposition benderscut Benders' cut priority new priority of the Benders' decomposition
Definition at line 6947 of file benders.c.
References SCIP_Benders::benderscutssorted, FALSE, NULL, SCIP_Benderscut::priority, and SCIP_OKAY.
◆ SCIPbendersSolSlackVarsActive()
SCIP_EXPORT SCIP_RETCODE SCIPbendersSolSlackVarsActive | ( | SCIP_BENDERS * | benders, |
SCIP_Bool * | activeslack | ||
) |
returns whether the solution has non-zero slack variables
- Parameters
-
benders Benders' decomposition activeslack flag to indicate whether a slack variable is active
Definition at line 6192 of file benders.c.
References FALSE, SCIP_Benders::feasibilityphase, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPcreateCurrentSol(), SCIPcreateNLPSol(), SCIPfreeSol(), SCIPgetBestSol(), SCIPgetNNlpis(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisNLPConstructed(), SCIPisZero(), SCIPvarGetName(), SLACKVAR_NAME, and TRUE.
Referenced by SCIPbendersExec().
◆ SCIPbendersSetSubproblemType()
SCIP_EXPORT void SCIPbendersSetSubproblemType | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_BENDERSSUBTYPE | subprobtype | ||
) |
sets the subproblem type
The subproblem types are:
- Convex constraints with continuous variables
- Convex constraints with discrete variables
- Non-convex constraints with continuous variables
- Non-convex constraints with discrete variables
- Parameters
-
benders Benders' decomposition probnumber the subproblem number subprobtype the subproblem type
Definition at line 6277 of file benders.c.
References SCIP_Benders::nconvexsubprobs, SCIP_Benders::nsubproblems, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobtype.
Referenced by checkSubproblemConvexity(), and SCIPbendersSetMastervarsCont().
◆ SCIPbendersGetSubproblemType()
SCIP_EXPORT SCIP_BENDERSSUBTYPE SCIPbendersGetSubproblemType | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns the type of the subproblem
This type is used to determine whether the duals of the problem can be used to generate cuts
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6302 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobtype.
Referenced by checkSubproblemConvexity(), createSubproblems(), generateBendersCuts(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_DIALOGEXEC(), SCIPbendersChgMastervarsToCont(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersExecSubproblemSolve(), SCIPbendersFreeSubproblem(), SCIPbendersSetMastervarsCont(), SCIPbendersSetupSubproblem(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblem(), SCIPbendersSolveSubproblemLP(), and solveBendersSubproblems().
◆ SCIPbendersSetSubproblemIsConvex()
SCIP_EXPORT void SCIPbendersSetSubproblemIsConvex | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | isconvex | ||
) |
sets the flag indicating whether a subproblem is convex
It is possible that this can change during the solving process. One example is when the three-phase method is employed, where the first phase solves the convex relaxation of both the master and subproblems, the second phase reintroduces the integrality constraints to the master problem and the third phase then reintroduces integrality constraints to the subproblems.
- Parameters
-
benders Benders' decomposition probnumber the subproblem number isconvex flag to indicate whether the subproblem is convex
Definition at line 6320 of file benders.c.
References SCIP_Benders::nconvexsubprobs, SCIP_Benders::nsubproblems, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisconvex.
◆ SCIPbendersSubproblemIsConvex()
SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsConvex | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns whether the subproblem is convex
This means that the dual solution can be used to generate cuts.
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6343 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisconvex.
◆ SCIPbendersGetNConvexSubproblems()
SCIP_EXPORT int SCIPbendersGetNConvexSubproblems | ( | SCIP_BENDERS * | benders | ) |
returns the number of subproblems that are convex
- Parameters
-
benders Benders' decomposition
Definition at line 6355 of file benders.c.
References SCIP_Benders::nconvexsubprobs, and NULL.
Referenced by generateBendersCuts(), SCIP_DECL_EVENTEXEC(), and SCIPbendersExec().
◆ SCIPbendersSetSubproblemIsNonlinear()
SCIP_EXPORT void SCIPbendersSetSubproblemIsNonlinear | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | isnonlinear | ||
) |
sets the flag indicating whether a subproblem contains non-linear constraints
- Parameters
-
benders Benders' decomposition probnumber the subproblem number isnonlinear flag to indicate whether the subproblem contains non-linear constraints
Definition at line 6365 of file benders.c.
References SCIP_Benders::nnonlinearsubprobs, SCIP_Benders::nsubproblems, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisnonlinear.
Referenced by checkSubproblemConvexity().
◆ SCIPbendersSubproblemIsNonlinear()
SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsNonlinear | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns whether the subproblem contains non-linear constraints.
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6385 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisnonlinear.
Referenced by createSubproblems().
◆ SCIPbendersGetNNonlinearSubproblems()
SCIP_EXPORT int SCIPbendersGetNNonlinearSubproblems | ( | SCIP_BENDERS * | benders | ) |
returns the number of subproblems that contain non-linear constraints
- Parameters
-
benders Benders' decomposition
Definition at line 6397 of file benders.c.
References SCIP_Benders::nnonlinearsubprobs, and NULL.
◆ SCIPbendersSetMasterIsNonlinear()
SCIP_EXPORT void SCIPbendersSetMasterIsNonlinear | ( | SCIP_BENDERS * | benders, |
SCIP_Bool | isnonlinear | ||
) |
sets the flag indicating whether the master problem contains non-linear constraints
- Parameters
-
benders Benders' decomposition isnonlinear flag to indicate whether the subproblem contains non-linear constraints
Definition at line 6407 of file benders.c.
References SCIP_Benders::masterisnonlinear, and NULL.
Referenced by checkSubproblemConvexity().
◆ SCIPbendersMasterIsNonlinear()
SCIP_EXPORT SCIP_Bool SCIPbendersMasterIsNonlinear | ( | SCIP_BENDERS * | benders | ) |
returns whether the master problem contains non-linear constraints.
- Parameters
-
benders Benders' decomposition
Definition at line 6418 of file benders.c.
References SCIP_Benders::masterisnonlinear, and NULL.
Referenced by SCIP_DECL_BENDERSCUTEXEC().
◆ SCIPbendersInStrengthenRound()
SCIP_EXPORT SCIP_Bool SCIPbendersInStrengthenRound | ( | SCIP_BENDERS * | benders | ) |
returns the flag indicating that Benders' decomposition is in a cut strengthening round
- Parameters
-
benders Benders' decomposition
Definition at line 6428 of file benders.c.
References NULL, and SCIP_Benders::strengthenround.
Referenced by SCIPgenerateAndApplyBendersOptCut().
◆ SCIPbendersSolveSubproblemLP()
SCIP_EXPORT SCIP_RETCODE SCIPbendersSolveSubproblemLP | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | probnumber, | ||
SCIP_STATUS * | solvestatus, | ||
SCIP_Real * | objective | ||
) |
solves the LP of the Benders' decomposition subproblem
This requires that the subproblem is in probing mode.
- Parameters
-
scip the SCIP data structure benders the Benders' decomposition data structure probnumber the subproblem number solvestatus status of subproblem solve objective optimal value of subproblem, if solved to optimality
Definition at line 4749 of file benders.c.
References FALSE, NULL, resetOrigSubproblemParams(), SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_Bool, SCIP_CALL, SCIP_LPSOLSTAT_ERROR, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_TIMELIMIT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_VERBLEVEL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPTERMSTAT_OKAY, SCIP_NLPTERMSTAT_TILIM, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_VERBLEVEL_FULL, SCIPABORT, SCIPallocBlockMemory, SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsSetup(), SCIPcreateNLPSol(), SCIPdebugMsg, SCIPerrorMessage, SCIPfreeBlockMemory, SCIPfreeSol(), SCIPgetLPSolstat(), SCIPgetNLPObjval(), SCIPgetNLPSolstat(), SCIPgetNLPTermstat(), SCIPgetNNlpis(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPinfinity(), SCIPinProbing(), SCIPisLPConstructed(), SCIPisNLPConstructed(), SCIPprintSol(), SCIPretransformObj(), SCIPsetNLPIntPar(), SCIPsolveNLP(), SCIPsolveProbingLP(), SCIPverbMessage(), setSubproblemParams(), storeOrigSubproblemParams(), and TRUE.
Referenced by SCIPbendersExecSubproblemSolve(), and SCIPbendersSolveSubproblem().
◆ SCIPbendersSolveSubproblemCIP()
SCIP_EXPORT SCIP_RETCODE SCIPbendersSolveSubproblemCIP | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | probnumber, | ||
SCIP_STATUS * | solvestatus, | ||
SCIP_Bool | solvecip | ||
) |
solves the Benders' decomposition subproblem
- Parameters
-
scip the SCIP data structure benders the Benders' decomposition data structure probnumber the subproblem number solvestatus status of subproblem solve solvecip directly solve the CIP subproblem
Definition at line 4913 of file benders.c.
References MIPNODEFOCUS_EVENTHDLR_NAME, NULL, resetOrigSubproblemParams(), SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_USERINTERRUPT, SCIP_VERBLEVEL_FULL, SCIPABORT, SCIPallocBlockMemory, SCIPbendersSubproblem(), SCIPendProbing(), SCIPerrorMessage, SCIPeventhdlrGetData(), SCIPfindEventhdlr(), SCIPfreeBlockMemory, SCIPgetStage(), SCIPgetStatus(), SCIPinProbing(), SCIPrestartSolve(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsolve(), setSubproblemParams(), storeOrigSubproblemParams(), and TRUE.
Referenced by initialiseSubproblem(), SCIPbendersExecSubproblemSolve(), and SCIPbendersSolveSubproblem().
◆ SCIPbendersGetNTransferredCuts()
SCIP_EXPORT int SCIPbendersGetNTransferredCuts | ( | SCIP_BENDERS * | benders | ) |
returns the number of cuts that have been transferred from sub SCIPs to the master SCIP
- Parameters
-
benders the Benders' decomposition data structure
Definition at line 6682 of file benders.c.
References SCIP_Benders::ntransferred, and NULL.
Referenced by createAndAddTransferredCut(), and SCIPprintBendersStatistics().
◆ SCIPbendersUpdateSubproblemLowerbound()
SCIP_EXPORT void SCIPbendersUpdateSubproblemLowerbound | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Real | lowerbound | ||
) |
updates the lower bound for the subproblem. If the lower bound is not greater than the previously stored lowerbound, then no update occurs.
- Parameters
-
benders Benders' decomposition probnumber the subproblem number lowerbound the lower bound
Definition at line 6694 of file benders.c.
References EPSGE, NULL, SCIPbendersGetNSubproblems(), SCIPdebugMessage, and SCIP_Benders::subproblowerbound.
Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), SCIP_DECL_CONSPRESOL(), updateAuxiliaryVarLowerbound(), and updateSubproblemLowerbound().
◆ SCIPbendersGetSubproblemLowerbound()
SCIP_EXPORT SCIP_Real SCIPbendersGetSubproblemLowerbound | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns the stored lower bound for the given subproblem
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6713 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subproblowerbound.
Referenced by solveBendersSubproblems(), updateSubproblemCutConstant(), and updateSubproblemLowerbound().
◆ SCIPbendersSetSubproblemIsIndependent()
SCIP_EXPORT void SCIPbendersSetSubproblemIsIndependent | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | isindep | ||
) |
sets the independent subproblem flag
- Parameters
-
benders Benders' decomposition probnumber the subproblem number isindep flag to indicate whether the subproblem is independent
Definition at line 6543 of file benders.c.
References SCIP_Benders::indepsubprob, SCIP_Benders::nactivesubprobs, SCIP_Benders::name, NULL, SCIP_Bool, SCIPABORT, SCIPbendersGetNSubproblems(), SCIPerrorMessage, and subproblemIsActive().
Referenced by checkSubproblemIndependence(), and SCIPbendersExitsol().
◆ SCIPbendersSubproblemIsIndependent()
SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsIndependent | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns whether the subproblem is independent
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6583 of file benders.c.
References SCIP_Benders::indepsubprob, NULL, and SCIPbendersGetNSubproblems().
Referenced by SCIPbendersComputeSubproblemLowerbound(), SCIPbendersExitsol(), SCIPbendersSolveSubproblem(), and subproblemIsActive().
◆ SCIPbendersSubproblemIsEnabled()
SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsEnabled | ( | SCIP_BENDERS * | benders, |
int | probnumber | ||
) |
returns whether the subproblem is enabled, i.e. the subproblem is still solved in the solving loop.
- Parameters
-
benders Benders' decomposition probnumber the subproblem number
Definition at line 6623 of file benders.c.
References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobenabled.
Referenced by subproblemIsActive().
◆ SCIPincludeBenders()
SCIP_EXPORT SCIP_RETCODE SCIPincludeBenders | ( | SCIP * | scip, |
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
SCIP_Bool | cutlp, | ||
SCIP_Bool | cutpseudo, | ||
SCIP_Bool | cutrelax, | ||
SCIP_Bool | shareauxvars, | ||
SCIP_DECL_BENDERSCOPY((*benderscopy)) | , | ||
SCIP_DECL_BENDERSFREE((*bendersfree)) | , | ||
SCIP_DECL_BENDERSINIT((*bendersinit)) | , | ||
SCIP_DECL_BENDERSEXIT((*bendersexit)) | , | ||
SCIP_DECL_BENDERSINITPRE((*bendersinitpre)) | , | ||
SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)) | , | ||
SCIP_DECL_BENDERSINITSOL((*bendersinitsol)) | , | ||
SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)) | , | ||
SCIP_DECL_BENDERSGETVAR((*bendersgetvar)) | , | ||
SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)) | , | ||
SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)) | , | ||
SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)) | , | ||
SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)) | , | ||
SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)) | , | ||
SCIP_DECL_BENDERSFREESUB((*bendersfreesub)) | , | ||
SCIP_BENDERSDATA * | bendersdata | ||
) |
creates a Benders' decomposition and includes it in SCIP
To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders(). This should be done during the problem creation stage.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Note
- method has all Benders' decomposition callbacks as arguments and is thus changed every time a new callback is added in future releases; consider using SCIPincludeBendersBasic() and setter functions if you seek for a method which is less likely to change in future releases
- Parameters
-
scip SCIP data structure name name of Benders' decomposition desc description of Benders' decomposition priority priority of the Benders' decomposition cutlp should Benders' cuts be generated for LP solutions cutpseudo should Benders' cuts be generated for pseudo solutions cutrelax should Benders' cuts be generated for relaxation solutions shareauxvars should this Benders' use the highest priority Benders aux vars bendersdata Benders' decomposition data
Definition at line 67 of file scip_benders.c.
References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbendersCreate(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenders(), SCIPsetIncludeBenders(), Scip::set, SCIP_Mem::setmem, and TRUE.
Referenced by SCIPincludeObjBenders().
◆ SCIPincludeBendersBasic()
SCIP_EXPORT SCIP_RETCODE SCIPincludeBendersBasic | ( | SCIP * | scip, |
SCIP_BENDERS ** | bendersptr, | ||
const char * | name, | ||
const char * | desc, | ||
int | priority, | ||
SCIP_Bool | cutlp, | ||
SCIP_Bool | cutpseudo, | ||
SCIP_Bool | cutrelax, | ||
SCIP_Bool | shareauxvars, | ||
SCIP_DECL_BENDERSGETVAR((*bendersgetvar)) | , | ||
SCIP_DECL_BENDERSCREATESUB((*benderscreatesub)) | , | ||
SCIP_BENDERSDATA * | bendersdata | ||
) |
creates a Benders' decomposition and includes it in SCIP with all non-fundamental callbacks set to NULL
If needed, the non-fundamental callbacks can be added afterwards via setter functions SCIPsetBendersCopy(), SCIPsetBendersFree(), SCIPsetBendersInity(), SCIPsetBendersExit(), SCIPsetBendersInitsol(), SCIPsetBendersExitsol(), SCIPsetBendersFarkas().
To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders(). This should be done during the problem creation stage.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Note
- if you want to set all callbacks with a single method call, consider using SCIPincludeBenders() instead
- Parameters
-
scip SCIP data structure bendersptr reference to a benders, or NULL name name of Benders' decomposition desc description of Benders' decomposition priority priority of the Benders' decomposition cutlp should Benders' cuts be generated for LP solutions cutpseudo should Benders' cuts be generated for pseudo solutions cutrelax should Benders' cuts be generated for relaxation solutions shareauxvars should this Benders' use the highest priority Benders aux vars bendersdata Benders' decomposition data
Definition at line 142 of file scip_benders.c.
References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbendersCreate(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenders(), SCIPsetIncludeBenders(), Scip::set, SCIP_Mem::setmem, and TRUE.
Referenced by SCIPincludeBendersDefault().
◆ SCIPsetBendersCopy()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersCopy | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSCOPY((*benderscopy)) | |||
) |
sets copy method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 188 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetCopy(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
◆ SCIPsetBendersFree()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersFree | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSFREE((*bendersfree)) | |||
) |
sets destructor method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 212 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetFree(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
◆ SCIPsetBendersInit()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInit | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSINIT((*bendersinit)) | |||
) |
sets initialization method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 236 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInit(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
◆ SCIPsetBendersExit()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExit | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSEXIT((*bendersexit)) | |||
) |
sets deinitialization method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 260 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExit(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
◆ SCIPsetBendersInitpre()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInitpre | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSINITPRE((*bendersinitpre)) | |||
) |
sets presolving initialization method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 284 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInitpre(), SCIPcheckStage(), and TRUE.
◆ SCIPsetBendersExitpre()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExitpre | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)) | |||
) |
sets presolving deinitialization method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 308 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExitpre(), SCIPcheckStage(), and TRUE.
◆ SCIPsetBendersInitsol()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInitsol | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSINITSOL((*bendersinitsol)) | |||
) |
sets solving process initialization method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 332 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInitsol(), SCIPcheckStage(), and TRUE.
◆ SCIPsetBendersExitsol()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExitsol | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)) | |||
) |
sets solving process deinitialization method of benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 356 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExitsol(), SCIPcheckStage(), and TRUE.
◆ SCIPsetBendersPresubsolve()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersPresubsolve | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)) | |||
) |
sets the method called prior to solving the subproblems for benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 380 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetPresubsolve(), SCIPcheckStage(), and TRUE.
◆ SCIPsetBendersSolveAndFreesub()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersSolveAndFreesub | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)) | , | ||
SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)) | , | ||
SCIP_DECL_BENDERSFREESUB((*bendersfreesub)) | |||
) |
sets the subproblem solving and freeing methods for Benders' decomposition
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 404 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPbendersGetName(), SCIPbendersSetFreesub(), SCIPbendersSetSolvesub(), SCIPbendersSetSolvesubconvex(), SCIPcheckStage(), SCIPerrorMessage, and TRUE.
◆ SCIPsetBendersPostsolve()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersPostsolve | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)) | |||
) |
sets the post solving methods for benders
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 444 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetPostsolve(), SCIPcheckStage(), and TRUE.
◆ SCIPsetBendersSubproblemComp()
SCIP_EXPORT SCIP_RETCODE SCIPsetBendersSubproblemComp | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_SORTPTRCOMP((*benderssubcomp)) | |||
) |
sets the subproblem comparison method for determining the solving order in Benders' decomposition
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 468 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetSubproblemComp(), SCIPcheckStage(), and TRUE.
◆ SCIPfindBenders()
SCIP_EXPORT SCIP_BENDERS* SCIPfindBenders | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the Benders' decomposition of the given name, or NULL if not existing
- Parameters
-
scip SCIP data structure name name of Benders' decomposition
Definition at line 484 of file scip_benders.c.
References NULL, SCIPsetFindBenders(), and Scip::set.
Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), createAndAddTransferredCut(), SCIP_DECL_BENDERSCOPY(), SCIPapplyBendersDecomposition(), SCIPcreateBendersDefault(), SCIPfindObjBenders(), SCIPfindObjBenderscut(), SCIPincludeBenders(), SCIPincludeBendersBasic(), SCIPincludeObjBenderscut(), and transferBendersCuts().
◆ SCIPgetBenders()
SCIP_EXPORT SCIP_BENDERS** SCIPgetBenders | ( | SCIP * | scip | ) |
returns the array of currently available Benders' decomposition; active Benders' decomposition are in the first slots of the array
- Parameters
-
scip SCIP data structure
Definition at line 499 of file scip_benders.c.
References SCIP_Set::benders, NULL, SCIPsetSortBenders(), and Scip::set.
Referenced by addAuxiliaryVariablesToMaster(), assignAuxiliaryVariables(), constructValidSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIPconsBendersEnforceSolution(), SCIPprintBendersStatistics(), and SCIPsetBenderscutPriority().
◆ SCIPgetNBenders()
SCIP_EXPORT int SCIPgetNBenders | ( | SCIP * | scip | ) |
returns the number of currently available Benders' decomposition
- Parameters
-
scip SCIP data structure
Definition at line 512 of file scip_benders.c.
References SCIP_Set::nbenders, NULL, and Scip::set.
Referenced by SCIP_DECL_DIALOGEXEC(), SCIPprintBendersStatistics(), and SCIPsetBenderscutPriority().
◆ SCIPgetNActiveBenders()
SCIP_EXPORT int SCIPgetNActiveBenders | ( | SCIP * | scip | ) |
returns the number of currently active Benders' decomposition
- Parameters
-
scip SCIP data structure
Definition at line 523 of file scip_benders.c.
References SCIP_Set::nactivebenders, NULL, and Scip::set.
Referenced by constructValidSolution(), determineSymmetry(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIPapplyBendersDecomposition(), SCIPconsBendersEnforceSolution(), SCIPprintBendersStatistics(), and SCIPsolve().
◆ SCIPactivateBenders()
SCIP_EXPORT SCIP_RETCODE SCIPactivateBenders | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | nsubproblems | ||
) |
activates the Benders' decomposition to be used for the current problem
This method should be called during the problem creation stage for all pricers that are necessary to solve the problem model.
- Note
- The Benders' decompositions are automatically deactivated when the problem is freed.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders the Benders' decomposition structure nsubproblems the number of subproblems in the Benders' decomposition
Definition at line 546 of file scip_benders.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbendersActivate(), SCIPcheckStage(), Scip::set, and TRUE.
Referenced by SCIPcreateBendersDefault().
◆ SCIPdeactivateBenders()
SCIP_EXPORT SCIP_RETCODE SCIPdeactivateBenders | ( | SCIP * | scip, |
SCIP_BENDERS * | benders | ||
) |
deactivates the Benders' decomposition
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders the Benders' decomposition structure
Definition at line 568 of file scip_benders.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbendersDeactivate(), SCIPcheckStage(), Scip::set, and TRUE.
◆ SCIPsetBendersPriority()
SCIP_EXPORT void SCIPsetBendersPriority | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | priority | ||
) |
sets the priority of a Benders' decomposition
- Parameters
-
scip SCIP data structure benders Benders' decomposition priority new priority of the Benders' decomposition
Definition at line 581 of file scip_benders.c.
References NULL, SCIPbendersSetPriority(), and Scip::set.
Referenced by SCIP_DECL_PARAMCHGD().
◆ SCIPsolveBendersSubproblems()
SCIP_EXPORT SCIP_RETCODE SCIPsolveBendersSubproblems | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_SOL * | sol, | ||
SCIP_RESULT * | result, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool * | auxviol, | ||
SCIP_BENDERSENFOTYPE | type, | ||
SCIP_Bool | checkint | ||
) |
calls the exec method of Benders' decomposition to solve the subproblems
The checkint flag indicates whether integer feasibility can be assumed. If it is not assumed, i.e. checkint == FALSE, then only the convex relaxations of the subproblems are solved. If integer feasibility is assumed, i.e. checkint == TRUE, then the convex relaxations and the full CIP are solved to generate Benders' cuts and check solution feasibility.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition sol primal CIP solution, can be NULL result result of the pricing process infeasible is the master problem infeasible with respect to the Benders' cuts? auxviol set to TRUE only if the solution is feasible but the aux vars are violated type the type of solution being enforced checkint should the integer solution be checked by the subproblems
Definition at line 613 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersExec(), SCIPcheckStage(), Scip::set, and TRUE.
Referenced by performInteriorSolCutStrengthening(), SCIP_DECL_CONSCHECK(), SCIPbendersExec(), and SCIPconsBendersEnforceSolution().
◆ SCIPgetBendersMasterVar()
SCIP_EXPORT SCIP_RETCODE SCIPgetBendersMasterVar | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_VAR * | var, | ||
SCIP_VAR ** | mappedvar | ||
) |
returns the master problem variable for the given subproblem variable
This function is used as part of the cut generation process.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition var the subproblem variable mappedvar pointer to store the master variable that var is mapped to
Definition at line 651 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetVar(), SCIPcheckStage(), Scip::set, and TRUE.
Referenced by computeStandardLPFeasibilityCut(), computeStandardLPOptimalityCut(), computeStandardNLPFeasibilityCut(), computeStandardNLPOptimalityCut(), SCIPaddNlRowGradientBenderscutOpt(), and SCIPbendersMergeSubproblemIntoMaster().
◆ SCIPgetBendersSubproblemVar()
SCIP_EXPORT SCIP_RETCODE SCIPgetBendersSubproblemVar | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_VAR * | var, | ||
SCIP_VAR ** | mappedvar, | ||
int | probnumber | ||
) |
returns the subproblem problem variable for the given master variable
This function is used as part of the cut generation process.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition var the master variable mappedvar pointer to store the subproblem variable that var is mapped to probnumber the subproblem number
Definition at line 687 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetVar(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.
Referenced by checkSubproblemIndependence(), computeStandardIntegerOptCut(), and performInteriorSolCutStrengthening().
◆ SCIPgetBendersNSubproblems()
SCIP_EXPORT int SCIPgetBendersNSubproblems | ( | SCIP * | scip, |
SCIP_BENDERS * | benders | ||
) |
returns the number of subproblems that are stored in the given Benders' decomposition
- Returns
- the number of subproblems in the Benders' decomposition
- Parameters
-
scip SCIP data structure benders Benders' decomposition
Definition at line 713 of file scip_benders.c.
References NULL, and SCIPbendersGetNSubproblems().
Referenced by performInteriorSolCutStrengthening(), SCIPcomputeBendersSubproblemLowerbound(), SCIPfreeBendersSubproblem(), SCIPgetBendersSubproblemVar(), SCIPmergeBendersSubproblemIntoMaster(), SCIPsetupBendersSubproblem(), and SCIPsolveBendersSubproblem().
◆ SCIPaddBendersSubproblem()
SCIP_EXPORT SCIP_RETCODE SCIPaddBendersSubproblem | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP * | subproblem | ||
) |
registers the Benders' decomposition subproblem with the Benders' decomposition struct.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
registers the Benders' decomposition subproblem with the Benders' decomposition struct.
If a custom subproblem solving method is used and no internal cut generation methods will be employed, then the subproblem parameter can be set to NULL. By setting subproblem to NULL will inform the Benders' decomposition core that a custom solving method is used. This will ensure that no internal solving methods are invoked during the solution process.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition subproblem Benders' decomposition subproblem, can be NULL
Definition at line 737 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersAddSubproblem(), SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_BENDERSCREATESUB().
◆ SCIPsetupBendersSubproblem()
SCIP_EXPORT SCIP_RETCODE SCIPsetupBendersSubproblem | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_SOL * | sol, | ||
int | probnumber, | ||
SCIP_BENDERSENFOTYPE | type | ||
) |
calls the generic subproblem setup method for a Benders' decomposition subproblem
This is called if the user requires to solve the Benders' decomposition subproblem separately from the main Benders' solving loop. This could be in the case of enhancement techniques.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
calls the generic subproblem setup method for a Benders' decomposition subproblem
This is called if the user requires to solve the Benders' decomposition subproblem separately from the main Benders' solving loop. This could be in the case of enhancement techniques.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders the Benders' decomposition data structure sol primal solution used to setup the problem, NULL for LP solution probnumber the subproblem number type the enforcement type calling this function
Definition at line 771 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetupSubproblem(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPsolveBendersSubproblem()
SCIP_EXPORT SCIP_RETCODE SCIPsolveBendersSubproblem | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_SOL * | sol, | ||
int | probnumber, | ||
SCIP_Bool * | infeasible, | ||
SCIP_Bool | solvecip, | ||
SCIP_Real * | objective | ||
) |
calls the solving method for a single Benders' decomposition subproblem
The method either calls the users solve subproblem method or calls the generic method. In the case of the generic method, the user must set up the subproblem prior to calling this method.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
calls the solving method for a single Benders' decomposition subproblem
The method either calls the users solve subproblem method or calls the generic method. In the case of the generic method, the user must set up the subproblem prior to calling this method.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition sol primal CIP solution, can be NULL for the current LP/Pseudo solution probnumber the subproblem number infeasible returns whether the current subproblem is infeasible solvecip directly solve the CIP subproblem objective the objective function value of the subproblem, can be NULL
Definition at line 809 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSolveSubproblem(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPfreeBendersSubproblem()
SCIP_EXPORT SCIP_RETCODE SCIPfreeBendersSubproblem | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | probnumber | ||
) |
frees the subproblem after calling the solve subproblem method
This will either call the user defined free subproblem callback for Benders' decomposition or the default freeing methods. In the default case, if the subproblem is an LP, then SCIPendProbing is called. If the subproblem is a MIP, then SCIPfreeTransform is called.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
frees the subproblem after calling the solve subproblem method
This will either call the user defined free subproblem callback for Benders' decomposition or the default freeing methods. In the default case, if the subproblem is an LP, then SCIPendProbing is called. If the subproblem is a MIP, then SCIPfreeTransform is called.
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Parameters
-
scip SCIP data structure benders Benders' decomposition probnumber the subproblem number
Definition at line 852 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersFreeSubproblem(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPcheckBendersSubproblemOptimality()
SCIP_EXPORT SCIP_RETCODE SCIPcheckBendersSubproblemOptimality | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_SOL * | sol, | ||
int | probnumber, | ||
SCIP_Bool * | optimal | ||
) |
checks the optimality of a Benders' decomposition subproblem by comparing the objective function value against the value of the corresponding auxiliary variable
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- This method can be called if requested subproblem is in one of the following stages:
checks the optimality of a Benders' decomposition subproblem by comparing the objective function value against the value of the corresponding auxiliary variable
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Precondition
- This method can be called in any SCIP stage; however, it is necessary that the Benders' auxiliary variables exist. If they don't exist, then the optimal flag is returned as FALSE.
- This method can be called if requested subproblem is in one of the following stages:
- Parameters
-
scip SCIP data structure benders the benders' decomposition structure sol primal CIP solution, can be NULL for the current LP solution probnumber the number of the pricing problem optimal flag to indicate whether the current subproblem is optimal for the master
Definition at line 883 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetAuxiliaryVar(), SCIPbendersGetNSubproblems(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsOptimal(), SCIPcheckStage(), SCIPgetStage(), SCIPinfoMessage(), Scip::set, and TRUE.
Referenced by generateAndApplyBendersIntegerCuts(), and SCIPgenerateAndApplyBendersOptCut().
◆ SCIPgetBendersAuxiliaryVarVal()
SCIP_EXPORT SCIP_Real SCIPgetBendersAuxiliaryVarVal | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_SOL * | sol, | ||
int | probnumber | ||
) |
returns the value of the auxiliary variable for a given subproblem
returns the value of the auxiliary variable for a given subproblem
- Returns
- the value of the auxiliary variable for the given subproblem
- Parameters
-
scip SCIP data structure benders the benders' decomposition structure sol primal CIP solution, can be NULL for the current LP solution probnumber the number of the pricing problem
Definition at line 922 of file scip_benders.c.
References NULL, SCIPbendersGetAuxiliaryVarVal(), SCIPbendersGetNSubproblems(), and Scip::set.
Referenced by unboundedAuxiliaryVariables().
◆ SCIPcomputeBendersSubproblemLowerbound()
SCIP_EXPORT SCIP_RETCODE SCIPcomputeBendersSubproblemLowerbound | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | probnumber, | ||
SCIP_Real * | lowerbound, | ||
SCIP_Bool * | infeasible | ||
) |
solves an independent subproblem to identify its lower bound and updates the lower bound of the corresponding auxiliary variable
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Parameters
-
scip the SCIP data structure benders Benders' decomposition probnumber the subproblem to be evaluated lowerbound the lowerbound for the subproblem infeasible was the subproblem found to be infeasible?
Definition at line 950 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersComputeSubproblemLowerbound(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.
Referenced by SCIP_DECL_CONSPRESOL().
◆ SCIPmergeBendersSubproblemIntoMaster()
SCIP_EXPORT SCIP_RETCODE SCIPmergeBendersSubproblemIntoMaster | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_HASHMAP * | varmap, | ||
SCIP_HASHMAP * | consmap, | ||
int | probnumber | ||
) |
merges a subproblem into the master problem.
This process just adds a copy of the subproblem variables and constraints to the master problem, but keeps the subproblem stored in the Benders' decomposition data structure. The reason for keeping the subproblem available is for when it is queried for solutions after the problem is solved.
Once the subproblem is merged into the master problem, then the subproblem is flagged as disabled. This means that it will not be solved in the subsequent subproblem solving loops.
The associated auxiliary variables are kept in the master problem. The objective function of the merged subproblem is added as an underestimator constraint.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Merges a subproblem into the master problem. This process just adds a copy of the subproblem variables and constraints to the master problem, but keeps the subproblem stored in the Benders' decomposition data structure. The reason for keeping the subproblem available is for when it is queried for solutions after the problem is solved.
Once the subproblem is merged into the master problem, then the subproblem is flagged as disabled. This means that it will not be solved in the subsequent subproblem solving loops.
The associated auxiliary variables are kept in the master problem. The objective function of the merged subproblem is added as an underestimator constraint.
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Parameters
-
scip the SCIP data structure benders Benders' decomposition varmap a hashmap to store the mapping of subproblem variables corresponding to the newly created master variables, or NULL consmap a hashmap to store the mapping of subproblem constraints to the corresponding newly created constraints, or NULL probnumber the number of the subproblem that will be merged into the master problem
Definition at line 990 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersMergeSubproblemIntoMaster(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.
◆ SCIPapplyBendersDecomposition()
SCIP_EXPORT SCIP_RETCODE SCIPapplyBendersDecomposition | ( | SCIP * | scip, |
int | decompindex | ||
) |
applies a Benders' decomposition to the selected decomposition from the decomposition store
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
applies a Benders' decomposition to the selected decomposition from the decomposition store
- Precondition
- This method can be called if SCIP is in one of the following stages:
- Returns
- SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
- Parameters
-
scip the SCIP data structure decompindex the index of the decomposition that will be applied
Definition at line 1019 of file scip_benders.c.
References Scip::decompstore, FALSE, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_VERBLEVEL_NORMAL, SCIPbendersApplyDecomposition(), SCIPcheckStage(), SCIPdecompstoreGetNOrigDecomps(), SCIPdecompstoreGetOrigDecomps(), SCIPerrorMessage, SCIPfindBenders(), SCIPgetNActiveBenders(), SCIPverbMessage(), Scip::set, and TRUE.
Referenced by SCIPsolve().