methods for Benders' decomposition plugins
SCIP_DECL_SORTPTRCOMP | ( | SCIPbendersComp | ) |
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 864 of file benders.c.
References SCIPbendersGetName().
SCIP_BENDERSDATA * SCIPbendersGetData | ( | SCIP_BENDERS * | benders | ) |
gets user data of Benders' decomposition
benders | Benders' decomposition |
Definition at line 5771 of file benders.c.
References assert(), SCIP_Benders::bendersdata, and NULL.
Referenced by createVariableMappings(), SCIP_DECL_BENDERSCOPY(), SCIP_DECL_BENDERSCOPY(), SCIP_DECL_BENDERSCREATESUB(), SCIP_DECL_BENDERSCREATESUB(), SCIP_DECL_BENDERSEXIT(), SCIP_DECL_BENDERSEXIT(), SCIP_DECL_BENDERSEXITPRE(), SCIP_DECL_BENDERSEXITSOL(), SCIP_DECL_BENDERSFREE(), SCIP_DECL_BENDERSFREE(), SCIP_DECL_BENDERSFREESUB(), SCIP_DECL_BENDERSGETVAR(), 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().
void SCIPbendersSetData | ( | SCIP_BENDERS * | benders, |
SCIP_BENDERSDATA * | bendersdata ) |
sets user data of Benders' decomposition; user has to free old data in advance!
benders | Benders' decomposition |
bendersdata | new Benders' decomposition user data |
Definition at line 5781 of file benders.c.
References assert(), SCIP_Benders::bendersdata, and NULL.
Referenced by SCIP_DECL_BENDERSFREE().
const char * SCIPbendersGetName | ( | SCIP_BENDERS * | benders | ) |
gets name of Benders' decomposition
benders | Benders' decomposition |
Definition at line 5946 of file benders.c.
References assert(), SCIP_Benders::name, and NULL.
Referenced by addAuxiliaryVariablesToMaster(), assignAuxiliaryVariables(), createAndAddTransferredCut(), doBenderscutCreate(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_SORTPTRCOMP(), SCIPbendersCopyInclude(), SCIPbendersExec(), SCIPbendersSolveSubproblemLP(), SCIPincludeBenderscutInt(), SCIPincludeBenderscutNogood(), SCIPincludeBenderscutOpt(), SCIPprintBendersStatistics(), SCIPsetBendersSolveAndFreesub(), and transferBendersCuts().
const char * SCIPbendersGetDesc | ( | SCIP_BENDERS * | benders | ) |
gets description of Benders' decomposition
benders | Benders' decomposition |
Definition at line 5956 of file benders.c.
References assert(), SCIP_Benders::desc, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC().
int SCIPbendersGetPriority | ( | SCIP_BENDERS * | benders | ) |
gets priority of Benders' decomposition
benders | Benders' decomposition |
Definition at line 5966 of file benders.c.
References assert(), NULL, and SCIP_Benders::priority.
Referenced by SCIP_DECL_DIALOGEXEC().
int SCIPbendersGetNSubproblems | ( | SCIP_BENDERS * | benders | ) |
gets the number of subproblems for the Benders' decomposition
benders | the Benders' decomposition data structure |
Definition at line 5990 of file benders.c.
References assert(), 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_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTINIT(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), 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().
SCIP * SCIPbendersSubproblem | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns the SCIP instance for a given subproblem
benders | the Benders' decomposition data structure |
probnumber | the subproblem number |
Definition at line 6000 of file benders.c.
References assert(), NULL, and SCIP_Benders::subproblems.
Referenced by addAuxiliaryVariablesToMaster(), addSlackVarsToConstraints(), checkSubproblemConvexity(), computeStandardIntegerOptCut(), createSubproblems(), initialiseLPSubproblem(), initialiseSubproblem(), resetSubproblemObjectiveValue(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_BENDERSCUTEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIPbendersChgMastervarsToCont(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersDeactivate(), SCIPbendersExec(), SCIPbendersExecSubproblemSolve(), SCIPbendersFreeSubproblem(), SCIPbendersMergeSubproblemIntoMaster(), SCIPbendersSetMastervarsCont(), SCIPbendersSetupSubproblem(), SCIPbendersSolSlackVarsActive(), SCIPbendersSolveSubproblem(), SCIPbendersSolveSubproblemCIP(), SCIPbendersSolveSubproblemLP(), SCIPcheckBendersSubproblemOptimality(), solveBendersSubproblems(), updateEventhdlrUpperbound(), and updateSubproblemStatQueue().
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
benders | Benders' decomposition |
Definition at line 6012 of file benders.c.
References assert(), SCIP_Benders::ncalls, and NULL.
Referenced by SCIP_DECL_BENDERSCUTEXEC(), SCIPbendersExec(), and SCIPprintBendersStatistics().
int SCIPbendersGetNCutsFound | ( | SCIP_BENDERS * | benders | ) |
gets the number of optimality cuts found by the collection of Benders' decomposition subproblems
benders | Benders' decomposition |
Definition at line 6022 of file benders.c.
References assert(), SCIP_Benders::ncutsfound, and NULL.
Referenced by performInteriorSolCutStrengthening(), and SCIPprintBendersStatistics().
int SCIPbendersGetNStrengthenCutsFound | ( | SCIP_BENDERS * | benders | ) |
gets the number of cuts found from the strengthening round
benders | Benders' decomposition |
Definition at line 6032 of file benders.c.
References assert(), SCIP_Benders::nstrengthencuts, and NULL.
Referenced by SCIPprintBendersStatistics().
int SCIPbendersGetNStrengthenCalls | ( | SCIP_BENDERS * | benders | ) |
gets the number of calls to the strengthening round
benders | Benders' decomposition |
Definition at line 6042 of file benders.c.
References assert(), SCIP_Benders::nstrengthencalls, and NULL.
Referenced by SCIPprintBendersStatistics().
int SCIPbendersGetNStrengthenFails | ( | SCIP_BENDERS * | benders | ) |
gets the number of calls to the strengthening round that fail
benders | Benders' decomposition |
Definition at line 6052 of file benders.c.
References assert(), SCIP_Benders::nstrengthenfails, and NULL.
Referenced by SCIPprintBendersStatistics().
SCIP_Real SCIPbendersGetSetupTime | ( | SCIP_BENDERS * | benders | ) |
gets time in seconds used in this Benders' decomposition for setting up for next stages
benders | Benders' decomposition |
Definition at line 6062 of file benders.c.
References assert(), NULL, SCIPclockGetTime(), and SCIP_Benders::setuptime.
Referenced by SCIPprintBendersStatistics().
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
benders | Benders' decomposition |
Definition at line 6072 of file benders.c.
References assert(), SCIP_Benders::bendersclock, NULL, and SCIPclockGetTime().
Referenced by SCIPprintBendersStatistics().
SCIP_Bool SCIPbendersIsInitialized | ( | SCIP_BENDERS * | benders | ) |
Is Benders' decomposition initialized?
is Benders' decomposition initialized?
benders | Benders' decomposition |
Definition at line 6094 of file benders.c.
References assert(), SCIP_Benders::initialized, and NULL.
SCIP_Bool SCIPbendersIsActive | ( | SCIP_BENDERS * | benders | ) |
returns whether the given Benders' decomposition is in use in the current problem
benders | the Benders' decomposition structure |
Definition at line 2687 of file benders.c.
References SCIP_Benders::active, assert(), and NULL.
Referenced by SCIP_DECL_BENDERSCOPY(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_EVENTINITSOL(), SCIPbendersCopyInclude(), and SCIPprintBendersStatistics().
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.
benders | Benders' decomposition |
subscipsoff | flag indicating whether plugins using sub-SCIPs are deactivated |
Definition at line 3000 of file benders.c.
References SCIP_Benders::iscopy, and SCIP_Benders::lnscheck.
Referenced by executeUserDefinedSolvesub(), generateBendersCuts(), numSubproblemsToCheck(), SCIP_DECL_EVENTINITSOL(), SCIPbendersExec(), and solveBendersSubproblems().
SCIP_NLPPARAM SCIPbendersGetNLPParam | ( | SCIP_BENDERS * | benders | ) |
returns NLP solver parameters used for solving NLP subproblems
benders | Benders' decomposition |
Definition at line 4777 of file benders.c.
References assert(), SCIP_Benders::nlpparam, and NULL.
Referenced by resolveNLPWithTighterFeastol().
SCIP_Bool SCIPbendersCutLP | ( | SCIP_BENDERS * | benders | ) |
Are Benders' cuts generated from the LP solutions?
benders | Benders' decomposition |
Definition at line 6104 of file benders.c.
References assert(), SCIP_Benders::cutlp, and NULL.
Referenced by SCIPconsBendersEnforceSolution().
SCIP_Bool SCIPbendersCutPseudo | ( | SCIP_BENDERS * | benders | ) |
Are Benders' cuts generated from the pseudo solutions?
benders | Benders' decomposition |
Definition at line 6114 of file benders.c.
References assert(), SCIP_Benders::cutpseudo, and NULL.
Referenced by SCIPconsBendersEnforceSolution().
SCIP_Bool SCIPbendersCutRelaxation | ( | SCIP_BENDERS * | benders | ) |
Are Benders' cuts generated from the relaxation solutions?
benders | Benders' decomposition |
Definition at line 6124 of file benders.c.
References assert(), SCIP_Benders::cutrelax, and NULL.
Referenced by SCIPconsBendersEnforceSolution().
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'
benders | Benders' decomposition |
Definition at line 6134 of file benders.c.
References assert(), NULL, and SCIP_Benders::shareauxvars.
Referenced by addAuxiliaryVariablesToMaster(), and assignAuxiliaryVariables().
void SCIPbendersSetSubproblemIsSetup | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | issetup ) |
sets the subproblem setup flag
benders | Benders' decomposition |
probnumber | the subproblem number |
issetup | flag to indicate whether the subproblem has been setup |
Definition at line 6593 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobsetup.
Referenced by SCIPbendersFreeSubproblem(), and SCIPbendersSetupSubproblem().
SCIP_Bool SCIPbendersSubproblemIsSetup | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns the subproblem setup flag
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6606 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobsetup.
Referenced by SCIPbendersExecSubproblemSolve(), SCIPbendersSolveSubproblem(), and SCIPbendersSolveSubproblemLP().
SCIP_VAR * SCIPbendersGetAuxiliaryVar | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns the auxiliary variable for the given subproblem
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6182 of file benders.c.
References assert(), SCIP_Benders::auxiliaryvars, NULL, and SCIPbendersGetNSubproblems().
Referenced by addAuxiliaryVariablesToMaster(), addAuxiliaryVariableToCut(), addAuxiliaryVariableToCut(), generateAndApplyBendersIntegerCuts(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIPbendersComputeSubproblemLowerbound(), SCIPbendersGetAuxiliaryVarVal(), SCIPbendersMergeSubproblemIntoMaster(), SCIPcheckBendersSubproblemOptimality(), updateAuxiliaryVarLowerbound(), updateSubproblemCutConstant(), and updateSubproblemLowerbound().
SCIP_VAR ** SCIPbendersGetAuxiliaryVars | ( | SCIP_BENDERS * | benders | ) |
returns all auxiliary variables
benders | Benders' decomposition |
Definition at line 6194 of file benders.c.
References assert(), SCIP_Benders::auxiliaryvars, and NULL.
Referenced by constructValidSolution().
void SCIPbendersSetSubproblemObjval | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Real | objval ) |
stores the objective function value of the subproblem for use in cut generation
benders | the Benders' decomposition structure |
probnumber | the subproblem number |
objval | the objective function value for the subproblem |
Definition at line 6204 of file benders.c.
References assert(), SCIP_Benders::bestsubprobobjval, NULL, objval, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobobjval.
Referenced by resetSubproblemObjectiveValue(), SCIPbendersExecSubproblemSolve(), and solveBendersSubproblems().
SCIP_Real SCIPbendersGetSubproblemObjval | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns the objective function value of the subproblem for use in cut generation
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6221 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobobjval.
Referenced by computeStandardIntegerOptCut(), constructValidSolution(), SCIP_DECL_BENDERSCUTEXEC(), SCIPbendersSubproblemIsOptimal(), and solveBendersSubproblems().
int SCIPbendersGetNStoredCuts | ( | SCIP_BENDERS * | benders | ) |
returns the number of cuts that have been added for storage
benders | Benders' decomposition |
Definition at line 6800 of file benders.c.
References assert(), SCIP_Benders::nstoredcuts, and NULL.
Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().
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
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 6810 of file benders.c.
References assert(), SCIP_BenderscutCut::lhs, NULL, nvars, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_OKAY, SCIP_Benders::storedcuts, SCIP_BenderscutCut::vals, SCIP_BenderscutCut::vars, and vars.
Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().
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
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 6841 of file benders.c.
References assert(), i, SCIP_BenderscutCut::lhs, NULL, nvars, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_CALL, SCIP_OKAY, SCIPvarGetOrigvarSum(), SCIP_Benders::storedcuts, SCIP_BenderscutCut::vals, SCIP_BenderscutCut::vars, and vars.
SCIP_BENDERSCUT * SCIPfindBenderscut | ( | SCIP_BENDERS * | benders, |
const char * | name ) |
returns the Benders' cut of the given name, or NULL if not existing
benders | Benders' decomposition |
name | name of Benderscut' decomposition |
Definition at line 6973 of file benders.c.
References assert(), SCIP_Benders::benderscuts, i, SCIP_Benders::nbenderscuts, NULL, and SCIPbenderscutGetName().
Referenced by SCIPfindObjBenderscut(), SCIPincludeBenderscut(), and SCIPincludeBenderscutBasic().
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
benders | Benders' decomposition |
Definition at line 6995 of file benders.c.
References assert(), SCIP_Benders::benderscuts, SCIP_Benders::benderscutsnamessorted, SCIP_Benders::benderscutssorted, FALSE, SCIP_Benders::nbenderscuts, NULL, SCIPsortPtr(), and TRUE.
Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().
int SCIPbendersGetNBenderscuts | ( | SCIP_BENDERS * | benders | ) |
returns the number of currently available Benders' cuts
benders | Benders' decomposition |
Definition at line 7012 of file benders.c.
References assert(), SCIP_Benders::nbenderscuts, and NULL.
Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().
SCIP_RETCODE SCIPbendersSetBenderscutPriority | ( | SCIP_BENDERS * | benders, |
SCIP_BENDERSCUT * | benderscut, | ||
int | priority ) |
sets the priority of a Benders' decomposition
benders | Benders' decomposition |
benderscut | Benders' cut |
priority | new priority of the Benders' decomposition |
Definition at line 7022 of file benders.c.
References assert(), SCIP_Benders::benderscutssorted, FALSE, NULL, SCIP_Benderscut::priority, and SCIP_OKAY.
SCIP_RETCODE SCIPbendersSolSlackVarsActive | ( | SCIP_BENDERS * | benders, |
SCIP_Bool * | activeslack ) |
returns whether the solution has non-zero slack variables
benders | Benders' decomposition |
activeslack | flag to indicate whether a slack variable is active |
Definition at line 6233 of file benders.c.
References assert(), FALSE, SCIP_Benders::feasibilityphase, i, NULL, nvars, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPcreateCurrentSol(), SCIPcreateNLPSol(), SCIPfreeSol(), SCIPgetBestSol(), SCIPgetNNlpis(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisNLPConstructed(), SCIPisPositive(), SCIPvarGetName(), SLACKVAR_NAME, sol, TRUE, and vars.
Referenced by SCIPbendersExec().
void SCIPbendersSetSubproblemType | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_BENDERSSUBTYPE | subprobtype ) |
sets the subproblem type
The subproblem types are:
benders | Benders' decomposition |
probnumber | the subproblem number |
subprobtype | the subproblem type |
Definition at line 6318 of file benders.c.
References assert(), SCIP_Benders::nconvexsubprobs, SCIP_Benders::nsubproblems, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobtype.
Referenced by checkSubproblemConvexity(), and SCIPbendersSetMastervarsCont().
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
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6343 of file benders.c.
References assert(), 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().
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.
benders | Benders' decomposition |
probnumber | the subproblem number |
isconvex | flag to indicate whether the subproblem is convex |
Definition at line 6361 of file benders.c.
References assert(), SCIP_Benders::nconvexsubprobs, SCIP_Benders::nsubproblems, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisconvex.
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.
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6384 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisconvex.
int SCIPbendersGetNConvexSubproblems | ( | SCIP_BENDERS * | benders | ) |
returns the number of subproblems that are convex
benders | Benders' decomposition |
Definition at line 6396 of file benders.c.
References assert(), SCIP_Benders::nconvexsubprobs, and NULL.
Referenced by generateBendersCuts(), SCIP_DECL_EVENTEXEC(), and SCIPbendersExec().
void SCIPbendersSetSubproblemIsNonlinear | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | isnonlinear ) |
sets the flag indicating whether a subproblem contains non-linear constraints
benders | Benders' decomposition |
probnumber | the subproblem number |
isnonlinear | flag to indicate whether the subproblem contains non-linear constraints |
Definition at line 6406 of file benders.c.
References assert(), SCIP_Benders::nnonlinearsubprobs, SCIP_Benders::nsubproblems, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisnonlinear.
Referenced by checkSubproblemConvexity().
SCIP_Bool SCIPbendersSubproblemIsNonlinear | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns whether the subproblem contains non-linear constraints.
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6426 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisnonlinear.
Referenced by createSubproblems().
int SCIPbendersGetNNonlinearSubproblems | ( | SCIP_BENDERS * | benders | ) |
returns the number of subproblems that contain non-linear constraints
benders | Benders' decomposition |
Definition at line 6438 of file benders.c.
References assert(), SCIP_Benders::nnonlinearsubprobs, and NULL.
void SCIPbendersSetMasterIsNonlinear | ( | SCIP_BENDERS * | benders, |
SCIP_Bool | isnonlinear ) |
sets the flag indicating whether the master problem contains non-linear constraints
benders | Benders' decomposition |
isnonlinear | flag to indicate whether the subproblem contains non-linear constraints |
Definition at line 6448 of file benders.c.
References assert(), SCIP_Benders::masterisnonlinear, and NULL.
Referenced by checkSubproblemConvexity().
SCIP_Bool SCIPbendersMasterIsNonlinear | ( | SCIP_BENDERS * | benders | ) |
returns whether the master problem contains non-linear constraints.
benders | Benders' decomposition |
Definition at line 6459 of file benders.c.
References assert(), SCIP_Benders::masterisnonlinear, and NULL.
Referenced by SCIP_DECL_BENDERSCUTEXEC(), and SCIP_DECL_BENDERSCUTEXEC().
SCIP_Bool SCIPbendersInStrengthenRound | ( | SCIP_BENDERS * | benders | ) |
returns the flag indicating that Benders' decomposition is in a cut strengthening round
benders | Benders' decomposition |
Definition at line 6469 of file benders.c.
References assert(), NULL, and SCIP_Benders::strengthenround.
Referenced by SCIPgenerateAndApplyBendersOptCut().
SCIP_Bool SCIPbendersSubproblemsAreInfeasible | ( | SCIP_BENDERS * | benders | ) |
returns whether at least one of the subproblems has been identified as infeasible. NOTE: this is without any variable fixing being performed
benders | Benders' decomposition |
Definition at line 6496 of file benders.c.
References assert(), NULL, and SCIP_Benders::subprobsinfeasible.
Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSINITLP(), and SCIPconsBendersEnforceSolution().
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.
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 4790 of file benders.c.
References assert(), cutoff, FALSE, lperror, SCIP_Benders::nlpparam, NULL, resetOrigSubproblemParams(), SCIP_BENDERSSUBTYPE_CONVEXDIS, 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_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPTERMSTAT_INTERRUPT, SCIP_NLPTERMSTAT_ITERLIMIT, SCIP_NLPTERMSTAT_OKAY, SCIP_NLPTERMSTAT_TIMELIMIT, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIP_VERBLEVEL_FULL, SCIPABORT, SCIPallocBlockMemory, SCIPbendersGetName(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsSetup(), SCIPcreateNLPSol(), SCIPdebugMsg, SCIPerrorMessage, SCIPfreeBlockMemory, SCIPfreeSol(), SCIPgetLPSolstat(), SCIPgetNLPObjval(), SCIPgetNLPSolstat(), SCIPgetNLPTermstat(), SCIPgetNNlpis(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPinfinity(), SCIPinProbing(), SCIPisLPConstructed(), SCIPisNLPConstructed(), SCIPprintSol(), SCIPretransformObj(), SCIPsolveNLPParam(), SCIPsolveProbingLP(), SCIPverbMessage(), SCIPwarningMessage(), setSubproblemParams(), storeOrigSubproblemParams(), and TRUE.
Referenced by SCIPbendersExecSubproblemSolve(), and SCIPbendersSolveSubproblem().
SCIP_RETCODE SCIPbendersSolveSubproblemCIP | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | probnumber, | ||
SCIP_STATUS * | solvestatus, | ||
SCIP_Bool | solvecip ) |
solves the Benders' decomposition subproblem
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 4960 of file benders.c.
References assert(), 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().
int SCIPbendersGetNTransferredCuts | ( | SCIP_BENDERS * | benders | ) |
returns the number of cuts that have been transferred from sub SCIPs to the master SCIP
benders | the Benders' decomposition data structure |
Definition at line 6757 of file benders.c.
References assert(), SCIP_Benders::ntransferred, and NULL.
Referenced by createAndAddTransferredCut(), and SCIPprintBendersStatistics().
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.
benders | Benders' decomposition |
probnumber | the subproblem number |
lowerbound | the lower bound |
Definition at line 6769 of file benders.c.
References assert(), EPSGE, NULL, SCIPbendersGetNSubproblems(), SCIPdebugMessage, and SCIP_Benders::subproblowerbound.
Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), SCIP_DECL_CONSPRESOL(), updateAuxiliaryVarLowerbound(), and updateSubproblemLowerbound().
SCIP_Real SCIPbendersGetSubproblemLowerbound | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns the stored lower bound for the given subproblem
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6788 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subproblowerbound.
Referenced by solveBendersSubproblems(), updateSubproblemCutConstant(), and updateSubproblemLowerbound().
void SCIPbendersSetSubproblemIsIndependent | ( | SCIP_BENDERS * | benders, |
int | probnumber, | ||
SCIP_Bool | isindep ) |
sets the independent subproblem flag
benders | Benders' decomposition |
probnumber | the subproblem number |
isindep | flag to indicate whether the subproblem is independent |
Definition at line 6618 of file benders.c.
References assert(), SCIP_Benders::indepsubprob, SCIP_Benders::nactivesubprobs, SCIP_Benders::name, NULL, SCIPABORT, SCIPbendersGetNSubproblems(), SCIPerrorMessage, and subproblemIsActive().
Referenced by checkSubproblemIndependence(), and SCIPbendersExitsol().
SCIP_Bool SCIPbendersSubproblemIsIndependent | ( | SCIP_BENDERS * | benders, |
int | probnumber ) |
returns whether the subproblem is independent
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6658 of file benders.c.
References assert(), SCIP_Benders::indepsubprob, NULL, and SCIPbendersGetNSubproblems().
Referenced by SCIPbendersComputeSubproblemLowerbound(), SCIPbendersExitsol(), SCIPbendersSolveSubproblem(), and subproblemIsActive().
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.
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 6698 of file benders.c.
References assert(), NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobenabled.
Referenced by subproblemIsActive().
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.
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 76 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbendersCreate(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenders(), SCIPsetIncludeBenders(), and TRUE.
Referenced by SCIPincludeObjBenders().
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.
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 151 of file scip_benders.c.
References FALSE, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbendersCreate(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenders(), SCIPsetIncludeBenders(), and TRUE.
Referenced by SCIPincludeBendersDefault().
SCIP_RETCODE SCIPsetBendersCopy | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets copy method of benders
scip | SCIP data structure |
benders | Benders' decomposition copy method of Benders' decomposition or NULL if you don't want to copy your plugin into sub-SCIPs |
Definition at line 197 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetCopy(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
SCIP_RETCODE SCIPsetBendersFree | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets destructor method of benders
scip | SCIP data structure |
benders | Benders' decomposition destructor of Benders' decomposition |
Definition at line 221 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetFree(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
SCIP_RETCODE SCIPsetBendersInit | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets initialization method of benders
scip | SCIP data structure |
benders | Benders' decomposition initialize Benders' decomposition |
Definition at line 245 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInit(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
SCIP_RETCODE SCIPsetBendersExit | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets deinitialization method of benders
scip | SCIP data structure |
benders | Benders' decomposition deinitialize Benders' decomposition |
Definition at line 269 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExit(), SCIPcheckStage(), and TRUE.
Referenced by SCIPincludeBendersDefault().
SCIP_RETCODE SCIPsetBendersInitpre | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets presolving initialization method of benders
scip | SCIP data structure |
benders | Benders' decomposition presolving initialization method of Benders' decomposition |
Definition at line 293 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInitpre(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBendersExitpre | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets presolving deinitialization method of benders
scip | SCIP data structure |
benders | Benders' decomposition presolving deinitialization method of Benders' decomposition |
Definition at line 317 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExitpre(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBendersInitsol | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets solving process initialization method of benders
scip | SCIP data structure |
benders | Benders' decomposition solving process initialization method of Benders' decomposition |
Definition at line 341 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInitsol(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBendersExitsol | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets solving process deinitialization method of benders
scip | SCIP data structure |
benders | Benders' decomposition solving process deinitialization method of Benders' decomposition |
Definition at line 365 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExitsol(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBendersPresubsolve | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets the method called prior to solving the subproblems for benders
scip | SCIP data structure |
benders | Benders' decomposition method called prior to solving the subproblems |
Definition at line 389 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetPresubsolve(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBendersSolveAndFreesub | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)) | , | ||
SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)) | ) |
sets the subproblem solving and freeing methods for Benders' decomposition
scip | SCIP data structure |
benders | Benders' decomposition |
Definition at line 413 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPbendersGetName(), SCIPbendersSetFreesub(), SCIPbendersSetSolvesub(), SCIPbendersSetSolvesubconvex(), SCIPcheckStage(), SCIPerrorMessage, and TRUE.
SCIP_RETCODE SCIPsetBendersPostsolve | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets the post solving methods for benders
scip | SCIP data structure |
benders | Benders' decomposition solving process deinitialization method of Benders' decomposition |
Definition at line 453 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetPostsolve(), SCIPcheckStage(), and TRUE.
SCIP_RETCODE SCIPsetBendersSubproblemComp | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
sets the subproblem comparison method for determining the solving order in Benders' decomposition
scip | SCIP data structure |
benders | Benders' decomposition a comparator for defining the solving order of the subproblems |
Definition at line 477 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetSubproblemComp(), SCIPcheckStage(), and TRUE.
SCIP_BENDERS * SCIPfindBenders | ( | SCIP * | scip, |
const char * | name ) |
returns the Benders' decomposition of the given name, or NULL if not existing
scip | SCIP data structure |
name | name of Benders' decomposition |
Definition at line 493 of file scip_benders.c.
References assert(), NULL, and SCIPsetFindBenders().
Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), createAndAddTransferredCut(), SCIP_DECL_BENDERSCOPY(), SCIPapplyBendersDecomposition(), SCIPcreateBendersDefault(), SCIPfindObjBenders(), SCIPfindObjBenderscut(), SCIPincludeBenders(), SCIPincludeBendersBasic(), SCIPincludeObjBenderscut(), and transferBendersCuts().
SCIP_BENDERS ** SCIPgetBenders | ( | SCIP * | scip | ) |
returns the array of currently available Benders' decomposition; active Benders' decomposition are in the first slots of the array
scip | SCIP data structure |
Definition at line 508 of file scip_benders.c.
References assert(), NULL, and SCIPsetSortBenders().
Referenced by addAuxiliaryVariablesToMaster(), assignAuxiliaryVariables(), constructValidSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIPconsBendersEnforceSolution(), SCIPprintBendersStatistics(), and SCIPsetBenderscutPriority().
int SCIPgetNBenders | ( | SCIP * | scip | ) |
returns the number of currently available Benders' decomposition
scip | SCIP data structure |
Definition at line 521 of file scip_benders.c.
References assert(), and NULL.
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIPprintBendersStatistics(), and SCIPsetBenderscutPriority().
int SCIPgetNActiveBenders | ( | SCIP * | scip | ) |
returns the number of currently active Benders' decomposition
scip | SCIP data structure |
Definition at line 532 of file scip_benders.c.
References assert(), and NULL.
Referenced by constructValidSolution(), determineSymmetry(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSINITLP(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_DIALOGEXEC(), SCIPapplyBendersDecomposition(), SCIPconsBendersEnforceSolution(), SCIPprintBendersStatistics(), and SCIPsolve().
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.
scip | SCIP data structure |
benders | the Benders' decomposition structure |
nsubproblems | the number of subproblems in the Benders' decomposition |
Definition at line 555 of file scip_benders.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbendersActivate(), SCIPcheckStage(), and TRUE.
Referenced by SCIPcreateBendersDefault().
SCIP_RETCODE SCIPdeactivateBenders | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
deactivates the Benders' decomposition
scip | SCIP data structure |
benders | the Benders' decomposition structure |
Definition at line 577 of file scip_benders.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbendersDeactivate(), SCIPcheckStage(), and TRUE.
void SCIPsetBendersPriority | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
int | priority ) |
sets the priority of a Benders' decomposition
scip | SCIP data structure |
benders | Benders' decomposition |
priority | new priority of the Benders' decomposition |
Definition at line 590 of file scip_benders.c.
References assert(), NULL, and SCIPbendersSetPriority().
Referenced by SCIP_DECL_PARAMCHGD().
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.
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 622 of file scip_benders.c.
References assert(), FALSE, NULL, result, SCIP_CALL, SCIP_OKAY, SCIPbendersExec(), SCIPcheckStage(), sol, and TRUE.
Referenced by performInteriorSolCutStrengthening(), SCIP_DECL_CONSCHECK(), SCIPbendersExec(), and SCIPconsBendersEnforceSolution().
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.
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 660 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetVar(), SCIPcheckStage(), TRUE, and var.
Referenced by computeStandardLPFeasibilityCut(), computeStandardLPOptimalityCut(), SCIPaddNlRowGradientBenderscutOpt(), and SCIPbendersMergeSubproblemIntoMaster().
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.
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 696 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetVar(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), TRUE, and var.
Referenced by checkSubproblemIndependence(), computeStandardIntegerOptCut(), and performInteriorSolCutStrengthening().
int SCIPgetBendersNSubproblems | ( | SCIP * | scip, |
SCIP_BENDERS * | benders ) |
returns the number of subproblems that are stored in the given Benders' decomposition
scip | SCIP data structure |
benders | Benders' decomposition |
Definition at line 722 of file scip_benders.c.
References assert(), NULL, and SCIPbendersGetNSubproblems().
Referenced by performInteriorSolCutStrengthening(), SCIPcomputeBendersSubproblemLowerbound(), SCIPfreeBendersSubproblem(), SCIPgetBendersSubproblemVar(), SCIPmergeBendersSubproblemIntoMaster(), SCIPsetupBendersSubproblem(), and SCIPsolveBendersSubproblem().
SCIP_RETCODE SCIPaddBendersSubproblem | ( | SCIP * | scip, |
SCIP_BENDERS * | benders, | ||
SCIP * | subproblem ) |
registers the Benders' decomposition subproblem with the Benders' decomposition struct.
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.
scip | SCIP data structure |
benders | Benders' decomposition |
subproblem | Benders' decomposition subproblem, can be NULL |
Definition at line 746 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersAddSubproblem(), SCIPcheckStage(), and TRUE.
Referenced by SCIP_DECL_BENDERSCREATESUB().
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.
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.
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 780 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetupSubproblem(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), sol, and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
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.
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.
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 818 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSolveSubproblem(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), sol, and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
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.
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.
scip | SCIP data structure |
benders | Benders' decomposition |
probnumber | the subproblem number |
Definition at line 861 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersFreeSubproblem(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), and TRUE.
Referenced by SCIP_DECL_DIALOGEXEC().
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
checks the optimality of a Benders' decomposition subproblem by comparing the objective function value against the value of the corresponding auxiliary variable
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 892 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetAuxiliaryVar(), SCIPbendersGetNSubproblems(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsOptimal(), SCIPcheckStage(), SCIPgetStage(), SCIPinfoMessage(), sol, and TRUE.
Referenced by generateAndApplyBendersIntegerCuts(), and SCIPgenerateAndApplyBendersOptCut().
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
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 931 of file scip_benders.c.
References assert(), NULL, SCIPbendersGetAuxiliaryVarVal(), SCIPbendersGetNSubproblems(), and sol.
Referenced by unboundedAuxiliaryVariables().
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
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 959 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersComputeSubproblemLowerbound(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), and TRUE.
Referenced by SCIP_DECL_CONSPRESOL().
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.
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.
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 999 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersMergeSubproblemIntoMaster(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), and TRUE.
SCIP_RETCODE SCIPapplyBendersDecomposition | ( | SCIP * | scip, |
int | decompindex ) |
applies a Benders' decomposition to the selected decomposition from the decomposition store
applies a Benders' decomposition to the selected decomposition from the decomposition store
scip | the SCIP data structure |
decompindex | the index of the decomposition that will be applied |
Definition at line 1028 of file scip_benders.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_VERBLEVEL_NORMAL, SCIPbendersApplyDecomposition(), SCIPcheckStage(), SCIPdecompstoreGetNOrigDecomps(), SCIPdecompstoreGetOrigDecomps(), SCIPerrorMessage, SCIPfindBenders(), SCIPgetNActiveBenders(), SCIPverbMessage(), and TRUE.
Referenced by SCIPsolve().