Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for Benders' decomposition plugins

Functions

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

Function Documentation

◆ SCIP_DECL_SORTPTRCOMP() [1/2]

SCIP_EXPORT SCIP_DECL_SORTPTRCOMP ( SCIPbendersComp  )

compares two benderss w. r. to their priority

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

Definition at line 844 of file benders.c.

◆ SCIP_DECL_SORTPTRCOMP() [2/2]

SCIP_EXPORT SCIP_DECL_SORTPTRCOMP ( SCIPbendersCompName  )

comparison method for sorting benderss w.r.t. to their name

comparison method for sorting Benders' decompositions w.r.t. to their name

Definition at line 850 of file benders.c.

References SCIPbendersGetName().

◆ SCIPbendersGetData()

◆ SCIPbendersSetData()

SCIP_EXPORT void SCIPbendersSetData ( SCIP_BENDERS benders,
SCIP_BENDERSDATA bendersdata 
)

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

Parameters
bendersBenders' decomposition
bendersdatanew Benders' decomposition user data

Definition at line 5731 of file benders.c.

References SCIP_Benders::bendersdata, and NULL.

Referenced by SCIP_DECL_BENDERSFREE().

◆ SCIPbendersGetName()

◆ SCIPbendersGetDesc()

SCIP_EXPORT const char* SCIPbendersGetDesc ( SCIP_BENDERS benders)

gets description of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5906 of file benders.c.

References SCIP_Benders::desc, and NULL.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbendersGetPriority()

SCIP_EXPORT int SCIPbendersGetPriority ( SCIP_BENDERS benders)

gets priority of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5916 of file benders.c.

References NULL, and SCIP_Benders::priority.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPbendersGetNSubproblems()

SCIP_EXPORT int SCIPbendersGetNSubproblems ( SCIP_BENDERS benders)

gets the number of subproblems for the Benders' decomposition

Parameters
bendersthe Benders' decomposition data structure

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

SCIP_EXPORT int SCIPbendersGetNCalls ( SCIP_BENDERS benders)

gets the number of times, the Bender' decomposition was called and tried to find a violated second stage constraint

gets the number of times, the Benders' decomposition was called and tried to find a variable with negative reduced costs

Parameters
bendersBenders' decomposition

Definition at line 5962 of file benders.c.

References SCIP_Benders::ncalls, and NULL.

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

◆ SCIPbendersGetNCutsFound()

SCIP_EXPORT int SCIPbendersGetNCutsFound ( SCIP_BENDERS benders)

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

Parameters
bendersBenders' decomposition

Definition at line 5972 of file benders.c.

References SCIP_Benders::ncutsfound, and NULL.

Referenced by performInteriorSolCutStrengthening(), and SCIPprintBendersStatistics().

◆ SCIPbendersGetNStrengthenCutsFound()

SCIP_EXPORT int SCIPbendersGetNStrengthenCutsFound ( SCIP_BENDERS benders)

gets the number of cuts found from the strengthening round

Parameters
bendersBenders' decomposition

Definition at line 5982 of file benders.c.

References SCIP_Benders::nstrengthencuts, and NULL.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetNStrengthenCalls()

SCIP_EXPORT int SCIPbendersGetNStrengthenCalls ( SCIP_BENDERS benders)

gets the number of calls to the strengthening round

Parameters
bendersBenders' decomposition

Definition at line 5992 of file benders.c.

References SCIP_Benders::nstrengthencalls, and NULL.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetNStrengthenFails()

SCIP_EXPORT int SCIPbendersGetNStrengthenFails ( SCIP_BENDERS benders)

gets the number of calls to the strengthening round that fail

Parameters
bendersBenders' decomposition

Definition at line 6002 of file benders.c.

References SCIP_Benders::nstrengthenfails, and NULL.

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetSetupTime()

SCIP_EXPORT SCIP_Real SCIPbendersGetSetupTime ( SCIP_BENDERS benders)

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

Parameters
bendersBenders' decomposition

Definition at line 6012 of file benders.c.

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

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersGetTime()

SCIP_EXPORT SCIP_Real SCIPbendersGetTime ( SCIP_BENDERS benders)

gets execution time in seconds used in this Benders' decomposition

gets time in seconds used in this Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 6022 of file benders.c.

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

Referenced by SCIPprintBendersStatistics().

◆ SCIPbendersIsInitialized()

SCIP_EXPORT SCIP_Bool SCIPbendersIsInitialized ( SCIP_BENDERS benders)

Is Benders' decomposition initialized?

is Benders' decomposition initialized?

Parameters
bendersBenders' decomposition

Definition at line 6044 of file benders.c.

References SCIP_Benders::initialized, and NULL.

◆ SCIPbendersIsActive()

SCIP_EXPORT SCIP_Bool SCIPbendersIsActive ( SCIP_BENDERS benders)

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

Parameters
bendersthe Benders' decomposition structure

Definition at line 2674 of file benders.c.

References SCIP_Benders::active, and NULL.

