Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for Benders' decomposition plugins

Functions

 SCIP_DECL_SORTPTRCOMP (SCIPbendersComp)
 
 SCIP_DECL_SORTPTRCOMP (SCIPbendersCompName)
 
SCIP_BENDERSDATASCIPbendersGetData (SCIP_BENDERS *benders)
 
void SCIPbendersSetData (SCIP_BENDERS *benders, SCIP_BENDERSDATA *bendersdata)
 
const char * SCIPbendersGetName (SCIP_BENDERS *benders)
 
const char * SCIPbendersGetDesc (SCIP_BENDERS *benders)
 
int SCIPbendersGetPriority (SCIP_BENDERS *benders)
 
int SCIPbendersGetNSubproblems (SCIP_BENDERS *benders)
 
SCIPSCIPbendersSubproblem (SCIP_BENDERS *benders, int probnumber)
 
int SCIPbendersGetNCalls (SCIP_BENDERS *benders)
 
int SCIPbendersGetNCutsFound (SCIP_BENDERS *benders)
 
int SCIPbendersGetNStrengthenCutsFound (SCIP_BENDERS *benders)
 
int SCIPbendersGetNStrengthenCalls (SCIP_BENDERS *benders)
 
int SCIPbendersGetNStrengthenFails (SCIP_BENDERS *benders)
 
SCIP_Real SCIPbendersGetSetupTime (SCIP_BENDERS *benders)
 
SCIP_Real SCIPbendersGetTime (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersIsInitialized (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersIsActive (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersOnlyCheckConvexRelax (SCIP_BENDERS *benders, SCIP_Bool subscipsoff)
 
SCIP_Bool SCIPbendersCutLP (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersCutPseudo (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersCutRelaxation (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersShareAuxVars (SCIP_BENDERS *benders)
 
void SCIPbendersSetSubproblemIsSetup (SCIP_BENDERS *benders, int probnumber, SCIP_Bool issetup)
 
SCIP_Bool SCIPbendersSubproblemIsSetup (SCIP_BENDERS *benders, int probnumber)
 
SCIP_VARSCIPbendersGetAuxiliaryVar (SCIP_BENDERS *benders, int probnumber)
 
SCIP_VAR ** SCIPbendersGetAuxiliaryVars (SCIP_BENDERS *benders)
 
void SCIPbendersSetSubproblemObjval (SCIP_BENDERS *benders, int probnumber, SCIP_Real objval)
 
SCIP_Real SCIPbendersGetSubproblemObjval (SCIP_BENDERS *benders, int probnumber)
 
int SCIPbendersGetNStoredCuts (SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersGetStoredCutData (SCIP_BENDERS *benders, int cutidx, SCIP_VAR ***vars, SCIP_Real **vals, SCIP_Real *lhs, SCIP_Real *rhs, int *nvars)
 
SCIP_RETCODE SCIPbendersGetStoredCutOrigData (SCIP_BENDERS *benders, int cutidx, SCIP_VAR ***vars, SCIP_Real **vals, SCIP_Real *lhs, SCIP_Real *rhs, int *nvars, int varssize)
 
SCIP_BENDERSCUTSCIPfindBenderscut (SCIP_BENDERS *benders, const char *name)
 
SCIP_BENDERSCUT ** SCIPbendersGetBenderscuts (SCIP_BENDERS *benders)
 
int SCIPbendersGetNBenderscuts (SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersSetBenderscutPriority (SCIP_BENDERS *benders, SCIP_BENDERSCUT *benderscut, int priority)
 
SCIP_RETCODE SCIPbendersSolSlackVarsActive (SCIP_BENDERS *benders, SCIP_Bool *activeslack)
 
void SCIPbendersSetSubproblemType (SCIP_BENDERS *benders, int probnumber, SCIP_BENDERSSUBTYPE subprobtype)
 
SCIP_BENDERSSUBTYPE SCIPbendersGetSubproblemType (SCIP_BENDERS *benders, int probnumber)
 
void SCIPbendersSetSubproblemIsConvex (SCIP_BENDERS *benders, int probnumber, SCIP_Bool isconvex)
 
SCIP_Bool SCIPbendersSubproblemIsConvex (SCIP_BENDERS *benders, int probnumber)
 
int SCIPbendersGetNConvexSubproblems (SCIP_BENDERS *benders)
 
void SCIPbendersSetSubproblemIsNonlinear (SCIP_BENDERS *benders, int probnumber, SCIP_Bool isnonlinear)
 
SCIP_Bool SCIPbendersSubproblemIsNonlinear (SCIP_BENDERS *benders, int probnumber)
 
int SCIPbendersGetNNonlinearSubproblems (SCIP_BENDERS *benders)
 
void SCIPbendersSetMasterIsNonlinear (SCIP_BENDERS *benders, SCIP_Bool isnonlinear)
 
SCIP_Bool SCIPbendersMasterIsNonlinear (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersInStrengthenRound (SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersSolveSubproblemLP (SCIP *scip, SCIP_BENDERS *benders, int probnumber, SCIP_STATUS *solvestatus, SCIP_Real *objective)
 
SCIP_RETCODE SCIPbendersSolveSubproblemCIP (SCIP *scip, SCIP_BENDERS *benders, int probnumber, SCIP_STATUS *solvestatus, SCIP_Bool solvecip)
 
int SCIPbendersGetNTransferredCuts (SCIP_BENDERS *benders)
 
void SCIPbendersUpdateSubproblemLowerbound (SCIP_BENDERS *benders, int probnumber, SCIP_Real lowerbound)
 
SCIP_Real SCIPbendersGetSubproblemLowerbound (SCIP_BENDERS *benders, int probnumber)
 
void SCIPbendersSetSubproblemIsIndependent (SCIP_BENDERS *benders, int probnumber, SCIP_Bool isindep)
 
SCIP_Bool SCIPbendersSubproblemIsIndependent (SCIP_BENDERS *benders, int probnumber)
 
SCIP_Bool SCIPbendersSubproblemIsEnabled (SCIP_BENDERS *benders, int probnumber)
 
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)
 
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)
 
SCIP_RETCODE SCIPsetBendersCopy (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSCOPY((*benderscopy)))
 
SCIP_RETCODE SCIPsetBendersFree (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSFREE((*bendersfree)))
 
SCIP_RETCODE SCIPsetBendersInit (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSINIT((*bendersinit)))
 
SCIP_RETCODE SCIPsetBendersExit (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXIT((*bendersexit)))
 
SCIP_RETCODE SCIPsetBendersInitpre (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITPRE((*bendersinitpre)))
 
SCIP_RETCODE SCIPsetBendersExitpre (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)))
 
SCIP_RETCODE SCIPsetBendersInitsol (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITSOL((*bendersinitsol)))
 
SCIP_RETCODE SCIPsetBendersExitsol (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)))
 
SCIP_RETCODE SCIPsetBendersPresubsolve (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)))
 
SCIP_RETCODE SCIPsetBendersSolveAndFreesub (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)), SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)), SCIP_DECL_BENDERSFREESUB((*bendersfreesub)))
 