Referenced by SCIP_DECL_BENDERSCOPY(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_EVENTINITSOL(), SCIPbendersCopyInclude(), and SCIPprintBendersStatistics().

◆ SCIPbendersOnlyCheckConvexRelax()

SCIP_EXPORT SCIP_Bool SCIPbendersOnlyCheckConvexRelax ( SCIP_BENDERS benders,
SCIP_Bool  subscipsoff 
)

Returns whether only the convex relaxations will be checked in this solve loop when Benders' is used in the LNS heuristics, only the convex relaxations of the master/subproblems are checked, i.e. no integer cuts are generated. In this case, then Benders' decomposition is performed under the assumption that all subproblems are convex relaxations.

Parameters
bendersBenders' decomposition
subscipsoffflag indicating whether plugins using sub-SCIPs are deactivated

Definition at line 2986 of file benders.c.

References SCIP_Benders::iscopy, and SCIP_Benders::lnscheck.

Referenced by executeUserDefinedSolvesub(), generateBendersCuts(), numSubproblemsToCheck(), SCIP_DECL_EVENTINITSOL(), SCIPbendersExec(), and solveBendersSubproblems().

◆ SCIPbendersCutLP()

SCIP_EXPORT SCIP_Bool SCIPbendersCutLP ( SCIP_BENDERS benders)

Are Benders' cuts generated from the LP solutions?

Parameters
bendersBenders' decomposition

Definition at line 6054 of file benders.c.

References SCIP_Benders::cutlp, and NULL.

Referenced by SCIPconsBendersEnforceSolution().

◆ SCIPbendersCutPseudo()

SCIP_EXPORT SCIP_Bool SCIPbendersCutPseudo ( SCIP_BENDERS benders)

Are Benders' cuts generated from the pseudo solutions?

Parameters
bendersBenders' decomposition

Definition at line 6064 of file benders.c.

References SCIP_Benders::cutpseudo, and NULL.

Referenced by SCIPconsBendersEnforceSolution().

◆ SCIPbendersCutRelaxation()

SCIP_EXPORT SCIP_Bool SCIPbendersCutRelaxation ( SCIP_BENDERS benders)

Are Benders' cuts generated from the relaxation solutions?

Parameters
bendersBenders' decomposition

Definition at line 6074 of file benders.c.

References SCIP_Benders::cutrelax, and NULL.

Referenced by SCIPconsBendersEnforceSolution().

◆ SCIPbendersShareAuxVars()

SCIP_EXPORT SCIP_Bool SCIPbendersShareAuxVars ( SCIP_BENDERS benders)

Should this Benders' use the auxiliary variables from the highest priority Benders'?

should this Benders' use the auxiliary variables from the highest priority Benders'

Parameters
bendersBenders' decomposition

Definition at line 6084 of file benders.c.

References NULL, and SCIP_Benders::shareauxvars.

Referenced by addAuxiliaryVariablesToMaster(), and assignAuxiliaryVariables().

◆ SCIPbendersSetSubproblemIsSetup()

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

sets the subproblem setup flag

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

Definition at line 6509 of file benders.c.

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

Referenced by SCIPbendersFreeSubproblem(), and SCIPbendersSetupSubproblem().

◆ SCIPbendersSubproblemIsSetup()

SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsSetup ( SCIP_BENDERS benders,
int  probnumber 
)

returns the subproblem setup flag

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6522 of file benders.c.

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

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

◆ SCIPbendersGetAuxiliaryVar()

◆ SCIPbendersGetAuxiliaryVars()

SCIP_EXPORT SCIP_VAR** SCIPbendersGetAuxiliaryVars ( SCIP_BENDERS benders)

returns all auxiliary variables

Parameters
bendersBenders' decomposition

Definition at line 6144 of file benders.c.

References SCIP_Benders::auxiliaryvars, and NULL.

Referenced by constructValidSolution().

◆ SCIPbendersSetSubproblemObjval()

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

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

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

Definition at line 6154 of file benders.c.

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

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

◆ SCIPbendersGetSubproblemObjval()

SCIP_EXPORT SCIP_Real SCIPbendersGetSubproblemObjval ( SCIP_BENDERS benders,
int  probnumber 
)

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

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6171 of file benders.c.

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

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

◆ SCIPbendersGetNStoredCuts()

SCIP_EXPORT int SCIPbendersGetNStoredCuts ( SCIP_BENDERS benders)

returns the number of cuts that have been added for storage

Parameters
bendersBenders' decomposition

Definition at line 6716 of file benders.c.

References SCIP_Benders::nstoredcuts, and NULL.

Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().

◆ SCIPbendersGetStoredCutData()

SCIP_EXPORT SCIP_RETCODE SCIPbendersGetStoredCutData ( SCIP_BENDERS benders,
int  cutidx,
SCIP_VAR ***  vars,
SCIP_Real **  vals,
SCIP_Real lhs,
SCIP_Real rhs,
int *  nvars 
)

returns the data for the cuts that have been added by the Benders' cut plugin

returns the cuts that have been stored for transfer

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

References SCIP_BenderscutCut::lhs, NULL, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_OKAY, SCIP_Benders::storedcuts, SCIP_BenderscutCut::vals, and SCIP_BenderscutCut::vars.

Referenced by SCIPapplyBendersStoredCuts(), and transferBendersCuts().

◆ SCIPbendersGetStoredCutOrigData()

SCIP_EXPORT SCIP_RETCODE SCIPbendersGetStoredCutOrigData ( SCIP_BENDERS benders,
int  cutidx,
SCIP_VAR ***  vars,
SCIP_Real **  vals,
SCIP_Real lhs,
SCIP_Real rhs,
int *  nvars,
int  varssize 
)

returns the original problem data for the cuts that have been added by the Benders' cut plugin. The stored variables and values will populate the input vars and vals arrays. Thus, memory must be allocated for the vars and vals arrays

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

References SCIP_BenderscutCut::lhs, NULL, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPvarGetOrigvarSum(), SCIP_Benders::storedcuts, SCIP_BenderscutCut::vals, and SCIP_BenderscutCut::vars.

◆ SCIPfindBenderscut()

SCIP_EXPORT SCIP_BENDERSCUT* SCIPfindBenderscut ( SCIP_BENDERS benders,
const char *  name 
)

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

Parameters
bendersBenders' decomposition
namename of Benderscut' decomposition

Definition at line 6889 of file benders.c.

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

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

◆ SCIPbendersGetBenderscuts()

SCIP_EXPORT SCIP_BENDERSCUT** SCIPbendersGetBenderscuts ( SCIP_BENDERS benders)

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

Parameters
bendersBenders' decomposition

Definition at line 6911 of file benders.c.

References SCIP_Benders::benderscuts, SCIP_Benders::benderscutsnamessorted, SCIP_Benders::benderscutssorted, FALSE, SCIP_Benders::nbenderscuts, NULL, SCIPsortPtr(), and TRUE.

Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().

◆ SCIPbendersGetNBenderscuts()

SCIP_EXPORT int SCIPbendersGetNBenderscuts ( SCIP_BENDERS benders)

returns the number of currently available Benders' cuts

Parameters
bendersBenders' decomposition

Definition at line 6928 of file benders.c.

References SCIP_Benders::nbenderscuts, and NULL.

Referenced by generateBendersCuts(), and SCIPprintBendersStatistics().

◆ SCIPbendersSetBenderscutPriority()

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

sets the priority of a Benders' decomposition

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

Definition at line 6938 of file benders.c.

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

◆ SCIPbendersSolSlackVarsActive()

SCIP_EXPORT SCIP_RETCODE SCIPbendersSolSlackVarsActive ( SCIP_BENDERS benders,
SCIP_Bool activeslack 
)

returns whether the solution has non-zero slack variables

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

Definition at line 6183 of file benders.c.

References FALSE, SCIP_Benders::feasibilityphase, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPcreateCurrentSol(), SCIPcreateNLPSol(), SCIPfreeSol(), SCIPgetBestSol(), SCIPgetNNlpis(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisNLPConstructed(), SCIPisZero(), SCIPvarGetName(), SLACKVAR_NAME, and TRUE.

Referenced by SCIPbendersExec().

◆ SCIPbendersSetSubproblemType()

SCIP_EXPORT void SCIPbendersSetSubproblemType ( SCIP_BENDERS benders,
int  probnumber,
SCIP_BENDERSSUBTYPE  subprobtype 
)

sets the subproblem type

The subproblem types are:

  • Convex constraints with continuous variables
  • Convex constraints with discrete variables
  • Non-convex constraints with continuous variables
  • Non-convex constraints with discrete variables
Parameters
bendersBenders' decomposition
probnumberthe subproblem number
subprobtypethe subproblem type

Definition at line 6268 of file benders.c.

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

Referenced by checkSubproblemConvexity(), and SCIPbendersSetMastervarsCont().

◆ SCIPbendersGetSubproblemType()

SCIP_EXPORT SCIP_BENDERSSUBTYPE SCIPbendersGetSubproblemType ( SCIP_BENDERS benders,
int  probnumber 
)

◆ SCIPbendersSetSubproblemIsConvex()

SCIP_EXPORT void SCIPbendersSetSubproblemIsConvex ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Bool  isconvex 
)

sets the flag indicating whether a subproblem is convex

It is possible that this can change during the solving process. One example is when the three-phase method is employed, where the first phase solves the convex relaxation of both the master and subproblems, the second phase reintroduces the integrality constraints to the master problem and the third phase then reintroduces integrality constraints to the subproblems.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
isconvexflag to indicate whether the subproblem is convex

Definition at line 6311 of file benders.c.

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

◆ SCIPbendersSubproblemIsConvex()

SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsConvex ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the subproblem is convex

This means that the dual solution can be used to generate cuts.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6334 of file benders.c.

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

◆ SCIPbendersGetNConvexSubproblems()

SCIP_EXPORT int SCIPbendersGetNConvexSubproblems ( SCIP_BENDERS benders)

returns the number of subproblems that are convex

Parameters
bendersBenders' decomposition

Definition at line 6346 of file benders.c.

References SCIP_Benders::nconvexsubprobs, and NULL.

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

◆ SCIPbendersSetSubproblemIsNonlinear()

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

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

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

Definition at line 6356 of file benders.c.

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

Referenced by checkSubproblemConvexity().

◆ SCIPbendersSubproblemIsNonlinear()

SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsNonlinear ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the subproblem contains non-linear constraints.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6376 of file benders.c.

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

Referenced by createSubproblems().

◆ SCIPbendersGetNNonlinearSubproblems()

SCIP_EXPORT int SCIPbendersGetNNonlinearSubproblems ( SCIP_BENDERS benders)

returns the number of subproblems that contain non-linear constraints

Parameters
bendersBenders' decomposition

Definition at line 6388 of file benders.c.

References SCIP_Benders::nnonlinearsubprobs, and NULL.

◆ SCIPbendersSetMasterIsNonlinear()

SCIP_EXPORT void SCIPbendersSetMasterIsNonlinear ( SCIP_BENDERS benders,
SCIP_Bool  isnonlinear 
)

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

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

Definition at line 6398 of file benders.c.

References SCIP_Benders::masterisnonlinear, and NULL.

Referenced by checkSubproblemConvexity().

◆ SCIPbendersMasterIsNonlinear()

SCIP_EXPORT SCIP_Bool SCIPbendersMasterIsNonlinear ( SCIP_BENDERS benders)

returns whether the master problem contains non-linear constraints.

Parameters
bendersBenders' decomposition

Definition at line 6409 of file benders.c.

References SCIP_Benders::masterisnonlinear, and NULL.

Referenced by SCIP_DECL_BENDERSCUTEXEC().

◆ SCIPbendersInStrengthenRound()

SCIP_EXPORT SCIP_Bool SCIPbendersInStrengthenRound ( SCIP_BENDERS benders)

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

Parameters
bendersBenders' decomposition

Definition at line 6419 of file benders.c.

References NULL, and SCIP_Benders::strengthenround.

Referenced by SCIPgenerateAndApplyBendersOptCut().

◆ SCIPbendersSolveSubproblemLP()

SCIP_EXPORT SCIP_RETCODE SCIPbendersSolveSubproblemLP ( SCIP scip,
SCIP_BENDERS benders,
int  probnumber,
SCIP_STATUS solvestatus,
SCIP_Real objective 
)

solves the LP of the Benders' decomposition subproblem

This requires that the subproblem is in probing mode.

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

References FALSE, NULL, resetOrigSubproblemParams(), SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_Bool, SCIP_CALL, SCIP_LPSOLSTAT_ERROR, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_ITERLIMIT, SCIP_LPSOLSTAT_NOTSOLVED, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_LPSOLSTAT_TIMELIMIT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_NLPPAR_ITLIM, SCIP_NLPPAR_VERBLEVEL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPSOLSTAT_UNBOUNDED, SCIP_NLPTERMSTAT_OKAY, SCIP_NLPTERMSTAT_TILIM, SCIP_OKAY, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_VERBLEVEL_FULL, SCIPABORT, SCIPallocBlockMemory, SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsSetup(), SCIPcreateNLPSol(), SCIPdebugMsg, SCIPerrorMessage, SCIPfreeBlockMemory, SCIPfreeSol(), SCIPgetLPSolstat(), SCIPgetNLPObjval(), SCIPgetNLPSolstat(), SCIPgetNLPTermstat(), SCIPgetNNlpis(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPinfinity(), SCIPinProbing(), SCIPisLPConstructed(), SCIPisNLPConstructed(), SCIPprintSol(), SCIPretransformObj(), SCIPsetNLPIntPar(), SCIPsolveNLP(), SCIPsolveProbingLP(), SCIPverbMessage(), setSubproblemParams(), storeOrigSubproblemParams(), and TRUE.

Referenced by SCIPbendersExecSubproblemSolve(), and SCIPbendersSolveSubproblem().

◆ SCIPbendersSolveSubproblemCIP()

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

◆ SCIPbendersGetNTransferredCuts()

SCIP_EXPORT int SCIPbendersGetNTransferredCuts ( SCIP_BENDERS benders)

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

Parameters
bendersthe Benders' decomposition data structure

Definition at line 6673 of file benders.c.

References SCIP_Benders::ntransferred, and NULL.

Referenced by createAndAddTransferredCut(), and SCIPprintBendersStatistics().

◆ SCIPbendersUpdateSubproblemLowerbound()

SCIP_EXPORT void SCIPbendersUpdateSubproblemLowerbound ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Real  lowerbound 
)

updates the lower bound for the subproblem. If the lower bound is not greater than the previously stored lowerbound, then no update occurs.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
lowerboundthe lower bound

Definition at line 6685 of file benders.c.

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

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), SCIP_DECL_CONSPRESOL(), updateAuxiliaryVarLowerbound(), and updateSubproblemLowerbound().