SCIP_RETCODE SCIPsetBendersPostsolve (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)))
 
SCIP_RETCODE SCIPsetBendersSubproblemComp (SCIP *scip, SCIP_BENDERS *benders, SCIP_DECL_SORTPTRCOMP((*benderssubcomp)))
 
SCIP_BENDERSSCIPfindBenders (SCIP *scip, const char *name)
 
SCIP_BENDERS ** SCIPgetBenders (SCIP *scip)
 
int SCIPgetNBenders (SCIP *scip)
 
int SCIPgetNActiveBenders (SCIP *scip)
 
SCIP_RETCODE SCIPactivateBenders (SCIP *scip, SCIP_BENDERS *benders, int nsubproblems)
 
SCIP_RETCODE SCIPdeactivateBenders (SCIP *scip, SCIP_BENDERS *benders)
 
void SCIPsetBendersPriority (SCIP *scip, SCIP_BENDERS *benders, int priority)
 
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)
 
SCIP_RETCODE SCIPgetBendersMasterVar (SCIP *scip, SCIP_BENDERS *benders, SCIP_VAR *var, SCIP_VAR **mappedvar)
 
SCIP_RETCODE SCIPgetBendersSubproblemVar (SCIP *scip, SCIP_BENDERS *benders, SCIP_VAR *var, SCIP_VAR **mappedvar, int probnumber)
 
int SCIPgetBendersNSubproblems (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPaddBendersSubproblem (SCIP *scip, SCIP_BENDERS *benders, SCIP *subproblem)
 
SCIP_RETCODE SCIPsetupBendersSubproblem (SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_BENDERSENFOTYPE type)
 
SCIP_RETCODE SCIPsolveBendersSubproblem (SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_Bool *infeasible, SCIP_Bool solvecip, SCIP_Real *objective)
 
SCIP_RETCODE SCIPfreeBendersSubproblem (SCIP *scip, SCIP_BENDERS *benders, int probnumber)
 
SCIP_RETCODE SCIPcheckBendersSubproblemOptimality (SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber, SCIP_Bool *optimal)
 
SCIP_Real SCIPgetBendersAuxiliaryVarVal (SCIP *scip, SCIP_BENDERS *benders, SCIP_SOL *sol, int probnumber)
 
SCIP_RETCODE SCIPcomputeBendersSubproblemLowerbound (SCIP *scip, SCIP_BENDERS *benders, int probnumber, SCIP_Real *lowerbound, SCIP_Bool *infeasible)
 
SCIP_RETCODE SCIPmergeBendersSubproblemIntoMaster (SCIP *scip, SCIP_BENDERS *benders, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, int probnumber)
 
SCIP_RETCODE SCIPapplyBendersDecomposition (SCIP *scip, int decompindex)
 

Function Documentation

◆ SCIP_DECL_SORTPTRCOMP() [1/2]

SCIP_DECL_SORTPTRCOMP ( SCIPbendersComp  )

compares two benderss w. r. to their priority

compares two Benders' decompositions w. r. to their priority

Definition at line 859 of file benders.c.

◆ SCIP_DECL_SORTPTRCOMP() [2/2]

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 865 of file benders.c.

References SCIPbendersGetName().

◆ SCIPbendersGetData()

◆ SCIPbendersSetData()

void SCIPbendersSetData ( SCIP_BENDERS benders,
SCIP_BENDERSDATA bendersdata 
)

sets user data of Benders' decomposition; user has to free old data in advance!

Parameters
bendersBenders' decomposition
bendersdatanew Benders' decomposition user data

Definition at line 5739 of file benders.c.

References SCIP_Benders::bendersdata, and NULL.

Referenced by SCIP_DECL_BENDERSFREE().

◆ SCIPbendersGetName()

◆ SCIPbendersGetDesc()

const char* SCIPbendersGetDesc ( SCIP_BENDERS benders)

gets description of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5914 of file benders.c.

References SCIP_Benders::desc, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbendersGetPriority()

int SCIPbendersGetPriority ( SCIP_BENDERS benders)

gets priority of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5924 of file benders.c.

References NULL, and SCIP_Benders::priority.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbendersGetNSubproblems()

int SCIPbendersGetNSubproblems ( SCIP_BENDERS benders)

gets the number of subproblems for the Benders' decomposition

Parameters
bendersthe Benders' decomposition data structure

Definition at line 5948 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()

◆ SCIPbendersGetNCalls()

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
bendersBenders' decomposition

Definition at line 5970 of file benders.c.

References SCIP_Benders::ncalls, and NULL.

Referenced by SCIP_DECL_BENDERSCUTEXEC(), SCIPbendersExec(), and SCIPprintBendersStatistics().

◆ SCIPbendersGetNCutsFound()

int SCIPbendersGetNCutsFound ( SCIP_BENDERS benders)

gets the number of optimality cuts found by the collection of Benders' decomposition subproblems

Parameters
bendersBenders' decomposition

Definition at line 5980 of file benders.c.

References SCIP_Benders::ncutsfound, and NULL.

Referenced by performInteriorSolCutStrengthening(), and SCIPprintBendersStatistics().

◆ SCIPbendersGetNStrengthenCutsFound()

int SCIPbendersGetNStrengthenCutsFound ( SCIP_BENDERS benders)

gets the number of cuts found from the strengthening round

Parameters
bendersBenders' decomposition

Definition at line 5990 of file benders.c.

References SCIP_Benders::nstrengthencuts, and NULL.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetNStrengthenCalls()

int SCIPbendersGetNStrengthenCalls ( SCIP_BENDERS benders)

gets the number of calls to the strengthening round

Parameters
bendersBenders' decomposition

Definition at line 6000 of file benders.c.

References SCIP_Benders::nstrengthencalls, and NULL.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetNStrengthenFails()

int SCIPbendersGetNStrengthenFails ( SCIP_BENDERS benders)

gets the number of calls to the strengthening round that fail

Parameters
bendersBenders' decomposition

Definition at line 6010 of file benders.c.

References SCIP_Benders::nstrengthenfails, and NULL.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetSetupTime()

SCIP_Real SCIPbendersGetSetupTime ( SCIP_BENDERS benders)

gets time in seconds used in this Benders' decomposition for setting up for next stages

Parameters
bendersBenders' decomposition

Definition at line 6020 of file benders.c.

References NULL, SCIPclockGetTime(), and SCIP_Benders::setuptime.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetTime()

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
bendersBenders' decomposition

Definition at line 6030 of file benders.c.

References SCIP_Benders::bendersclock, NULL, and SCIPclockGetTime().

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersIsInitialized()

SCIP_Bool SCIPbendersIsInitialized ( SCIP_BENDERS benders)

Is Benders' decomposition initialized?

is Benders' decomposition initialized?

Parameters
bendersBenders' decomposition

Definition at line 6052 of file benders.c.

References SCIP_Benders::initialized, and NULL.

◆ SCIPbendersIsActive()

SCIP_Bool SCIPbendersIsActive ( SCIP_BENDERS benders)

returns whether the given Benders' decomposition is in use in the current problem

Parameters
bendersthe Benders' decomposition structure

Definition at line 2670 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_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
bendersBenders' decomposition
subscipsoffflag indicating whether plugins using sub-SCIPs are deactivated

Definition at line 2983 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_Bool SCIPbendersCutLP ( SCIP_BENDERS benders)

Are Benders' cuts generated from the LP solutions?

Parameters
bendersBenders' decomposition

Definition at line 6062 of file benders.c.

References SCIP_Benders::cutlp, and NULL.

Referenced by SCIPconsBendersEnforceSolution().

◆ SCIPbendersCutPseudo()

SCIP_Bool SCIPbendersCutPseudo ( SCIP_BENDERS benders)

Are Benders' cuts generated from the pseudo solutions?

Parameters
bendersBenders' decomposition

Definition at line 6072 of file benders.c.

References SCIP_Benders::cutpseudo, and NULL.

Referenced by SCIPconsBendersEnforceSolution().

◆ SCIPbendersCutRelaxation()

SCIP_Bool SCIPbendersCutRelaxation ( SCIP_BENDERS benders)

Are Benders' cuts generated from the relaxation solutions?

Parameters
bendersBenders' decomposition

Definition at line 6082 of file benders.c.

References SCIP_Benders::cutrelax, and NULL.

Referenced by SCIPconsBendersEnforceSolution().

◆ SCIPbendersShareAuxVars()

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
bendersBenders' decomposition

Definition at line 6092 of file benders.c.

References NULL, and SCIP_Benders::shareauxvars.

Referenced by addAuxiliaryVariablesToMaster(), and assignAuxiliaryVariables().

◆ SCIPbendersSetSubproblemIsSetup()

void SCIPbendersSetSubproblemIsSetup ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Bool  issetup 
)