◆ SCIPbendersGetSubproblemLowerbound()

SCIP_EXPORT SCIP_Real SCIPbendersGetSubproblemLowerbound ( SCIP_BENDERS benders,
int  probnumber 
)

returns the stored lower bound for the given subproblem

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6704 of file benders.c.

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

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

◆ SCIPbendersSetSubproblemIsIndependent()

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

sets the independent subproblem flag

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

Definition at line 6534 of file benders.c.

References SCIP_Benders::indepsubprob, SCIP_Benders::nactivesubprobs, SCIP_Benders::name, NULL, SCIP_Bool, SCIPABORT, SCIPbendersGetNSubproblems(), SCIPerrorMessage, and subproblemIsActive().

Referenced by checkSubproblemIndependence(), and SCIPbendersExitsol().

◆ SCIPbendersSubproblemIsIndependent()

SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsIndependent ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the subproblem is independent

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6574 of file benders.c.

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

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

◆ SCIPbendersSubproblemIsEnabled()

SCIP_EXPORT SCIP_Bool SCIPbendersSubproblemIsEnabled ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the subproblem is enabled, i.e. the subproblem is still solved in the solving loop.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6614 of file benders.c.

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

Referenced by subproblemIsActive().

◆ SCIPincludeBenders()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBenders ( SCIP scip,
const char *  name,
const char *  desc,
int  priority,
SCIP_Bool  cutlp,
SCIP_Bool  cutpseudo,
SCIP_Bool  cutrelax,
SCIP_Bool  shareauxvars,
SCIP_DECL_BENDERSCOPY((*benderscopy))  ,
SCIP_DECL_BENDERSFREE((*bendersfree))  ,
SCIP_DECL_BENDERSINIT((*bendersinit))  ,
SCIP_DECL_BENDERSEXIT((*bendersexit))  ,
SCIP_DECL_BENDERSINITPRE((*bendersinitpre))  ,
SCIP_DECL_BENDERSEXITPRE((*bendersexitpre))  ,
SCIP_DECL_BENDERSINITSOL((*bendersinitsol))  ,
SCIP_DECL_BENDERSEXITSOL((*bendersexitsol))  ,
SCIP_DECL_BENDERSGETVAR((*bendersgetvar))  ,
SCIP_DECL_BENDERSCREATESUB((*benderscreatesub))  ,
SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve))  ,
SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex))  ,
SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub))  ,
SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve))  ,
SCIP_DECL_BENDERSFREESUB((*bendersfreesub))  ,
SCIP_BENDERSDATA bendersdata 
)