sets the subproblem setup flag

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
issetupflag to indicate whether the subproblem has been setup

Definition at line 6517 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobsetup.

Referenced by SCIPbendersFreeSubproblem(), and SCIPbendersSetupSubproblem().

◆ SCIPbendersSubproblemIsSetup()

SCIP_Bool SCIPbendersSubproblemIsSetup ( SCIP_BENDERS benders,
int  probnumber 
)

returns the subproblem setup flag

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6530 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobsetup.

Referenced by SCIPbendersExecSubproblemSolve(), SCIPbendersSolveSubproblem(), and SCIPbendersSolveSubproblemLP().

◆ SCIPbendersGetAuxiliaryVar()

◆ SCIPbendersGetAuxiliaryVars()

SCIP_VAR** SCIPbendersGetAuxiliaryVars ( SCIP_BENDERS benders)

returns all auxiliary variables

Parameters
bendersBenders' decomposition

Definition at line 6152 of file benders.c.

References SCIP_Benders::auxiliaryvars, and NULL.

Referenced by constructValidSolution().

◆ SCIPbendersSetSubproblemObjval()

void SCIPbendersSetSubproblemObjval ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Real  objval 
)

stores the objective function value of the subproblem for use in cut generation

Parameters
bendersthe Benders' decomposition structure
probnumberthe subproblem number
objvalthe objective function value for the subproblem

Definition at line 6162 of file benders.c.

References SCIP_Benders::bestsubprobobjval, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobobjval.

Referenced by resetSubproblemObjectiveValue(), SCIPbendersExecSubproblemSolve(), and solveBendersSubproblems().

◆ SCIPbendersGetSubproblemObjval()

SCIP_Real SCIPbendersGetSubproblemObjval ( SCIP_BENDERS benders,
int  probnumber 
)

returns the objective function value of the subproblem for use in cut generation

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6179 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobobjval.

Referenced by computeStandardIntegerOptCut(), constructValidSolution(), SCIP_DECL_BENDERSCUTEXEC(), SCIPbendersSubproblemIsOptimal(), and solveBendersSubproblems().

◆ SCIPbendersGetNStoredCuts()

int SCIPbendersGetNStoredCuts ( SCIP_BENDERS benders)

returns the number of cuts that have been added for storage

Parameters
bendersBenders' decomposition

Definition at line 6724 of file benders.c.

References SCIP_Benders::nstoredcuts, and NULL.

Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().

◆ SCIPbendersGetStoredCutData()

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
bendersBenders' decomposition
cutidxthe index for the cut data that is requested
varsthe variables that have non-zero coefficients in the cut
valsthe coefficients of the variables in the cut
lhsthe left hand side of the cut
rhsthe right hand side of the cut
nvarsthe number of variables with non-zero coefficients in the cut

Definition at line 6734 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_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
bendersBenders' decomposition cut
cutidxthe index for the cut data that is requested
varsthe variables that have non-zero coefficients in the cut
valsthe coefficients of the variables in the cut
lhsthe left hand side of the cut
rhsthe right hand side of the cut
nvarsthe number of variables with non-zero coefficients in the cut
varssizethe available slots in the array

Definition at line 6765 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_BENDERSCUT* SCIPfindBenderscut ( SCIP_BENDERS benders,
const char *  name 
)

returns the Benders' cut of the given name, or NULL if not existing

Parameters
bendersBenders' decomposition
namename of Benderscut' decomposition

Definition at line 6897 of file benders.c.

References SCIP_Benders::benderscuts, SCIP_Benders::nbenderscuts, NULL, and SCIPbenderscutGetName().

Referenced by SCIPfindObjBenderscut(), SCIPincludeBenderscut(), and SCIPincludeBenderscutBasic().

◆ SCIPbendersGetBenderscuts()

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
bendersBenders' decomposition

Definition at line 6919 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()

int SCIPbendersGetNBenderscuts ( SCIP_BENDERS benders)

returns the number of currently available Benders' cuts

Parameters
bendersBenders' decomposition

Definition at line 6936 of file benders.c.

References SCIP_Benders::nbenderscuts, and NULL.

Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().

◆ SCIPbendersSetBenderscutPriority()

SCIP_RETCODE SCIPbendersSetBenderscutPriority ( SCIP_BENDERS benders,
SCIP_BENDERSCUT benderscut,
int  priority 
)

sets the priority of a Benders' decomposition

Parameters
bendersBenders' decomposition
benderscutBenders' cut
prioritynew priority of the Benders' decomposition

Definition at line 6946 of file benders.c.

References SCIP_Benders::benderscutssorted, FALSE, NULL, SCIP_Benderscut::priority, and SCIP_OKAY.

◆ SCIPbendersSolSlackVarsActive()

SCIP_RETCODE SCIPbendersSolSlackVarsActive ( SCIP_BENDERS benders,
SCIP_Bool activeslack 
)

returns whether the solution has non-zero slack variables

Parameters
bendersBenders' decomposition
activeslackflag to indicate whether a slack variable is active

Definition at line 6191 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(), SCIPisPositive(), SCIPvarGetName(), SLACKVAR_NAME, and TRUE.

Referenced by SCIPbendersExec().

◆ SCIPbendersSetSubproblemType()

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
bendersBenders' decomposition
probnumberthe subproblem number
subprobtypethe subproblem type

Definition at line 6276 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_BENDERSSUBTYPE SCIPbendersGetSubproblemType ( SCIP_BENDERS benders,
int  probnumber 
)

◆ SCIPbendersSetSubproblemIsConvex()

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
bendersBenders' decomposition
probnumberthe subproblem number
isconvexflag to indicate whether the subproblem is convex

Definition at line 6319 of file benders.c.

References SCIP_Benders::nconvexsubprobs, SCIP_Benders::nsubproblems, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisconvex.

◆ SCIPbendersSubproblemIsConvex()

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
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6342 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisconvex.

◆ SCIPbendersGetNConvexSubproblems()

int SCIPbendersGetNConvexSubproblems ( SCIP_BENDERS benders)

returns the number of subproblems that are convex

Parameters
bendersBenders' decomposition

Definition at line 6354 of file benders.c.

References SCIP_Benders::nconvexsubprobs, and NULL.

Referenced by generateBendersCuts(), SCIP_DECL_EVENTEXEC(), and SCIPbendersExec().

◆ SCIPbendersSetSubproblemIsNonlinear()

void SCIPbendersSetSubproblemIsNonlinear ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Bool  isnonlinear 
)

sets the flag indicating whether a subproblem contains non-linear constraints

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
isnonlinearflag to indicate whether the subproblem contains non-linear constraints

Definition at line 6364 of file benders.c.

References SCIP_Benders::nnonlinearsubprobs, SCIP_Benders::nsubproblems, NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisnonlinear.

Referenced by checkSubproblemConvexity().

◆ SCIPbendersSubproblemIsNonlinear()

SCIP_Bool SCIPbendersSubproblemIsNonlinear ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the subproblem contains non-linear constraints.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6384 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobisnonlinear.