creates a Benders' decomposition and includes it in SCIP

To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders(). This should be done during the problem creation stage.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
method has all Benders' decomposition callbacks as arguments and is thus changed every time a new callback is added in future releases; consider using SCIPincludeBendersBasic() and setter functions if you seek for a method which is less likely to change in future releases
Parameters
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 67 of file scip_benders.c.

References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbendersCreate(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenders(), SCIPsetIncludeBenders(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludeObjBenders().

◆ SCIPincludeBendersBasic()

SCIP_EXPORT SCIP_RETCODE SCIPincludeBendersBasic ( SCIP scip,
SCIP_BENDERS **  bendersptr,
const char *  name,
const char *  desc,
int  priority,
SCIP_Bool  cutlp,
SCIP_Bool  cutpseudo,
SCIP_Bool  cutrelax,
SCIP_Bool  shareauxvars,
SCIP_DECL_BENDERSGETVAR((*bendersgetvar))  ,
SCIP_DECL_BENDERSCREATESUB((*benderscreatesub))  ,
SCIP_BENDERSDATA bendersdata 
)

creates a Benders' decomposition and includes it in SCIP with all non-fundamental callbacks set to NULL

If needed, the non-fundamental callbacks can be added afterwards via setter functions SCIPsetBendersCopy(), SCIPsetBendersFree(), SCIPsetBendersInity(), SCIPsetBendersExit(), SCIPsetBendersInitsol(), SCIPsetBendersExitsol(), SCIPsetBendersFarkas().

To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders(). This should be done during the problem creation stage.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
if you want to set all callbacks with a single method call, consider using SCIPincludeBenders() instead
Parameters
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 142 of file scip_benders.c.

References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPbendersCreate(), SCIPcheckStage(), SCIPerrorMessage, SCIPfindBenders(), SCIPsetIncludeBenders(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersCopy()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersCopy ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSCOPY((*benderscopy))   
)

sets copy method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 188 of file scip_benders.c.

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

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersFree()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersFree ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSFREE((*bendersfree))   
)

sets destructor method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 212 of file scip_benders.c.

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

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersInit()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInit ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSINIT((*bendersinit))   
)