Referenced by createSubproblems().

◆ SCIPbendersGetNNonlinearSubproblems()

int SCIPbendersGetNNonlinearSubproblems ( SCIP_BENDERS benders)

returns the number of subproblems that contain non-linear constraints

Parameters
bendersBenders' decomposition

Definition at line 6396 of file benders.c.

References SCIP_Benders::nnonlinearsubprobs, and NULL.

◆ SCIPbendersSetMasterIsNonlinear()

void SCIPbendersSetMasterIsNonlinear ( SCIP_BENDERS benders,
SCIP_Bool  isnonlinear 
)

sets the flag indicating whether the master problem contains non-linear constraints

Parameters
bendersBenders' decomposition
isnonlinearflag to indicate whether the subproblem contains non-linear constraints

Definition at line 6406 of file benders.c.

References SCIP_Benders::masterisnonlinear, and NULL.

Referenced by checkSubproblemConvexity().

◆ SCIPbendersMasterIsNonlinear()

SCIP_Bool SCIPbendersMasterIsNonlinear ( SCIP_BENDERS benders)

returns whether the master problem contains non-linear constraints.

Parameters
bendersBenders' decomposition

Definition at line 6417 of file benders.c.

References SCIP_Benders::masterisnonlinear, and NULL.

Referenced by SCIP_DECL_BENDERSCUTEXEC().

◆ SCIPbendersInStrengthenRound()

SCIP_Bool SCIPbendersInStrengthenRound ( SCIP_BENDERS benders)

returns the flag indicating that Benders' decomposition is in a cut strengthening round

Parameters
bendersBenders' decomposition

Definition at line 6427 of file benders.c.

References NULL, and SCIP_Benders::strengthenround.

Referenced by SCIPgenerateAndApplyBendersOptCut().

◆ SCIPbendersSolveSubproblemLP()

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
scipthe SCIP data structure
bendersthe Benders' decomposition data structure
probnumberthe subproblem number
solvestatusstatus of subproblem solve
objectiveoptimal value of subproblem, if solved to optimality

Definition at line 4753 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_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPTERMSTAT_INTERRUPT, 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, SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsSetup(), SCIPcreateNLPSol(), SCIPdebugMsg, SCIPerrorMessage, SCIPfreeBlockMemory, SCIPfreeSol(), SCIPgetLPSolstat(), SCIPgetNLPObjval(), SCIPgetNLPSolstat(), SCIPgetNLPTermstat(), SCIPgetNNlpis(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPinfinity(), SCIPinProbing(), SCIPisLPConstructed(), SCIPisNLPConstructed(), SCIPprintSol(), SCIPretransformObj(), SCIPsolveNLP, SCIPsolveProbingLP(), SCIPverbMessage(), setSubproblemParams(), storeOrigSubproblemParams(), and TRUE.

Referenced by SCIPbendersExecSubproblemSolve(), and SCIPbendersSolveSubproblem().

◆ SCIPbendersSolveSubproblemCIP()

SCIP_RETCODE SCIPbendersSolveSubproblemCIP ( SCIP scip,
SCIP_BENDERS benders,
int  probnumber,
SCIP_STATUS solvestatus,
SCIP_Bool  solvecip 
)

◆ SCIPbendersGetNTransferredCuts()

int SCIPbendersGetNTransferredCuts ( SCIP_BENDERS benders)

returns the number of cuts that have been transferred from sub SCIPs to the master SCIP

Parameters
bendersthe Benders' decomposition data structure

Definition at line 6681 of file benders.c.

References SCIP_Benders::ntransferred, and NULL.

Referenced by createAndAddTransferredCut(), and SCIPprintBendersStatistics().

◆ SCIPbendersUpdateSubproblemLowerbound()

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
bendersBenders' decomposition
probnumberthe subproblem number
lowerboundthe lower bound

Definition at line 6693 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_Real SCIPbendersGetSubproblemLowerbound ( SCIP_BENDERS benders,
int  probnumber 
)

returns the stored lower bound for the given subproblem

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6712 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subproblowerbound.

Referenced by solveBendersSubproblems(), updateSubproblemCutConstant(), and updateSubproblemLowerbound().

◆ SCIPbendersSetSubproblemIsIndependent()

void SCIPbendersSetSubproblemIsIndependent ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Bool  isindep 
)

sets the independent subproblem flag

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
isindepflag to indicate whether the subproblem is independent

Definition at line 6542 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_Bool SCIPbendersSubproblemIsIndependent ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the subproblem is independent

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6582 of file benders.c.

References SCIP_Benders::indepsubprob, NULL, and SCIPbendersGetNSubproblems().

Referenced by SCIPbendersComputeSubproblemLowerbound(), SCIPbendersExitsol(), SCIPbendersSolveSubproblem(), and subproblemIsActive().

◆ SCIPbendersSubproblemIsEnabled()

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
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6622 of file benders.c.

References NULL, SCIPbendersGetNSubproblems(), and SCIP_Benders::subprobenabled.

Referenced by subproblemIsActive().

◆ SCIPincludeBenders()

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
scipSCIP data structure
namename of Benders' decomposition
descdescription of Benders' decomposition
prioritypriority of the Benders' decomposition
cutlpshould Benders' cuts be generated for LP solutions
cutpseudoshould Benders' cuts be generated for pseudo solutions
cutrelaxshould Benders' cuts be generated for relaxation solutions
shareauxvarsshould this Benders' use the highest priority Benders aux vars
bendersdataBenders' decomposition data

Definition at line 76 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_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
scipSCIP data structure
bendersptrreference to a benders, or NULL
namename of Benders' decomposition
descdescription of Benders' decomposition
prioritypriority of the Benders' decomposition
cutlpshould Benders' cuts be generated for LP solutions
cutpseudoshould Benders' cuts be generated for pseudo solutions
cutrelaxshould Benders' cuts be generated for relaxation solutions
shareauxvarsshould this Benders' use the highest priority Benders aux vars
bendersdataBenders' decomposition data

Definition at line 151 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_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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 197 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetCopy(), SCIPcheckStage(), and TRUE.

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersFree()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 221 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetFree(), SCIPcheckStage(), and TRUE.

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersInit()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 245 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInit(), SCIPcheckStage(), and TRUE.

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersExit()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 269 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExit(), SCIPcheckStage(), and TRUE.

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersInitpre()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 293 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInitpre(), SCIPcheckStage(), and TRUE.

◆ SCIPsetBendersExitpre()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 317 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExitpre(), SCIPcheckStage(), and TRUE.

◆ SCIPsetBendersInitsol()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 341 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetInitsol(), SCIPcheckStage(), and TRUE.

◆ SCIPsetBendersExitsol()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 365 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetExitsol(), SCIPcheckStage(), and TRUE.

◆ SCIPsetBendersPresubsolve()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 389 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetPresubsolve(), SCIPcheckStage(), and TRUE.

◆ SCIPsetBendersSolveAndFreesub()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 413 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPbendersGetName(), SCIPbendersSetFreesub(), SCIPbendersSetSolvesub(), SCIPbendersSetSolvesubconvex(), SCIPcheckStage(), SCIPerrorMessage, and TRUE.

◆ SCIPsetBendersPostsolve()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 453 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetPostsolve(), SCIPcheckStage(), and TRUE.

◆ SCIPsetBendersSubproblemComp()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 477 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersSetSubproblemComp(), SCIPcheckStage(), and TRUE.

◆ SCIPfindBenders()

SCIP_BENDERS* SCIPfindBenders ( SCIP scip,
const char *  name 
)

returns the Benders' decomposition of the given name, or NULL if not existing

Parameters
scipSCIP data structure
namename of Benders' decomposition

Definition at line 493 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_BENDERS** SCIPgetBenders ( SCIP scip)

returns the array of currently available Benders' decomposition; active Benders' decomposition are in the first slots of the array

Parameters
scipSCIP data structure

Definition at line 508 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()

int SCIPgetNBenders ( SCIP scip)

returns the number of currently available Benders' decomposition

Parameters
scipSCIP data structure

Definition at line 521 of file scip_benders.c.

References SCIP_Set::nbenders, NULL, and Scip::set.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPprintBendersStatistics(), and SCIPsetBenderscutPriority().

◆ SCIPgetNActiveBenders()

int SCIPgetNActiveBenders ( SCIP scip)

◆ SCIPactivateBenders()

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
scipSCIP data structure
bendersthe Benders' decomposition structure
nsubproblemsthe number of subproblems in the Benders' decomposition

Definition at line 555 of file scip_benders.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbendersActivate(), SCIPcheckStage(), Scip::set, and TRUE.

Referenced by SCIPcreateBendersDefault().

◆ SCIPdeactivateBenders()

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
scipSCIP data structure
bendersthe Benders' decomposition structure

Definition at line 577 of file scip_benders.c.

References FALSE, SCIP_CALL, SCIP_OKAY, SCIPbendersDeactivate(), SCIPcheckStage(), Scip::set, and TRUE.

◆ SCIPsetBendersPriority()

void SCIPsetBendersPriority ( SCIP scip,
SCIP_BENDERS benders,
int  priority 
)