sets initialization method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 236 of file scip_benders.c.

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

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersExit()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExit ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSEXIT((*bendersexit))   
)

sets deinitialization method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 260 of file scip_benders.c.

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

Referenced by SCIPincludeBendersDefault().

◆ SCIPsetBendersInitpre()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInitpre ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSINITPRE((*bendersinitpre))   
)

sets presolving initialization method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 284 of file scip_benders.c.

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

◆ SCIPsetBendersExitpre()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExitpre ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSEXITPRE((*bendersexitpre))   
)

sets presolving deinitialization method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 308 of file scip_benders.c.

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

◆ SCIPsetBendersInitsol()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersInitsol ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSINITSOL((*bendersinitsol))   
)

sets solving process initialization method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 332 of file scip_benders.c.

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

◆ SCIPsetBendersExitsol()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersExitsol ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSEXITSOL((*bendersexitsol))   
)

sets solving process deinitialization method of benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 356 of file scip_benders.c.

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

◆ SCIPsetBendersPresubsolve()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersPresubsolve ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve))   
)

sets the method called prior to solving the subproblems for benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 380 of file scip_benders.c.

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

◆ SCIPsetBendersSolveAndFreesub()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersSolveAndFreesub ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex))  ,
SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub))  ,
SCIP_DECL_BENDERSFREESUB((*bendersfreesub))   
)

sets the subproblem solving and freeing methods for Benders' decomposition

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 404 of file scip_benders.c.

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

◆ SCIPsetBendersPostsolve()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersPostsolve ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve))   
)

sets the post solving methods for benders

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 444 of file scip_benders.c.

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

◆ SCIPsetBendersSubproblemComp()

SCIP_EXPORT SCIP_RETCODE SCIPsetBendersSubproblemComp ( SCIP scip,
SCIP_BENDERS benders,
SCIP_DECL_SORTPTRCOMP((*benderssubcomp))   
)

sets the subproblem comparison method for determining the solving order in Benders' decomposition

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 468 of file scip_benders.c.

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

◆ SCIPfindBenders()

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

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

Parameters
scipSCIP data structure
namename of Benders' decomposition

Definition at line 484 of file scip_benders.c.

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

Referenced by addScenarioVarsAndConsToProb(), buildDecompProblem(), createAndAddTransferredCut(), SCIP_DECL_BENDERSCOPY(), SCIPapplyBendersDecomposition(), SCIPcreateBendersDefault(), SCIPfindObjBenders(), SCIPfindObjBenderscut(), SCIPincludeBenders(), SCIPincludeBendersBasic(), SCIPincludeObjBenderscut(), and transferBendersCuts().

◆ SCIPgetBenders()

SCIP_EXPORT SCIP_BENDERS** SCIPgetBenders ( SCIP scip)

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

Parameters
scipSCIP data structure

Definition at line 499 of file scip_benders.c.

References SCIP_Set::benders, NULL, SCIPsetSortBenders(), and Scip::set.

Referenced by addAuxiliaryVariablesToMaster(), assignAuxiliaryVariables(), constructValidSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIPconsBendersEnforceSolution(), SCIPprintBendersStatistics(), and SCIPsetBenderscutPriority().

◆ SCIPgetNBenders()

SCIP_EXPORT int SCIPgetNBenders ( SCIP scip)

returns the number of currently available Benders' decomposition

Parameters
scipSCIP data structure

Definition at line 512 of file scip_benders.c.

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

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

◆ SCIPgetNActiveBenders()

SCIP_EXPORT int SCIPgetNActiveBenders ( SCIP scip)

returns the number of currently active Benders' decomposition

Parameters
scipSCIP data structure

Definition at line 523 of file scip_benders.c.

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