sets the priority of a Benders' decomposition

Parameters
scipSCIP data structure
bendersBenders' decomposition
prioritynew priority of the Benders' decomposition

Definition at line 590 of file scip_benders.c.

References NULL, SCIPbendersSetPriority(), and Scip::set.

Referenced by SCIP_DECL_PARAMCHGD().

◆ SCIPsolveBendersSubproblems()

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
scipSCIP data structure
bendersBenders' decomposition
solprimal CIP solution, can be NULL
resultresult of the pricing process
infeasibleis the master problem infeasible with respect to the Benders' cuts?
auxviolset to TRUE only if the solution is feasible but the aux vars are violated
typethe type of solution being enforced
checkintshould the integer solution be checked by the subproblems

Definition at line 622 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_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
scipSCIP data structure
bendersBenders' decomposition
varthe subproblem variable
mappedvarpointer to store the master variable that var is mapped to

Definition at line 660 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetVar(), SCIPcheckStage(), Scip::set, and TRUE.

Referenced by computeStandardLPFeasibilityCut(), computeStandardLPOptimalityCut(), SCIPaddNlRowGradientBenderscutOpt(), and SCIPbendersMergeSubproblemIntoMaster().

◆ SCIPgetBendersSubproblemVar()

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
scipSCIP data structure
bendersBenders' decomposition
varthe master variable
mappedvarpointer to store the subproblem variable that var is mapped to
probnumberthe subproblem number

Definition at line 696 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()

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
scipSCIP data structure
bendersBenders' decomposition

Definition at line 722 of file scip_benders.c.

References NULL, and SCIPbendersGetNSubproblems().

Referenced by performInteriorSolCutStrengthening(), SCIPcomputeBendersSubproblemLowerbound(), SCIPfreeBendersSubproblem(), SCIPgetBendersSubproblemVar(), SCIPmergeBendersSubproblemIntoMaster(), SCIPsetupBendersSubproblem(), and SCIPsolveBendersSubproblem().

◆ SCIPaddBendersSubproblem()

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
scipSCIP data structure
bendersBenders' decomposition
subproblemBenders' decomposition subproblem, can be NULL

Definition at line 746 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersAddSubproblem(), SCIPcheckStage(), and TRUE.

Referenced by SCIP_DECL_BENDERSCREATESUB().

◆ SCIPsetupBendersSubproblem()

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
scipSCIP data structure
bendersthe Benders' decomposition data structure
solprimal solution used to setup the problem, NULL for LP solution
probnumberthe subproblem number
typethe enforcement type calling this function

Definition at line 780 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_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
scipSCIP data structure
bendersBenders' decomposition
solprimal CIP solution, can be NULL for the current LP/Pseudo solution
probnumberthe subproblem number
infeasiblereturns whether the current subproblem is infeasible
solvecipdirectly solve the CIP subproblem
objectivethe objective function value of the subproblem, can be NULL

Definition at line 818 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_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
scipSCIP data structure
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 861 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_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
scipSCIP data structure
bendersthe benders' decomposition structure
solprimal CIP solution, can be NULL for the current LP solution
probnumberthe number of the pricing problem
optimalflag to indicate whether the current subproblem is optimal for the master

Definition at line 892 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_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
scipSCIP data structure
bendersthe benders' decomposition structure
solprimal CIP solution, can be NULL for the current LP solution
probnumberthe number of the pricing problem

Definition at line 931 of file scip_benders.c.

References NULL, SCIPbendersGetAuxiliaryVarVal(), SCIPbendersGetNSubproblems(), and Scip::set.

Referenced by unboundedAuxiliaryVariables().

◆ SCIPcomputeBendersSubproblemLowerbound()

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
scipthe SCIP data structure
bendersBenders' decomposition
probnumberthe subproblem to be evaluated
lowerboundthe lowerbound for the subproblem
infeasiblewas the subproblem found to be infeasible?

Definition at line 959 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_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
scipthe SCIP data structure
bendersBenders' decomposition
varmapa hashmap to store the mapping of subproblem variables corresponding to the newly created master variables, or NULL
consmapa hashmap to store the mapping of subproblem constraints to the corresponding newly created constraints, or NULL
probnumberthe number of the subproblem that will be merged into the master problem

Definition at line 999 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersMergeSubproblemIntoMaster(), SCIPcheckStage(), SCIPgetBendersNSubproblems(), Scip::set, and TRUE.

◆ SCIPapplyBendersDecomposition()

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
scipthe SCIP data structure
decompindexthe index of the decomposition that will be applied

Definition at line 1028 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().