Referenced by constructValidSolution(), SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSLOCK(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_DIALOGEXEC(), SCIPapplyBendersDecomposition(), SCIPconsBendersEnforceSolution(), SCIPprintBendersStatistics(), and SCIPsolve().

◆ SCIPactivateBenders()

SCIP_EXPORT SCIP_RETCODE SCIPactivateBenders ( SCIP scip,
SCIP_BENDERS benders,
int  nsubproblems 
)

activates the Benders' decomposition to be used for the current problem

This method should be called during the problem creation stage for all pricers that are necessary to solve the problem model.

Note
The Benders' decompositions are automatically deactivated when the problem is freed.
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersthe Benders' decomposition structure
nsubproblemsthe number of subproblems in the Benders' decomposition

Definition at line 546 of file scip_benders.c.

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

Referenced by SCIPcreateBendersDefault().

◆ SCIPdeactivateBenders()

SCIP_EXPORT SCIP_RETCODE SCIPdeactivateBenders ( SCIP scip,
SCIP_BENDERS benders 
)

deactivates the Benders' decomposition

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersthe Benders' decomposition structure

Definition at line 568 of file scip_benders.c.

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

◆ SCIPsetBendersPriority()

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

sets the priority of a Benders' decomposition

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

Definition at line 581 of file scip_benders.c.

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

Referenced by SCIP_DECL_PARAMCHGD().

◆ SCIPsolveBendersSubproblems()

SCIP_EXPORT SCIP_RETCODE SCIPsolveBendersSubproblems ( SCIP scip,
SCIP_BENDERS benders,
SCIP_SOL sol,
SCIP_RESULT result,
SCIP_Bool infeasible,
SCIP_Bool auxviol,
SCIP_BENDERSENFOTYPE  type,
SCIP_Bool  checkint 
)

calls the exec method of Benders' decomposition to solve the subproblems

The checkint flag indicates whether integer feasibility can be assumed. If it is not assumed, i.e. checkint == FALSE, then only the convex relaxations of the subproblems are solved. If integer feasibility is assumed, i.e. checkint == TRUE, then the convex relaxations and the full CIP are solved to generate Benders' cuts and check solution feasibility.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
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 613 of file scip_benders.c.

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

Referenced by performInteriorSolCutStrengthening(), SCIP_DECL_CONSCHECK(), SCIPbendersExec(), and SCIPconsBendersEnforceSolution().

◆ SCIPgetBendersMasterVar()

SCIP_EXPORT SCIP_RETCODE SCIPgetBendersMasterVar ( SCIP scip,
SCIP_BENDERS benders,
SCIP_VAR var,
SCIP_VAR **  mappedvar 
)

returns the master problem variable for the given subproblem variable

This function is used as part of the cut generation process.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition
varthe subproblem variable
mappedvarpointer to store the master variable that var is mapped to

Definition at line 651 of file scip_benders.c.

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

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

◆ SCIPgetBendersSubproblemVar()

SCIP_EXPORT SCIP_RETCODE SCIPgetBendersSubproblemVar ( SCIP scip,
SCIP_BENDERS benders,
SCIP_VAR var,
SCIP_VAR **  mappedvar,
int  probnumber 
)

returns the subproblem problem variable for the given master variable

This function is used as part of the cut generation process.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
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 687 of file scip_benders.c.

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

Referenced by checkSubproblemIndependence(), computeStandardIntegerOptCut(), and performInteriorSolCutStrengthening().

◆ SCIPgetBendersNSubproblems()

SCIP_EXPORT int SCIPgetBendersNSubproblems ( SCIP scip,
SCIP_BENDERS benders 
)

returns the number of subproblems that are stored in the given Benders' decomposition

Returns
the number of subproblems in the Benders' decomposition
Parameters
scipSCIP data structure
bendersBenders' decomposition

Definition at line 713 of file scip_benders.c.

References NULL, and SCIPbendersGetNSubproblems().

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

◆ SCIPaddBendersSubproblem()

SCIP_EXPORT SCIP_RETCODE SCIPaddBendersSubproblem ( SCIP scip,
SCIP_BENDERS benders,
SCIP subproblem 
)

registers the Benders' decomposition subproblem with the Benders' decomposition struct.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

registers the Benders' decomposition subproblem with the Benders' decomposition struct.

If a custom subproblem solving method is used and no internal cut generation methods will be employed, then the subproblem parameter can be set to NULL. By setting subproblem to NULL will inform the Benders' decomposition core that a custom solving method is used. This will ensure that no internal solving methods are invoked during the solution process.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition
subproblemBenders' decomposition subproblem, can be NULL

Definition at line 737 of file scip_benders.c.

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

Referenced by SCIP_DECL_BENDERSCREATESUB().

◆ SCIPsetupBendersSubproblem()

SCIP_EXPORT SCIP_RETCODE SCIPsetupBendersSubproblem ( SCIP scip,
SCIP_BENDERS benders,
SCIP_SOL sol,
int  probnumber,
SCIP_BENDERSENFOTYPE  type 
)

calls the generic subproblem setup method for a Benders' decomposition subproblem

This is called if the user requires to solve the Benders' decomposition subproblem separately from the main Benders' solving loop. This could be in the case of enhancement techniques.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

calls the generic subproblem setup method for a Benders' decomposition subproblem

This is called if the user requires to solve the Benders' decomposition subproblem separately from the main Benders' solving loop. This could be in the case of enhancement techniques.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
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 771 of file scip_benders.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPsolveBendersSubproblem()

SCIP_EXPORT SCIP_RETCODE SCIPsolveBendersSubproblem ( SCIP scip,
SCIP_BENDERS benders,
SCIP_SOL sol,
int  probnumber,
SCIP_Bool infeasible,
SCIP_Bool  solvecip,
SCIP_Real objective 
)

calls the solving method for a single Benders' decomposition subproblem

The method either calls the users solve subproblem method or calls the generic method. In the case of the generic method, the user must set up the subproblem prior to calling this method.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

calls the solving method for a single Benders' decomposition subproblem

The method either calls the users solve subproblem method or calls the generic method. In the case of the generic method, the user must set up the subproblem prior to calling this method.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
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 809 of file scip_benders.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPfreeBendersSubproblem()

SCIP_EXPORT SCIP_RETCODE SCIPfreeBendersSubproblem ( SCIP scip,
SCIP_BENDERS benders,
int  probnumber 
)

frees the subproblem after calling the solve subproblem method

This will either call the user defined free subproblem callback for Benders' decomposition or the default freeing methods. In the default case, if the subproblem is an LP, then SCIPendProbing is called. If the subproblem is a MIP, then SCIPfreeTransform is called.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:

frees the subproblem after calling the solve subproblem method

This will either call the user defined free subproblem callback for Benders' decomposition or the default freeing methods. In the default case, if the subproblem is an LP, then SCIPendProbing is called. If the subproblem is a MIP, then SCIPfreeTransform is called.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 852 of file scip_benders.c.

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

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPcheckBendersSubproblemOptimality()

SCIP_EXPORT SCIP_RETCODE SCIPcheckBendersSubproblemOptimality ( SCIP scip,
SCIP_BENDERS benders,
SCIP_SOL sol,
int  probnumber,
SCIP_Bool optimal 
)

checks the optimality of a Benders' decomposition subproblem by comparing the objective function value against the value of the corresponding auxiliary variable

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
This method can be called if requested subproblem is in one of the following stages:

checks the optimality of a Benders' decomposition subproblem by comparing the objective function value against the value of the corresponding auxiliary variable

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called in any SCIP stage; however, it is necessary that the Benders' auxiliary variables exist. If they don't exist, then the optimal flag is returned as FALSE.
This method can be called if requested subproblem is in one of the following stages:
Parameters
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 883 of file scip_benders.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetAuxiliaryVar(), SCIPbendersGetNSubproblems(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsOptimal(), SCIPcheckStage(), SCIPgetStage(), SCIPinfoMessage(), Scip::set, and TRUE.

Referenced by generateAndApplyBendersIntegerCuts(), and SCIPgenerateAndApplyBendersOptCut().

◆ SCIPgetBendersAuxiliaryVarVal()

SCIP_EXPORT SCIP_Real SCIPgetBendersAuxiliaryVarVal ( SCIP scip,
SCIP_BENDERS benders,
SCIP_SOL sol,
int  probnumber 
)

returns the value of the auxiliary variable for a given subproblem

returns the value of the auxiliary variable for a given subproblem

Returns
the value of the auxiliary variable for the given subproblem
Parameters
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 922 of file scip_benders.c.

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

Referenced by unboundedAuxiliaryVariables().

◆ SCIPcomputeBendersSubproblemLowerbound()

SCIP_EXPORT SCIP_RETCODE SCIPcomputeBendersSubproblemLowerbound ( SCIP scip,
SCIP_BENDERS benders,
int  probnumber,
SCIP_Real lowerbound,
SCIP_Bool infeasible 
)

solves an independent subproblem to identify its lower bound and updates the lower bound of the corresponding auxiliary variable

Precondition
This method can be called if SCIP is in one of the following stages:
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Parameters
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 950 of file scip_benders.c.

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

Referenced by SCIP_DECL_CONSPRESOL().

◆ SCIPmergeBendersSubproblemIntoMaster()

SCIP_EXPORT SCIP_RETCODE SCIPmergeBendersSubproblemIntoMaster ( SCIP scip,
SCIP_BENDERS benders,
SCIP_HASHMAP varmap,
SCIP_HASHMAP consmap,
int  probnumber 
)

merges a subproblem into the master problem.

This process just adds a copy of the subproblem variables and constraints to the master problem, but keeps the subproblem stored in the Benders' decomposition data structure. The reason for keeping the subproblem available is for when it is queried for solutions after the problem is solved.

Once the subproblem is merged into the master problem, then the subproblem is flagged as disabled. This means that it will not be solved in the subsequent subproblem solving loops.

The associated auxiliary variables are kept in the master problem. The objective function of the merged subproblem is added as an underestimator constraint.

Precondition
This method can be called if SCIP is in one of the following stages:
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.

Merges a subproblem into the master problem. This process just adds a copy of the subproblem variables and constraints to the master problem, but keeps the subproblem stored in the Benders' decomposition data structure. The reason for keeping the subproblem available is for when it is queried for solutions after the problem is solved.

Once the subproblem is merged into the master problem, then the subproblem is flagged as disabled. This means that it will not be solved in the subsequent subproblem solving loops.

The associated auxiliary variables are kept in the master problem. The objective function of the merged subproblem is added as an underestimator constraint.

Precondition
This method can be called if SCIP is in one of the following stages:
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Parameters
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 990 of file scip_benders.c.

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

◆ SCIPapplyBendersDecomposition()

SCIP_EXPORT SCIP_RETCODE SCIPapplyBendersDecomposition ( SCIP scip,
int  decompindex 
)

applies a Benders' decomposition to the selected decomposition from the decomposition store

Precondition
This method can be called if SCIP is in one of the following stages:
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.

applies a Benders' decomposition to the selected decomposition from the decomposition store

Precondition
This method can be called if SCIP is in one of the following stages:
Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Parameters
scipthe SCIP data structure
decompindexthe index of the decomposition that will be applied

Definition at line 1019 of file scip_benders.c.

References Scip::decompstore, FALSE, NULL, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_VERBLEVEL_NORMAL, SCIPbendersApplyDecomposition(), SCIPcheckStage(), SCIPdecompstoreGetNOrigDecomps(), SCIPdecompstoreGetOrigDecomps(), SCIPerrorMessage, SCIPfindBenders(), SCIPgetNActiveBenders(), SCIPverbMessage(), Scip::set, and TRUE.

Referenced by SCIPsolve().