Scippy

SCIP

Solving Constraint Integer Programs

benders.c File Reference
#include <assert.h>
#include <string.h>
#include "scip/def.h"
#include "scip/set.h"
#include "scip/clock.h"
#include "scip/dcmp.h"
#include "scip/paramset.h"
#include "scip/lp.h"
#include "scip/prob.h"
#include "scip/pricestore.h"
#include "scip/scip.h"
#include "scip/scipdefplugins.h"
#include "scip/benders.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/cons_linear.h"
#include "scip/cons_nonlinear.h"
#include "scip/struct_benders.h"
#include "scip/struct_benderscut.h"
#include "scip/benderscut.h"

Go to the source code of this file.

Macros

#define SCIP_DEFAULT_TRANSFERCUTS   FALSE /** should Benders' cuts generated in LNS heuristics be transferred to the main SCIP instance? */
 
#define SCIP_DEFAULT_CUTSASCONSS   TRUE /** should the transferred cuts be added as constraints? */
 
#define SCIP_DEFAULT_LNSCHECK   TRUE /** should the Benders' decomposition be used in LNS heuristics */
 
#define SCIP_DEFAULT_LNSMAXDEPTH   -1 /** maximum depth at which the LNS check is performed */
 
#define SCIP_DEFAULT_LNSMAXCALLS   10 /** the maximum number of Benders' decomposition calls in LNS heuristics */
 
#define SCIP_DEFAULT_LNSMAXCALLSROOT   0 /** the maximum number of root node Benders' decomposition calls in LNS heuristics */
 
#define SCIP_DEFAULT_SUBPROBFRAC   1.0 /** fraction of subproblems that are solved in each iteration */
 
#define SCIP_DEFAULT_UPDATEAUXVARBOUND   FALSE /** should the auxiliary variable lower bound be updated by solving the subproblem */
 
#define SCIP_DEFAULT_AUXVARSIMPLINT   FALSE /** set the auxiliary variables as implint if the subproblem objective is integer */
 
#define SCIP_DEFAULT_CUTCHECK   TRUE /** should cuts be generated during the checking of solutions? */
 
#define SCIP_DEFAULT_STRENGTHENMULT   0.5 /** the convex combination multiplier for the cut strengthening */
 
#define SCIP_DEFAULT_NOIMPROVELIMIT   5 /** the maximum number of cut strengthening without improvement */
 
#define SCIP_DEFAULT_STRENGTHENPERTURB   1e-06 /** the amount by which the cut strengthening solution is perturbed */
 
#define SCIP_DEFAULT_STRENGTHENENABLED   FALSE /** enable the core point cut strengthening approach */
 
#define SCIP_DEFAULT_STRENGTHENINTPOINT   'r' /** where should the strengthening interior point be sourced from ('l'p relaxation, 'f'irst solution, 'i'ncumbent solution, 'r'elative interior point, vector of 'o'nes, vector of 'z'eros) */
 
#define SCIP_DEFAULT_NUMTHREADS   1 /** the number of parallel threads to use when solving the subproblems */
 
#define SCIP_DEFAULT_EXECFEASPHASE   FALSE /** should a feasibility phase be executed during the root node processing */
 
#define SCIP_DEFAULT_SLACKVARCOEF   1e+6 /** the initial objective coefficient of the slack variables in the subproblem */
 
#define SCIP_DEFAULT_MAXSLACKVARCOEF   1e+9 /** the maximal objective coefficient of the slack variables in the subproblem */
 
#define SCIP_DEFAULT_CHECKCONSCONVEXITY   TRUE /** should the constraints of the subproblem be checked for convexity? */
 
#define BENDERS_MAXPSEUDOSOLS
 
#define BENDERS_ARRAYSIZE   1000
 
#define AUXILIARYVAR_NAME   "##bendersauxiliaryvar" /** the name for the Benders' auxiliary variables in the master problem */
 
#define SLACKVAR_NAME
 
#define NLINEARCONSHDLRS   5
 
#define NODEFOCUS_EVENTHDLR_NAME   "bendersnodefocus"
 
#define NODEFOCUS_EVENTHDLR_DESC   "node focus event handler for Benders' decomposition"
 
#define MIPNODEFOCUS_EVENTHDLR_NAME   "bendersmipsolvenodefocus"
 
#define MIPNODEFOCUS_EVENTHDLR_DESC   "node focus event handler for the MIP solve method for Benders' decomposition"
 
#define UPPERBOUND_EVENTHDLR_NAME   "bendersupperbound"
 
#define UPPERBOUND_EVENTHDLR_DESC   "found solution event handler to terminate subproblem solve for a given upper bound"
 
#define NODESOLVED_EVENTHDLR_NAME   "bendersnodesolved"
 
#define NODESOLVED_EVENTHDLR_DESC   "node solved event handler for the Benders' integer cuts"
 

Functions

static SCIP_RETCODE initEventhandlerData (SCIP *scip, SCIP_EVENTHDLRDATA *eventhdlrdata)
 
static SCIP_RETCODE initsolEventhandler (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTTYPE eventtype)
 
static SCIP_RETCODE exitsolEventhandler (SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTTYPE eventtype)
 
static SCIP_RETCODE exitEventhandler (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
static SCIP_RETCODE freeEventhandler (SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
 
static SCIP_DECL_EVENTEXEC (eventExecBendersNodefocus)
 
static SCIP_DECL_EVENTINITSOL (eventInitsolBendersNodefocus)
 
static SCIP_DECL_EVENTEXITSOL (eventExitsolBendersNodefocus)
 
static SCIP_DECL_EVENTEXIT (eventExitBendersNodefocus)
 
static SCIP_DECL_EVENTFREE (eventFreeBendersNodefocus)
 
static SCIP_DECL_EVENTEXEC (eventExecBendersMipnodefocus)
 
static SCIP_DECL_EVENTINITSOL (eventInitsolBendersMipnodefocus)
 
static SCIP_DECL_EVENTEXITSOL (eventExitsolBendersMipnodefocus)
 
static SCIP_DECL_EVENTEXIT (eventExitBendersMipnodefocus)
 
static SCIP_DECL_EVENTFREE (eventFreeBendersMipnodefocus)
 
static SCIP_DECL_EVENTEXEC (eventExecBendersUpperbound)
 
static SCIP_DECL_EVENTINITSOL (eventInitsolBendersUpperbound)
 
static SCIP_DECL_EVENTEXITSOL (eventExitsolBendersUpperbound)
 
static SCIP_DECL_EVENTEXIT (eventExitBendersUpperbound)
 
static SCIP_DECL_EVENTFREE (eventFreeBendersUpperbound)
 
static SCIP_RETCODE updateEventhdlrUpperbound (SCIP_BENDERS *benders, int probnumber, SCIP_Real upperbound)
 
static SCIP_RETCODE updateSubproblemLowerbound (SCIP *masterprob, SCIP_BENDERS *benders)
 
static SCIP_DECL_EVENTEXEC (eventExecBendersNodesolved)
 
static SCIP_DECL_EVENTINITSOL (eventInitsolBendersNodesolved)
 
static SCIP_DECL_SORTPTRCOMP (benderssubcompdefault)
 
static SCIP_RETCODE addAuxiliaryVariablesToMaster (SCIP *scip, SCIP_BENDERS *benders)
 
static SCIP_RETCODE assignAuxiliaryVariables (SCIP *scip, SCIP_BENDERS *benders)
 
static void resetSubproblemObjectiveValue (SCIP_BENDERS *benders, SCIP_SET *set)
 
 SCIP_DECL_SORTPTRCOMP (SCIPbendersComp)
 
 SCIP_DECL_SORTPTRCOMP (SCIPbendersCompName)
 
static SCIP_DECL_PARAMCHGD (paramChgdBendersPriority)
 
static SCIP_RETCODE createMasterVarMapping (SCIP_BENDERS *benders, SCIP_SET *sourceset, SCIP_HASHMAP *varmap)
 
SCIP_RETCODE SCIPbendersCopyInclude (SCIP_BENDERS *benders, SCIP_SET *sourceset, SCIP_SET *targetset, SCIP_HASHMAP *varmap, SCIP_Bool threadsafe, SCIP_Bool *valid)
 
static SCIP_RETCODE doBendersCreate (SCIP_BENDERS **benders, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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 SCIPbendersCreate (SCIP_BENDERS **benders, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, 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)
 
static SCIP_RETCODE releaseVarMappingHashmapVars (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersFree (SCIP_BENDERS **benders, SCIP_SET *set)
 
static SCIP_RETCODE addSlackVars (SCIP *scip, SCIP_BENDERS *benders, SCIP_CONS *cons, SCIP_CONSHDLR **linearconshdlrs, SCIP_CONSHDLR *nlconshdlr, int nlinearconshdlrs)
 
static SCIP_RETCODE addSlackVarsToConstraints (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
 
static SCIP_RETCODE initialiseSubproblem (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber, SCIP_Bool *success)
 
static SCIP_RETCODE initialiseLPSubproblem (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
 
static SCIP_RETCODE checkSubproblemConvexity (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
 
static SCIP_RETCODE createSubproblems (SCIP_BENDERS *benders, SCIP_SET *set)
 
SCIP_RETCODE SCIPbendersInit (SCIP_BENDERS *benders, SCIP_SET *set)
 
static SCIP_RETCODE createAndAddTransferredCut (SCIP *sourcescip, SCIP_BENDERS *benders, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, int nvars)
 
static SCIP_RETCODE transferBendersCuts (SCIP *sourcescip, SCIP *subscip, SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersExit (SCIP_BENDERS *benders, SCIP_SET *set)
 
static SCIP_RETCODE checkSubproblemIndependence (SCIP *scip, SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersInitpre (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPbendersExitpre (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_STAT *stat)
 
SCIP_RETCODE SCIPbendersInitsol (SCIP_BENDERS *benders, SCIP_SET *set)
 
SCIP_RETCODE SCIPbendersExitsol (SCIP_BENDERS *benders, SCIP_SET *set)
 
SCIP_RETCODE SCIPbendersActivate (SCIP_BENDERS *benders, SCIP_SET *set, int nsubproblems)
 
SCIP_RETCODE SCIPbendersDeactivate (SCIP_BENDERS *benders, SCIP_SET *set)
 
SCIP_Bool SCIPbendersIsActive (SCIP_BENDERS *benders)
 
static SCIP_RETCODE updateAuxiliaryVarLowerbound (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_RESULT *result)
 
static SCIP_RETCODE setAndUpdateCorePoint (SCIP *scip, SCIP_BENDERS *benders)
 
static SCIP_RETCODE performInteriorSolCutStrengthening (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint, SCIP_Bool perturbsol, SCIP_Bool *auxviol, SCIP_Bool *infeasible, SCIP_Bool *skipsolve, SCIP_RESULT *result)
 
SCIP_Bool SCIPbendersOnlyCheckConvexRelax (SCIP_BENDERS *benders, SCIP_Bool subscipsoff)
 
static int numSubproblemsToCheck (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_BENDERSENFOTYPE type)
 
static SCIP_Bool subproblemIsActive (SCIP_BENDERS *benders, int probnumber)
 
static void createSolveSubproblemIndexList (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_BENDERSENFOTYPE type, int **solveidx, int *nsolveidx)
 
static SCIP_RETCODE updateSubproblemStatQueue (SCIP_BENDERS *benders, int *solveidx, int nsolveidx, SCIP_Bool updatestat)
 
static SCIP_RETCODE solveBendersSubproblems (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, SCIP_BENDERSENFOTYPE type, SCIP_BENDERSSOLVELOOP solveloop, SCIP_Bool checkint, int *nverified, int *solveidx, int nsolveidx, SCIP_Bool **subprobsolved, SCIP_BENDERSSUBSTATUS **substatus, SCIP_Bool *infeasible, SCIP_Bool *optimal, SCIP_Bool *stopped)
 
static SCIP_RETCODE generateBendersCuts (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_BENDERSENFOTYPE type, SCIP_BENDERSSOLVELOOP solveloop, SCIP_Bool checkint, SCIP_Bool *subprobsolved, SCIP_BENDERSSUBSTATUS *substatus, int *solveidx, int nsolveidx, int **mergecands, int *npriomergecands, int *nmergecands, int *nsolveloops)
 
SCIP_RETCODE SCIPbendersExec (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_Bool *infeasible, SCIP_Bool *auxviol, SCIP_BENDERSENFOTYPE type, SCIP_Bool checkint)
 
static SCIP_RETCODE executeUserDefinedSolvesub (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber, SCIP_BENDERSSOLVELOOP solveloop, SCIP_Bool *infeasible, SCIP_Real *objective, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPbendersExecSubproblemSolve (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber, SCIP_BENDERSSOLVELOOP solveloop, SCIP_Bool enhancement, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_BENDERSENFOTYPE type)
 
SCIP_RETCODE SCIPbendersSetupSubproblem (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber, SCIP_BENDERSENFOTYPE type)
 
SCIP_RETCODE SCIPbendersSolveSubproblem (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber, SCIP_Bool *infeasible, SCIP_Bool solvecip, SCIP_Real *objective)
 
static SCIP_RETCODE copyMemoryAndTimeLimits (SCIP *scip, SCIP *subproblem)
 
static SCIP_RETCODE storeOrigSubproblemParams (SCIP *subproblem, SCIP_SUBPROBPARAMS *origparams)
 
static SCIP_RETCODE setSubproblemParams (SCIP *scip, SCIP *subproblem)
 
static SCIP_RETCODE resetOrigSubproblemParams (SCIP *subproblem, SCIP_SUBPROBPARAMS *origparams)
 
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)
 
SCIP_RETCODE SCIPbendersFreeSubproblem (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
 
SCIP_Bool SCIPbendersSubproblemIsOptimal (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber)
 
SCIP_Real SCIPbendersGetAuxiliaryVarVal (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_SOL *sol, int probnumber)
 
SCIP_RETCODE SCIPbendersComputeSubproblemLowerbound (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber, SCIP_Real *lowerbound, SCIP_Bool *infeasible)
 
SCIP_RETCODE SCIPbendersMergeSubproblemIntoMaster (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, int probnumber)
 
static SCIP_RETCODE addConstraintToBendersSubproblem (SCIP_SET *set, SCIP *subproblem, SCIP_HASHMAP *varmap, SCIP_CONS *sourcecons)
 
static SCIP_RETCODE removeVariablesAndConstraintsFromMaster (SCIP *scip, SCIP_CONS **conss, SCIP_VAR **vars, int *conslabels, int *varslabels, int nconss, int nvars)
 
SCIP_RETCODE SCIPbendersApplyDecomposition (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_DECOMP *decomp)
 
SCIP_RETCODE SCIPbendersGetVar (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_VAR *var, SCIP_VAR **mappedvar, int probnumber)
 
SCIP_BENDERSDATASCIPbendersGetData (SCIP_BENDERS *benders)
 
void SCIPbendersSetData (SCIP_BENDERS *benders, SCIP_BENDERSDATA *bendersdata)
 
void SCIPbendersSetCopy (SCIP_BENDERS *benders, SCIP_DECL_BENDERSCOPY((*benderscopy)))
 
void SCIPbendersSetFree (SCIP_BENDERS *benders, SCIP_DECL_BENDERSFREE((*bendersfree)))
 
void SCIPbendersSetInit (SCIP_BENDERS *benders, SCIP_DECL_BENDERSINIT((*bendersinit)))
 
void SCIPbendersSetExit (SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXIT((*bendersexit)))
 
void SCIPbendersSetInitpre (SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITPRE((*bendersinitpre)))
 
void SCIPbendersSetExitpre (SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITPRE((*bendersexitpre)))
 
void SCIPbendersSetInitsol (SCIP_BENDERS *benders, SCIP_DECL_BENDERSINITSOL((*bendersinitsol)))
 
void SCIPbendersSetExitsol (SCIP_BENDERS *benders, SCIP_DECL_BENDERSEXITSOL((*bendersexitsol)))
 
void SCIPbendersSetPresubsolve (SCIP_BENDERS *benders, SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve)))
 
void SCIPbendersSetSolvesubconvex (SCIP_BENDERS *benders, SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex)))
 
void SCIPbendersSetSolvesub (SCIP_BENDERS *benders, SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub)))
 
void SCIPbendersSetPostsolve (SCIP_BENDERS *benders, SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve)))
 
void SCIPbendersSetSubproblemComp (SCIP_BENDERS *benders, SCIP_DECL_SORTPTRCOMP((*benderssubcomp)))
 
void SCIPbendersSetFreesub (SCIP_BENDERS *benders, SCIP_DECL_BENDERSFREESUB((*bendersfreesub)))
 
const char * SCIPbendersGetName (SCIP_BENDERS *benders)
 
const char * SCIPbendersGetDesc (SCIP_BENDERS *benders)
 
int SCIPbendersGetPriority (SCIP_BENDERS *benders)
 
void SCIPbendersSetPriority (SCIP_BENDERS *benders, SCIP_SET *set, int priority)
 
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)
 
void SCIPbendersEnableOrDisableClocks (SCIP_BENDERS *benders, SCIP_Bool enable)
 
SCIP_Bool SCIPbendersIsInitialized (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersCutLP (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersCutPseudo (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersCutRelaxation (SCIP_BENDERS *benders)
 
SCIP_Bool SCIPbendersShareAuxVars (SCIP_BENDERS *benders)
 
SCIP_RETCODE SCIPbendersAddSubproblem (SCIP_BENDERS *benders, SCIP *subproblem)
 
void SCIPbendersRemoveSubproblems (SCIP_BENDERS *benders)
 
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)
 
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 SCIPbendersChgMastervarsToCont (SCIP_BENDERS *benders, SCIP_SET *set, int probnumber)
 
void SCIPbendersSetSubproblemIsSetup (SCIP_BENDERS *benders, int probnumber, SCIP_Bool issetup)
 
SCIP_Bool SCIPbendersSubproblemIsSetup (SCIP_BENDERS *benders, int probnumber)
 
void SCIPbendersSetSubproblemIsIndependent (SCIP_BENDERS *benders, int probnumber, SCIP_Bool isindep)
 
SCIP_Bool SCIPbendersSubproblemIsIndependent (SCIP_BENDERS *benders, int probnumber)
 
void SCIPbendersSetSubproblemEnabled (SCIP_BENDERS *benders, int probnumber, SCIP_Bool enabled)
 
SCIP_Bool SCIPbendersSubproblemIsEnabled (SCIP_BENDERS *benders, int probnumber)
 
SCIP_RETCODE SCIPbendersSetMastervarsCont (SCIP_BENDERS *benders, int probnumber, SCIP_Bool arecont)
 
SCIP_Bool SCIPbendersGetMastervarsCont (SCIP_BENDERS *benders, int probnumber)
 
int SCIPbendersGetNTransferredCuts (SCIP_BENDERS *benders)
 
void SCIPbendersUpdateSubproblemLowerbound (SCIP_BENDERS *benders, int probnumber, SCIP_Real lowerbound)
 
SCIP_Real SCIPbendersGetSubproblemLowerbound (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_RETCODE SCIPbendersStoreCut (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, int nvars)
 
void SCIPbendersSetBenderscutsSorted (SCIP_BENDERS *benders, SCIP_Bool sorted)
 
SCIP_RETCODE SCIPbendersIncludeBenderscut (SCIP_BENDERS *benders, SCIP_SET *set, SCIP_BENDERSCUT *benderscut)
 
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)
 
void SCIPbendersSortBenderscuts (SCIP_BENDERS *benders)
 
void SCIPbendersSortBenderscutsName (SCIP_BENDERS *benders)
 

Macro Definition Documentation

◆ SCIP_DEFAULT_TRANSFERCUTS

#define SCIP_DEFAULT_TRANSFERCUTS   FALSE /** should Benders' cuts generated in LNS heuristics be transferred to the main SCIP instance? */

Definition at line 58 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_CUTSASCONSS

#define SCIP_DEFAULT_CUTSASCONSS   TRUE /** should the transferred cuts be added as constraints? */

Definition at line 59 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_LNSCHECK

#define SCIP_DEFAULT_LNSCHECK   TRUE /** should the Benders' decomposition be used in LNS heuristics */

Definition at line 60 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_LNSMAXDEPTH

#define SCIP_DEFAULT_LNSMAXDEPTH   -1 /** maximum depth at which the LNS check is performed */

Definition at line 61 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_LNSMAXCALLS

#define SCIP_DEFAULT_LNSMAXCALLS   10 /** the maximum number of Benders' decomposition calls in LNS heuristics */

Definition at line 62 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_LNSMAXCALLSROOT

#define SCIP_DEFAULT_LNSMAXCALLSROOT   0 /** the maximum number of root node Benders' decomposition calls in LNS heuristics */

Definition at line 63 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_SUBPROBFRAC

#define SCIP_DEFAULT_SUBPROBFRAC   1.0 /** fraction of subproblems that are solved in each iteration */

Definition at line 64 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_UPDATEAUXVARBOUND

#define SCIP_DEFAULT_UPDATEAUXVARBOUND   FALSE /** should the auxiliary variable lower bound be updated by solving the subproblem */

Definition at line 65 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_AUXVARSIMPLINT

#define SCIP_DEFAULT_AUXVARSIMPLINT   FALSE /** set the auxiliary variables as implint if the subproblem objective is integer */

Definition at line 66 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_CUTCHECK

#define SCIP_DEFAULT_CUTCHECK   TRUE /** should cuts be generated during the checking of solutions? */

Definition at line 67 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_STRENGTHENMULT

#define SCIP_DEFAULT_STRENGTHENMULT   0.5 /** the convex combination multiplier for the cut strengthening */

Definition at line 68 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_NOIMPROVELIMIT

#define SCIP_DEFAULT_NOIMPROVELIMIT   5 /** the maximum number of cut strengthening without improvement */

Definition at line 69 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_STRENGTHENPERTURB

#define SCIP_DEFAULT_STRENGTHENPERTURB   1e-06 /** the amount by which the cut strengthening solution is perturbed */

Definition at line 70 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_STRENGTHENENABLED

#define SCIP_DEFAULT_STRENGTHENENABLED   FALSE /** enable the core point cut strengthening approach */

Definition at line 71 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_STRENGTHENINTPOINT

#define SCIP_DEFAULT_STRENGTHENINTPOINT   'r' /** where should the strengthening interior point be sourced from ('l'p relaxation, 'f'irst solution, 'i'ncumbent solution, 'r'elative interior point, vector of 'o'nes, vector of 'z'eros) */

Definition at line 72 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_NUMTHREADS

#define SCIP_DEFAULT_NUMTHREADS   1 /** the number of parallel threads to use when solving the subproblems */

Definition at line 73 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_EXECFEASPHASE

#define SCIP_DEFAULT_EXECFEASPHASE   FALSE /** should a feasibility phase be executed during the root node processing */

Definition at line 74 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_SLACKVARCOEF

#define SCIP_DEFAULT_SLACKVARCOEF   1e+6 /** the initial objective coefficient of the slack variables in the subproblem */

Definition at line 75 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_MAXSLACKVARCOEF

#define SCIP_DEFAULT_MAXSLACKVARCOEF   1e+9 /** the maximal objective coefficient of the slack variables in the subproblem */

Definition at line 76 of file benders.c.

Referenced by doBendersCreate().

◆ SCIP_DEFAULT_CHECKCONSCONVEXITY

#define SCIP_DEFAULT_CHECKCONSCONVEXITY   TRUE /** should the constraints of the subproblem be checked for convexity? */

Definition at line 77 of file benders.c.

Referenced by doBendersCreate().

◆ BENDERS_MAXPSEUDOSOLS

#define BENDERS_MAXPSEUDOSOLS
Value:
5 /** the maximum number of pseudo solutions checked before suggesting
* merge candidates */

Definition at line 79 of file benders.c.

Referenced by SCIPbendersExec().

◆ BENDERS_ARRAYSIZE

#define BENDERS_ARRAYSIZE   1000

the initial size of the added constraints/cuts arrays

Definition at line 82 of file benders.c.

Referenced by SCIPbendersInit().

◆ AUXILIARYVAR_NAME

#define AUXILIARYVAR_NAME   "##bendersauxiliaryvar" /** the name for the Benders' auxiliary variables in the master problem */

◆ SLACKVAR_NAME

#define SLACKVAR_NAME
Value:
"##bendersslackvar" /** the name for the Benders' slack variables added to each
* constraints in the subproblems */

Definition at line 85 of file benders.c.

Referenced by addSlackVars(), SCIPbendersSetupSubproblem(), and SCIPbendersSolSlackVarsActive().

◆ NLINEARCONSHDLRS

#define NLINEARCONSHDLRS   5

Definition at line 87 of file benders.c.

Referenced by addSlackVarsToConstraints(), and checkSubproblemConvexity().

◆ NODEFOCUS_EVENTHDLR_NAME

#define NODEFOCUS_EVENTHDLR_NAME   "bendersnodefocus"

◆ NODEFOCUS_EVENTHDLR_DESC

#define NODEFOCUS_EVENTHDLR_DESC   "node focus event handler for Benders' decomposition"

Definition at line 91 of file benders.c.

Referenced by initialiseLPSubproblem().

◆ MIPNODEFOCUS_EVENTHDLR_NAME

◆ MIPNODEFOCUS_EVENTHDLR_DESC

#define MIPNODEFOCUS_EVENTHDLR_DESC   "node focus event handler for the MIP solve method for Benders' decomposition"

Definition at line 94 of file benders.c.

Referenced by createSubproblems().

◆ UPPERBOUND_EVENTHDLR_NAME

#define UPPERBOUND_EVENTHDLR_NAME   "bendersupperbound"

◆ UPPERBOUND_EVENTHDLR_DESC

#define UPPERBOUND_EVENTHDLR_DESC   "found solution event handler to terminate subproblem solve for a given upper bound"

Definition at line 97 of file benders.c.

Referenced by createSubproblems().

◆ NODESOLVED_EVENTHDLR_NAME

#define NODESOLVED_EVENTHDLR_NAME   "bendersnodesolved"

Definition at line 99 of file benders.c.

Referenced by SCIP_DECL_EVENTEXEC(), SCIP_DECL_EVENTINITSOL(), and SCIPbendersActivate().

◆ NODESOLVED_EVENTHDLR_DESC

#define NODESOLVED_EVENTHDLR_DESC   "node solved event handler for the Benders' integer cuts"

Definition at line 100 of file benders.c.

Referenced by SCIPbendersActivate().

Function Documentation

◆ initEventhandlerData()

static SCIP_RETCODE initEventhandlerData ( SCIP scip,
SCIP_EVENTHDLRDATA eventhdlrdata 
)
static

initialises the members of the eventhandler data

Parameters
scipthe SCIP data structure
eventhdlrdatathe event handler data

Definition at line 117 of file benders.c.

References FALSE, NULL, SCIP_OKAY, and SCIPinfinity().

Referenced by createSubproblems(), exitEventhandler(), and initialiseLPSubproblem().

◆ initsolEventhandler()

static SCIP_RETCODE initsolEventhandler ( SCIP scip,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTTYPE  eventtype 
)
static

initsol method for the event handlers

Parameters
scipthe SCIP data structure
eventhdlrthe event handlers data structure
eventtypeevent type mask to select events to catch

Definition at line 135 of file benders.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPcatchEvent(), and SCIPeventhdlrGetData().

Referenced by SCIP_DECL_EVENTINITSOL().

◆ exitsolEventhandler()

static SCIP_RETCODE exitsolEventhandler ( SCIP scip,
SCIP_EVENTHDLR eventhdlr,
SCIP_EVENTTYPE  eventtype 
)
static

the exit sol method for the event handlers

Parameters
scipthe SCIP data structure
eventhdlrthe event handlers data structure
eventtypeevent type mask to select events to catch

Definition at line 155 of file benders.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPdropEvent(), and SCIPeventhdlrGetData().

Referenced by SCIP_DECL_EVENTEXITSOL().

◆ exitEventhandler()

static SCIP_RETCODE exitEventhandler ( SCIP scip,
SCIP_EVENTHDLR eventhdlr 
)
static

the exit method for the event handlers

Parameters
scipthe SCIP data structure
eventhdlrthe event handlers data structure

Definition at line 179 of file benders.c.

References initEventhandlerData(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPeventhdlrGetData().

Referenced by SCIP_DECL_EVENTEXIT().

◆ freeEventhandler()

static SCIP_RETCODE freeEventhandler ( SCIP scip,
SCIP_EVENTHDLR eventhdlr 
)
static

free method for the event handler

Parameters
scipthe SCIP data structure
eventhdlrthe event handlers data structure

Definition at line 199 of file benders.c.

References NULL, SCIP_OKAY, SCIPeventhdlrGetData(), SCIPeventhdlrSetData(), and SCIPfreeBlockMemory.

Referenced by SCIP_DECL_EVENTFREE().

◆ SCIP_DECL_EVENTEXEC() [1/4]

static SCIP_DECL_EVENTEXEC ( eventExecBendersNodefocus  )
static

◆ SCIP_DECL_EVENTINITSOL() [1/4]

static SCIP_DECL_EVENTINITSOL ( eventInitsolBendersNodefocus  )
static

solving process initialization method of event handler (called when branch and bound process is about to begin)

Definition at line 247 of file benders.c.

References initsolEventhandler(), NODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_NODEFOCUSED, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTEXITSOL() [1/3]

static SCIP_DECL_EVENTEXITSOL ( eventExitsolBendersNodefocus  )
static

solving process deinitialization method of event handler (called before branch and bound process data is freed)

Definition at line 260 of file benders.c.

References exitsolEventhandler(), NODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_NODEFOCUSED, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTEXIT() [1/3]

static SCIP_DECL_EVENTEXIT ( eventExitBendersNodefocus  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 273 of file benders.c.

References exitEventhandler(), NODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTFREE() [1/3]

static SCIP_DECL_EVENTFREE ( eventFreeBendersNodefocus  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 286 of file benders.c.

References freeEventhandler(), NODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTEXEC() [2/4]

static SCIP_DECL_EVENTEXEC ( eventExecBendersMipnodefocus  )
static

◆ SCIP_DECL_EVENTINITSOL() [2/4]

static SCIP_DECL_EVENTINITSOL ( eventInitsolBendersMipnodefocus  )
static

solving process initialization method of event handler (called when branch and bound process is about to begin)

Definition at line 328 of file benders.c.

References initsolEventhandler(), MIPNODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_NODEFOCUSED, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTEXITSOL() [2/3]

static SCIP_DECL_EVENTEXITSOL ( eventExitsolBendersMipnodefocus  )
static

solving process deinitialization method of event handler (called before branch and bound process data is freed)

Definition at line 341 of file benders.c.

References exitsolEventhandler(), MIPNODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_NODEFOCUSED, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTEXIT() [2/3]

static SCIP_DECL_EVENTEXIT ( eventExitBendersMipnodefocus  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 354 of file benders.c.

References exitEventhandler(), MIPNODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTFREE() [2/3]

static SCIP_DECL_EVENTFREE ( eventFreeBendersMipnodefocus  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 367 of file benders.c.

References freeEventhandler(), MIPNODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, and SCIPeventhdlrGetName().

◆ SCIP_DECL_EVENTEXEC() [3/4]

static SCIP_DECL_EVENTEXEC ( eventExecBendersUpperbound  )
static

◆ SCIP_DECL_EVENTINITSOL() [3/4]

static SCIP_DECL_EVENTINITSOL ( eventInitsolBendersUpperbound  )
static

solving process initialization method of event handler (called when branch and bound process is about to begin)

Definition at line 406 of file benders.c.

References initsolEventhandler(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_OKAY, SCIPeventhdlrGetName(), and UPPERBOUND_EVENTHDLR_NAME.

◆ SCIP_DECL_EVENTEXITSOL() [3/3]

static SCIP_DECL_EVENTEXITSOL ( eventExitsolBendersUpperbound  )
static

solving process deinitialization method of event handler (called before branch and bound process data is freed)

Definition at line 419 of file benders.c.

References exitsolEventhandler(), NULL, SCIP_CALL, SCIP_EVENTTYPE_BESTSOLFOUND, SCIP_OKAY, SCIPeventhdlrGetName(), and UPPERBOUND_EVENTHDLR_NAME.

◆ SCIP_DECL_EVENTEXIT() [3/3]

static SCIP_DECL_EVENTEXIT ( eventExitBendersUpperbound  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 432 of file benders.c.

References exitEventhandler(), NULL, SCIP_CALL, SCIP_OKAY, SCIPeventhdlrGetName(), and UPPERBOUND_EVENTHDLR_NAME.

◆ SCIP_DECL_EVENTFREE() [3/3]

static SCIP_DECL_EVENTFREE ( eventFreeBendersUpperbound  )
static

deinitialization method of event handler (called before transformed problem is freed)

Definition at line 445 of file benders.c.

References freeEventhandler(), NULL, SCIP_CALL, SCIP_OKAY, SCIPeventhdlrGetName(), and UPPERBOUND_EVENTHDLR_NAME.

◆ updateEventhdlrUpperbound()

static SCIP_RETCODE updateEventhdlrUpperbound ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Real  upperbound 
)
static

updates the upper bound in the event handler data

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
upperboundthe upper bound value

Definition at line 458 of file benders.c.

References NULL, SCIP_OKAY, SCIPbendersSubproblem(), SCIPeventhdlrGetData(), SCIPfindEventhdlr(), and UPPERBOUND_EVENTHDLR_NAME.

Referenced by SCIPbendersExecSubproblemSolve().

◆ updateSubproblemLowerbound()

static SCIP_RETCODE updateSubproblemLowerbound ( SCIP masterprob,
SCIP_BENDERS benders 
)
static

Updates the cut constant of the Benders' cuts data. This function solves the master problem with only the auxiliary variables in the objective function.

Parameters
masterprobthe SCIP instance of the master problem
bendersBenders' decomposition

Definition at line 487 of file benders.c.

References NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARSTATUS_COLUMN, SCIPbendersGetAuxiliaryVar(), SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemLowerbound(), SCIPbendersUpdateSubproblemLowerbound(), SCIPchgVarObjProbing(), SCIPdebugMsg, SCIPendProbing(), SCIPgetNVars(), SCIPgetSolTransObj(), SCIPgetVars(), SCIPinDive(), SCIPinProbing(), SCIPinRepropagation(), SCIPisInfinity(), SCIPsolveProbingLP(), SCIPstartProbing(), and SCIPvarGetStatus().

Referenced by SCIP_DECL_EVENTEXEC().

◆ SCIP_DECL_EVENTEXEC() [4/4]

static SCIP_DECL_EVENTEXEC ( eventExecBendersNodesolved  )
static

◆ SCIP_DECL_EVENTINITSOL() [4/4]

static SCIP_DECL_EVENTINITSOL ( eventInitsolBendersNodesolved  )
static

solving process initialization method of event handler (called when branch and bound process is about to begin)

Definition at line 577 of file benders.c.

References NODESOLVED_EVENTHDLR_NAME, NULL, SCIP_CALL, SCIP_EVENTTYPE_NODESOLVED, SCIP_OKAY, SCIPbendersIsActive(), SCIPbendersOnlyCheckConvexRelax(), SCIPcatchEvent(), SCIPeventhdlrGetData(), SCIPeventhdlrGetName(), SCIPgetSubscipsOff(), and SCIP_Benders::threadsafe.

◆ SCIP_DECL_SORTPTRCOMP()

static SCIP_DECL_SORTPTRCOMP ( benderssubcompdefault  )
static

comparison method for sorting the subproblems. The subproblem that has been called the least is prioritised

Definition at line 607 of file benders.c.

References SCIP_SubproblemSolveStat::avgiter, SCIP_SubproblemSolveStat::idx, MAX, SCIP_SubproblemSolveStat::ncalls, and NULL.

◆ addAuxiliaryVariablesToMaster()

◆ assignAuxiliaryVariables()

static SCIP_RETCODE assignAuxiliaryVariables ( SCIP scip,
SCIP_BENDERS benders 
)
static

assigns the copied auxiliary variables in the target SCIP to the target Benders' decomposition data

Parameters
scipSCIP data structure, the target scip
bendersBenders' decomposition

Definition at line 748 of file benders.c.

References AUXILIARYVAR_NAME, SCIP_Benders::auxiliaryvars, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPABORT, SCIPallocBlockMemory, SCIPbendersGetName(), SCIPbendersGetNSubproblems(), SCIPbendersShareAuxVars(), SCIPcaptureVar(), SCIPfindVar(), SCIPfreeBlockMemory, SCIPgetBenders(), SCIPgetSubscipDepth(), SCIPsnprintf(), SCIPvarGetTransVar(), SCIPvarSetData(), and TRUE.

Referenced by SCIPbendersInit().

◆ resetSubproblemObjectiveValue()

static void resetSubproblemObjectiveValue ( SCIP_BENDERS benders,
SCIP_SET set 
)
static

sets the subproblem objective value array to -infinity

Parameters
bendersthe Benders' decomposition structure
setglobal SCIP settings

Definition at line 832 of file benders.c.

References NULL, SCIP_Real, SCIPbendersGetNSubproblems(), SCIPbendersSetSubproblemObjval(), SCIPbendersSubproblem(), SCIPinfinity(), and SCIPsetInfinity().

Referenced by SCIPbendersExec().

◆ SCIP_DECL_PARAMCHGD()

static SCIP_DECL_PARAMCHGD ( paramChgdBendersPriority  )
static

method to call, when the priority of a Benders' decomposition was changed

Definition at line 872 of file benders.c.

References NULL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetBendersPriority().

◆ createMasterVarMapping()

static SCIP_RETCODE createMasterVarMapping ( SCIP_BENDERS benders,
SCIP_SET sourceset,
SCIP_HASHMAP varmap 
)
static

creates a variable mapping between the master problem variables of the source scip and the sub scip

Parameters
bendersBenders' decomposition of the target SCIP instance
sourcesetglobal SCIP settings from the source SCIP
varmapa hashmap to store the mapping of source variables corresponding target variables; must not be NULL

Definition at line 887 of file benders.c.

References SCIP_Benders::iscopy, SCIP_Benders::mastervarsmap, NULL, SCIP_Set::scip, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPcaptureVar(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapGetImage(), and SCIPhashmapInsert().

Referenced by SCIPbendersCopyInclude().

◆ SCIPbendersCopyInclude()

SCIP_RETCODE SCIPbendersCopyInclude ( SCIP_BENDERS benders,
SCIP_SET sourceset,
SCIP_SET targetset,
SCIP_HASHMAP varmap,
SCIP_Bool  threadsafe,
SCIP_Bool valid 
)

copies the given Benders' decomposition to a new SCIP

Parameters
bendersBenders' decomposition
sourcesetSCIP_SET of SCIP to copy from
targetsetSCIP_SET of SCIP to copy to
varmapa hashmap to store the mapping of source variables corresponding target variables; if NULL, then the transfer of cuts is not possible
threadsafemust the Benders' decomposition copy be thread safe
validwas the copying process valid?

Definition at line 927 of file benders.c.

References SCIP_Set::benders_copybenders, SCIP_Benders::benderscuts, createMasterVarMapping(), FALSE, SCIP_Benders::lnscheck, SCIP_Benders::lnsmaxcalls, SCIP_Benders::lnsmaxcallsroot, SCIP_Benders::lnsmaxdepth, SCIP_Benders::nbenderscuts, NULL, SCIP_Set::scip, SCIP_CALL, SCIP_OKAY, SCIPbenderscutCopyInclude(), SCIPbendersGetName(), SCIPbendersIsActive(), SCIPbendersSortBenderscuts(), SCIPsetDebugMsg, SCIPsetFindBenders(), and TRUE.

Referenced by SCIPcopyBenders().

◆ doBendersCreate()

static SCIP_RETCODE doBendersCreate ( SCIP_BENDERS **  benders,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
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 
)
static

internal method for creating a Benders' decomposition structure

Parameters
benderspointer to Benders' decomposition data structure
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
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 998 of file benders.c.

References BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_DEFAULT_AUXVARSIMPLINT, SCIP_DEFAULT_CHECKCONSCONVEXITY, SCIP_DEFAULT_CUTCHECK, SCIP_DEFAULT_CUTSASCONSS, SCIP_DEFAULT_EXECFEASPHASE, SCIP_DEFAULT_LNSCHECK, SCIP_DEFAULT_LNSMAXCALLS, SCIP_DEFAULT_LNSMAXCALLSROOT, SCIP_DEFAULT_LNSMAXDEPTH, SCIP_DEFAULT_MAXSLACKVARCOEF, SCIP_DEFAULT_NOIMPROVELIMIT, SCIP_DEFAULT_NUMTHREADS, SCIP_DEFAULT_SLACKVARCOEF, SCIP_DEFAULT_STRENGTHENENABLED, SCIP_DEFAULT_STRENGTHENINTPOINT, SCIP_DEFAULT_STRENGTHENMULT, SCIP_DEFAULT_STRENGTHENPERTURB, SCIP_DEFAULT_SUBPROBFRAC, SCIP_DEFAULT_TRANSFERCUTS, SCIP_DEFAULT_UPDATEAUXVARBOUND, SCIP_INVALIDCALL, SCIP_MAXSTRLEN, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIPclockCreate(), SCIPerrorMessage, SCIPsetAddBoolParam(), SCIPsetAddCharParam(), SCIPsetAddIntParam(), SCIPsetAddRealParam(), SCIPsetInfinity(), SCIPsnprintf(), and TRUE.

Referenced by SCIPbendersCreate().

◆ SCIPbendersCreate()

SCIP_RETCODE SCIPbendersCreate ( SCIP_BENDERS **  benders,
SCIP_SET set,
SCIP_MESSAGEHDLR messagehdlr,
BMS_BLKMEM blkmem,
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 structure

To use the Benders' decomposition for solving a problem, it first has to be activated with a call to SCIPactivateBenders().

Parameters
benderspointer to Benders' decomposition data structure
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
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 1201 of file benders.c.

References doBendersCreate(), NULL, SCIP_CALL_FINALLY, SCIP_OKAY, and SCIPbendersFree().

Referenced by SCIPincludeBenders(), and SCIPincludeBendersBasic().

◆ releaseVarMappingHashmapVars()

static SCIP_RETCODE releaseVarMappingHashmapVars ( SCIP scip,
SCIP_BENDERS benders 
)
static

releases the variables that have been captured in the hashmap

Parameters
scipthe SCIP data structure
bendersBenders' decomposition

Definition at line 1246 of file benders.c.

References SCIP_Benders::mastervarsmap, NULL, SCIP_CALL, SCIP_OKAY, SCIPhashmapEntryGetImage(), SCIPhashmapGetEntry(), SCIPhashmapGetNEntries(), and SCIPreleaseVar().

Referenced by SCIPbendersFree().

◆ SCIPbendersFree()

SCIP_RETCODE SCIPbendersFree ( SCIP_BENDERS **  benders,
SCIP_SET set 
)

calls destructor and frees memory of Benders' decomposition

Parameters
benderspointer to Benders' decomposition data structure
setglobal SCIP settings

Definition at line 1280 of file benders.c.

References BMSfreeMemory, BMSfreeMemoryArray, BMSfreeMemoryArrayNull, NULL, releaseVarMappingHashmapVars(), SCIP_CALL, SCIP_OKAY, SCIPbenderscutFree(), SCIPclockFree(), and SCIPhashmapFree().

Referenced by SCIPbendersCreate().

◆ addSlackVars()

static SCIP_RETCODE addSlackVars ( SCIP scip,
SCIP_BENDERS benders,
SCIP_CONS cons,
SCIP_CONSHDLR **  linearconshdlrs,
SCIP_CONSHDLR nlconshdlr,
int  nlinearconshdlrs 
)
static
Parameters
scipthe SCIP data structure
bendersBenders' decomposition
consconstraint to which the slack variable(s) is added to
linearconshdlrsan array storing the linear constraint handlers
nlconshdlrpointer to the nonlinear constraint handler
nlinearconshdlrsthe number of linear constraint handlers

Definition at line 1325 of file benders.c.

References FALSE, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VARTYPE_CONTINUOUS, SCIPaddLinearVarNonlinear(), SCIPaddVar(), SCIPconsAddCoef(), SCIPconsGetHdlr(), SCIPconsGetLhs(), SCIPconsGetName(), SCIPconsGetRhs(), SCIPconshdlrGetName(), SCIPcreateVarBasic(), SCIPgetLhsNonlinear(), SCIPgetRhsNonlinear(), SCIPinfinity(), SCIPisInfinity(), SCIPreleaseVar(), SCIPsnprintf(), SCIPwarningMessage(), SLACKVAR_NAME, SCIP_Benders::slackvarcoef, and TRUE.

Referenced by addSlackVarsToConstraints().

◆ addSlackVarsToConstraints()

static SCIP_RETCODE addSlackVarsToConstraints ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber 
)
static

adds the slack variables to each of the constraints for the generation of feasibility cuts for the given non-linear subproblem

Parameters
bendersBenders' decomposition
setglobal SCIP settings
probnumberthe subproblem number

Definition at line 1437 of file benders.c.

References addSlackVars(), NLINEARCONSHDLRS, NULL, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNSubproblems(), SCIPbendersSubproblem(), SCIPfindConshdlr(), SCIPgetNOrigConss(), and SCIPgetOrigConss().

Referenced by createSubproblems().

◆ initialiseSubproblem()

static SCIP_RETCODE initialiseSubproblem ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber,
SCIP_Bool success 
)
static

initialises a MIP subproblem by putting the problem into SCIP_STAGE_SOLVING. This is achieved by calling SCIPsolve and then interrupting the solve in a node focus event handler. The LP subproblem is also initialised using this method; however, a different event handler is added. This event handler will put the LP subproblem into probing mode. The MIP solving function is called to initialise the subproblem because this function calls SCIPsolve with the appropriate parameter settings for Benders' decomposition.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
probnumberthe subproblem number
successwas the initialisation process successful

Definition at line 1483 of file benders.c.

References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_SOLVING, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_TIMELIMIT, SCIPbendersGetNSubproblems(), SCIPbendersSolveSubproblemCIP(), SCIPbendersSubproblem(), SCIPconstructLP(), SCIPgetStage(), and TRUE.

Referenced by initialiseLPSubproblem(), SCIPbendersSetupSubproblem(), and SCIPbendersSolveSubproblem().

◆ initialiseLPSubproblem()

static SCIP_RETCODE initialiseLPSubproblem ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber 
)
static

initialises an LP subproblem by putting the problem into probing mode. The probing mode is invoked in a node focus event handler. This event handler is added just prior to calling the initialise subproblem function.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
probnumberthe subproblem number

Definition at line 1524 of file benders.c.

References initEventhandlerData(), initialiseSubproblem(), NODEFOCUS_EVENTHDLR_DESC, NODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPbendersGetNSubproblems(), SCIPbendersSubproblem(), SCIPincludeEventhdlrBasic(), SCIPsetEventhdlrExit(), SCIPsetEventhdlrExitsol(), SCIPsetEventhdlrFree(), and SCIPsetEventhdlrInitsol().

Referenced by createSubproblems(), and SCIPbendersChgMastervarsToCont().

◆ checkSubproblemConvexity()

static SCIP_RETCODE checkSubproblemConvexity ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber 
)
static

checks whether the convex relaxation of the subproblem is sufficient to solve the original problem to optimality

We check whether we can conclude that the CIP is actually an LP or a convex NLP. To do this, we check that all variables are of continuous type and that every constraint is either handled by known linear constraint handler (knapsack, linear, logicor, setppc, varbound) or the nonlinear constraint handler. In the latter case, we also check whether the nonlinear constraint is convex. Further, nonlinear constraints are only considered if an NLP solver interface is available, i.e., and NLP could be solved. If constraints are present that cannot be identified as linear or convex nonlinear, then we assume that the problem is not convex, thus solving its LP or NLP relaxation will not be sufficient.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
probnumberthe subproblem number, or -1 for the master problem

Definition at line 1572 of file benders.c.

References SCIP_Benders::checkconsconvexity, FALSE, NLINEARCONSHDLRS, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_BENDERSSUBTYPE_NONCONVEXCONT, SCIP_BENDERSSUBTYPE_NONCONVEXDIS, SCIP_Bool, SCIP_CALL, SCIP_EXPRCURV_CONCAVE, SCIP_EXPRCURV_CONVEX, SCIP_OKAY, SCIPABORT, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersGetVar(), SCIPbendersSetMasterIsNonlinear(), SCIPbendersSetSubproblemIsNonlinear(), SCIPbendersSetSubproblemType(), SCIPbendersSubproblem(), SCIPblkmem(), SCIPconsGetHdlr(), SCIPconsGetName(), SCIPdebugMsg, SCIPevalExprActivity(), SCIPfindConshdlr(), SCIPgetCurvatureNonlinear(), SCIPgetExprNonlinear(), SCIPgetLhsNonlinear(), SCIPgetNNlpis(), SCIPgetNOrigConss(), SCIPgetNVars(), SCIPgetOrigConss(), SCIPgetProbName(), SCIPgetRhsNonlinear(), SCIPgetVarsData(), SCIPhasExprCurvature(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), SCIPisInfinity(), SCIPsetDebugMsg, and TRUE.

Referenced by createSubproblems(), and SCIPbendersChgMastervarsToCont().

◆ createSubproblems()

◆ SCIPbendersInit()

◆ createAndAddTransferredCut()

static SCIP_RETCODE createAndAddTransferredCut ( SCIP sourcescip,
SCIP_BENDERS benders,
SCIP_VAR **  vars,
SCIP_Real vals,
SCIP_Real  lhs,
SCIP_Real  rhs,
int  nvars 
)
static

Transfers Benders' cuts that were generated while solving a sub-SCIP to the original SCIP instance. This involves creating a constraint/cut that is equivalent to the generated cut in the sub-SCIP. This new constraint/cut is then added to the original SCIP instance.

Parameters
sourcescipthe source SCIP from when the Benders' decomposition was copied
bendersthe Benders' decomposition structure of the sub SCIP
varsthe variables from the source constraint
valsthe coefficients of the variables in the source constriant
lhsthe LHS of the source constraint
rhsthe RHS of the source constraint
nvarsthe number of variables in the source constraint

Definition at line 2056 of file benders.c.

References SCIP_Benders::cutsasconss, FALSE, SCIP_Benders::mastervarsmap, SCIP_Benders::ntransferred, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddPoolCut(), SCIPaddVarToRow(), SCIPbendersGetName(), SCIPbendersGetNTransferredCuts(), SCIPcreateConsBasicLinear(), SCIPcreateEmptyRowConshdlr(), SCIPfindBenders(), SCIPfindConshdlr(), SCIPhashmapGetImage(), SCIPreleaseCons(), SCIPreleaseRow(), SCIPsetConsRemovable(), SCIPsnprintf(), SCIPvarGetOrigvarSum(), and TRUE.

Referenced by transferBendersCuts().

◆ transferBendersCuts()

static SCIP_RETCODE transferBendersCuts ( SCIP sourcescip,
SCIP subscip,
SCIP_BENDERS benders 
)
static

transfers the cuts generated in a subscip to the source scip

Parameters
sourcescipthe source SCIP from when the Benders' decomposition was copied
subscipthe sub SCIP where the Benders' cuts were generated
bendersthe Benders' decomposition structure of the sub SCIP

Definition at line 2174 of file benders.c.

References createAndAddTransferredCut(), SCIP_Benders::mastervarsmap, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbendersGetName(), SCIPbendersGetNStoredCuts(), SCIPbendersGetStoredCutData(), SCIPfindBenders(), and SCIP_Benders::transfercuts.

Referenced by SCIPbendersExit().

◆ SCIPbendersExit()

◆ checkSubproblemIndependence()

static SCIP_RETCODE checkSubproblemIndependence ( SCIP scip,
SCIP_BENDERS benders 
)
static

Checks whether a subproblem is independent.

Parameters
scipthe SCIP data structure
bendersBenders' decomposition

Definition at line 2307 of file benders.c.

References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNSubproblems(), SCIPbendersSetSubproblemIsIndependent(), SCIPgetBendersSubproblemVar(), SCIPgetVarsData(), and TRUE.

Referenced by SCIPbendersInitpre().

◆ SCIPbendersInitpre()

SCIP_RETCODE SCIPbendersInitpre ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_STAT stat 
)

informs the Benders' decomposition that the presolving process is being started

Parameters
bendersBenders' decomposition
setglobal SCIP settings
statdynamic problem statistics

Definition at line 2363 of file benders.c.

References addAuxiliaryVariablesToMaster(), checkSubproblemIndependence(), SCIP_Benders::iscopy, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Benders::setuptime.

Referenced by SCIPsetExitPlugins().

◆ SCIPbendersExitpre()

SCIP_RETCODE SCIPbendersExitpre ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_STAT stat 
)

informs the Benders' decomposition that the presolving process has completed

Parameters
bendersBenders' decomposition
setglobal SCIP settings
statdynamic problem statistics

Definition at line 2406 of file benders.c.

References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Benders::setuptime.

Referenced by SCIPsetExitPlugins().

◆ SCIPbendersInitsol()

SCIP_RETCODE SCIPbendersInitsol ( SCIP_BENDERS benders,
SCIP_SET set 
)

informs Benders' decomposition that the branch and bound process is being started

Parameters
bendersBenders' decomposition
setglobal SCIP settings

Definition at line 2432 of file benders.c.

References SCIP_Benders::benderscuts, SCIP_Benders::nbenderscuts, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutInitsol(), SCIPbendersSortBenderscuts(), SCIPclockStart(), SCIPclockStop(), and SCIP_Benders::setuptime.

Referenced by SCIPsetInitprePlugins().

◆ SCIPbendersExitsol()

SCIP_RETCODE SCIPbendersExitsol ( SCIP_BENDERS benders,
SCIP_SET set 
)

informs Benders' decomposition that the branch and bound process data is being freed

Parameters
bendersBenders' decomposition
setglobal SCIP settings

Definition at line 2465 of file benders.c.

References SCIP_Benders::benderscuts, FALSE, SCIP_Benders::nbenderscuts, NULL, SCIP_CALL, SCIP_OKAY, SCIPbenderscutExitsol(), SCIPbendersFreeSubproblem(), SCIPbendersGetNSubproblems(), SCIPbendersSetSubproblemIsIndependent(), SCIPbendersSortBenderscuts(), SCIPbendersSubproblemIsIndependent(), SCIPclockStart(), SCIPclockStop(), and SCIP_Benders::setuptime.

Referenced by SCIPsetInitsolPlugins().

◆ SCIPbendersActivate()

◆ SCIPbendersDeactivate()

◆ updateAuxiliaryVarLowerbound()

static SCIP_RETCODE updateAuxiliaryVarLowerbound ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_RESULT result 
)
static

updates the lower bound for all auxiliary variables. This is called if the first LP enforced is unbounded.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
resultthe result from updating the auxiliary variable lower bound

Definition at line 2681 of file benders.c.

References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_REDUCEDDOM, SCIPbendersComputeSubproblemLowerbound(), SCIPbendersGetAuxiliaryVar(), SCIPbendersGetNSubproblems(), SCIPbendersUpdateSubproblemLowerbound(), SCIPchgVarLb(), SCIPsetDebugMsg, SCIPsetIsGT(), SCIPvarGetLbGlobal(), and SCIPvarGetName().

Referenced by SCIPbendersExec().

◆ setAndUpdateCorePoint()

static SCIP_RETCODE setAndUpdateCorePoint ( SCIP scip,
SCIP_BENDERS benders 
)
static

sets the core point used for cut strengthening. If the strenghtenintpoint is set to 'i', then the core point is reinitialised each time the incumbent is updated

Parameters
scipthe SCIP data structure
bendersBenders' decomposition

Definition at line 2738 of file benders.c.

References SCIP_Benders::corepoint, FALSE, SCIP_Benders::initcorepoint, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_MINIMAL, SCIPcomputeLPRelIntPoint(), SCIPcreateLPSol(), SCIPcreateSol(), SCIPcreateSolCopy(), SCIPfreeSol(), SCIPgetBestSol(), SCIPgetRealParam(), SCIPgetSolvingTime(), SCIPgetVarsData(), SCIPisInfinity(), SCIPsetSolVal(), SCIPunlinkSol(), SCIPverbMessage(), SCIP_Benders::strengthenintpoint, and TRUE.

Referenced by performInteriorSolCutStrengthening().

◆ performInteriorSolCutStrengthening()

static SCIP_RETCODE performInteriorSolCutStrengthening ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
SCIP_BENDERSENFOTYPE  type,
SCIP_Bool  checkint,
SCIP_Bool  perturbsol,
SCIP_Bool auxviol,
SCIP_Bool infeasible,
SCIP_Bool skipsolve,
SCIP_RESULT result 
)
static

performs cut strengthening by using an interior solution to generate cuts

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution
typethe type of solution being enforced
checkintare the subproblems called during a check/enforce of integer sols?
perturbsolshould the solution be perturbed to escape infeasibility?
auxviolset to TRUE only if the solution is feasible but the aux vars are violated
infeasibleis the master problem infeasible with respect to the Benders' cuts?
skipsolveshould the main solve be skipped as a result of this strengthening?
resultresult of the pricing process

Definition at line 2824 of file benders.c.

References SCIP_Benders::convexmult, SCIP_Benders::corepoint, FALSE, SCIP_Benders::noimprovecount, SCIP_Benders::noimprovelimit, SCIP_Benders::nstrengthencalls, SCIP_Benders::nstrengthencuts, SCIP_Benders::nstrengthenfails, NULL, SCIP_Benders::perturbeps, SCIP_Benders::prevlowerbound, SCIP_Benders::prevnlpiter, SCIP_Benders::prevnode, SCIP_BENDERSENFOTYPE_LP, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTRUN, SCIP_OKAY, SCIP_Real, SCIP_SEPARATED, SCIP_VARSTATUS_FIXED, SCIPbendersGetNCutsFound(), SCIPcreateLPSol(), SCIPfreeSol(), SCIPgetBendersNSubproblems(), SCIPgetBendersSubproblemVar(), SCIPgetBestSol(), SCIPgetCurrentNode(), SCIPgetLowerbound(), SCIPgetNLPIterations(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPsetDebugMsg, SCIPsetIsGT(), SCIPsetSolVal(), SCIPsolveBendersSubproblems(), SCIPunlinkSol(), SCIPvarGetStatus(), setAndUpdateCorePoint(), and TRUE.

Referenced by SCIPbendersExec().

◆ numSubproblemsToCheck()

static int numSubproblemsToCheck ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_BENDERSENFOTYPE  type 
)
static

returns the number of subproblems that will be checked in this iteration

Parameters
bendersBenders' decomposition
setglobal SCIP settings
typethe type of solution being enforced

Definition at line 2993 of file benders.c.

References SCIP_Benders::ncalls, SCIP_BENDERSENFOTYPE_CHECK, SCIP_Real, SCIPbendersGetNSubproblems(), SCIPbendersOnlyCheckConvexRelax(), SCIPsetCeil(), SCIPsetGetSubscipsOff(), and SCIP_Benders::subprobfrac.

Referenced by createSolveSubproblemIndexList().

◆ subproblemIsActive()

static SCIP_Bool subproblemIsActive ( SCIP_BENDERS benders,
int  probnumber 
)
static

returns whether the solving of the given subproblem needs to be executed

Parameters
bendersBenders' decomposition
probnumberthe subproblem index

Definition at line 3008 of file benders.c.

References SCIPbendersSubproblemIsEnabled(), and SCIPbendersSubproblemIsIndependent().

Referenced by generateBendersCuts(), SCIPbendersExec(), SCIPbendersFreeSubproblem(), SCIPbendersSetSubproblemEnabled(), SCIPbendersSetSubproblemIsIndependent(), and solveBendersSubproblems().

◆ createSolveSubproblemIndexList()

static void createSolveSubproblemIndexList ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_BENDERSENFOTYPE  type,
int **  solveidx,
int *  nsolveidx 
)
static

creates an ordered list of subproblem indices to be solved

Parameters
bendersBenders' decomposition
setglobal SCIP settings
typethe type of solution being enforced
solveidxa list of subproblem indices to the solved in the current iteration
nsolveidxthe number of subproblem indices in the list

Definition at line 3019 of file benders.c.

References SCIP_SubproblemSolveStat::idx, NULL, numSubproblemsToCheck(), SCIPbendersGetNSubproblems(), SCIPpqueueNElems(), SCIPpqueueRemove(), and SCIP_Benders::subprobqueue.

Referenced by SCIPbendersExec().

◆ updateSubproblemStatQueue()

static SCIP_RETCODE updateSubproblemStatQueue ( SCIP_BENDERS benders,
int *  solveidx,
int  nsolveidx,
SCIP_Bool  updatestat 
)
static

updates the subproblem solving statistics and inserts the indices into the queue

Parameters
bendersBenders' decomposition
solveidxthe list of indices of subproblems that were solved
nsolveidxthe number of subproblem indices
updatestatshould the statistics be updated

Definition at line 3059 of file benders.c.

References SCIP_SubproblemSolveStat::avgiter, SCIP_SubproblemSolveStat::idx, SCIP_SubproblemSolveStat::ncalls, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPbendersGetNSubproblems(), SCIPbendersSubproblem(), SCIPgetNLPIterations(), SCIPpqueueInsert(), SCIPpqueueNElems(), SCIP_Benders::solvestat, and SCIP_Benders::subprobqueue.

Referenced by SCIPbendersExec().

◆ solveBendersSubproblems()

static SCIP_RETCODE solveBendersSubproblems ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
SCIP_BENDERSENFOTYPE  type,
SCIP_BENDERSSOLVELOOP  solveloop,
SCIP_Bool  checkint,
int *  nverified,
int *  solveidx,
int  nsolveidx,
SCIP_Bool **  subprobsolved,
SCIP_BENDERSSUBSTATUS **  substatus,
SCIP_Bool infeasible,
SCIP_Bool optimal,
SCIP_Bool stopped 
)
static

Solves each of the Benders' decomposition subproblems for the given solution. All, or a fraction, of subproblems are solved before the Benders' decomposition cuts are generated. Since a convex relaxation of the subproblem could be solved to generate cuts, a parameter nverified is used to identified the number of subproblems that have been solved in their "original" form. For example, if the subproblem is a MIP, then if the LP is solved to generate cuts, this does not constitute a verification. The verification is only performed when the MIP is solved.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution
typethe type of solution being enforced
solveloopthe current solve loop
checkintare the subproblems called during a check/enforce of integer sols?
nverifiedthe number of subproblems verified in the current loop
solveidxthe indices of subproblems to be solved in this loop
nsolveidxthe number of subproblems to be solved in this loop
subprobsolvedan array indicating the subproblems that were solved in this loop.
substatusarray to store the status of the subsystem
infeasibleis the master problem infeasible with respect to the Benders' cuts?
optimalis the current solution optimal?
stoppedwas the solving process stopped?

Definition at line 3108 of file benders.c.

References FALSE, NULL, SCIP_Benders::numthreads, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSSOLVELOOP_CIP, SCIP_BENDERSSOLVELOOP_CONVEX, SCIP_BENDERSSOLVELOOP_USERCIP, SCIP_BENDERSSOLVELOOP_USERCONVEX, SCIP_BENDERSSUBSTATUS_AUXVIOL, SCIP_BENDERSSUBSTATUS_INFEAS, SCIP_BENDERSSUBSTATUS_OPTIMAL, SCIP_BENDERSSUBSTATUS_UNKNOWN, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPbendersExecSubproblemSolve(), SCIPbendersGetAuxiliaryVarVal(), SCIPbendersGetSubproblemLowerbound(), SCIPbendersGetSubproblemObjval(), SCIPbendersGetSubproblemType(), SCIPbendersOnlyCheckConvexRelax(), SCIPbendersSetSubproblemObjval(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsOptimal(), SCIPinfinity(), SCIPisStopped(), SCIPrelDiff(), SCIPsetDebugMsg, SCIPsetGetIntParam(), SCIPsetGetSubscipsOff(), SCIPsetInfinity(), SCIPsetIsInfinity(), SCIP_Benders::solutiontol, subproblemIsActive(), and TRUE.

Referenced by SCIPbendersExec().

◆ generateBendersCuts()

static SCIP_RETCODE generateBendersCuts ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
SCIP_RESULT result,
SCIP_BENDERSENFOTYPE  type,
SCIP_BENDERSSOLVELOOP  solveloop,
SCIP_Bool  checkint,
SCIP_Bool subprobsolved,
SCIP_BENDERSSUBSTATUS substatus,
int *  solveidx,
int  nsolveidx,
int **  mergecands,
int *  npriomergecands,
int *  nmergecands,
int *  nsolveloops 
)
static

Calls the Benders' decompsition cuts for the given solve loop. There are four cases: i) solveloop == SCIP_BENDERSSOLVELOOP_CONVEX - only the LP Benders' cuts are called ii) solveloop == SCIP_BENDERSSOLVELOOP_CIP - only the CIP Benders' cuts are called iii) solveloop == SCIP_BENDERSSOLVELOOP_USERCONVEX - only the LP Benders' cuts are called iv) solveloop == SCIP_BENDERSSOLVELOOP_USERCIP - only the CIP Benders' cuts are called

The priority of the results are: SCIP_CONSADDED (SCIP_SEPARATED), SCIP_DIDNOTFIND, SCIP_FEASIBLE, SCIP_DIDNOTRUN. In this function, there are four levels of results that need to be assessed. These are: i) The result from the individual cut for the subproblem ii) The overall result for the subproblem from all cuts iii) the overall result for the solve loop from all cuts iv) the over all result from all solve loops. In each level, the priority of results must be adhered to.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution
resultresult of the pricing process
typethe type of solution being enforced
solveloopthe current solve loop
checkintare the subproblems called during a check/enforce of integer sols?
subprobsolvedan array indicating the subproblems that were solved in this loop.
substatusarray to store the status of the subsystem
solveidxthe indices of subproblems to be solved in this loop
nsolveidxthe number of subproblems to be solved in this loop
mergecandsthe subproblems that are merge candidates
npriomergecandsthe number of priority merge candidates.
nmergecandsthe number of merge candidates.
nsolveloopsthe number of solve loops, is updated w.r.t added cuts

Definition at line 3379 of file benders.c.

References SCIP_Benders::cutcheck, SCIP_Benders::ncutsfound, NULL, SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSSOLVELOOP_CIP, SCIP_BENDERSSOLVELOOP_CONVEX, SCIP_BENDERSSOLVELOOP_USERCIP, SCIP_BENDERSSOLVELOOP_USERCONVEX, SCIP_BENDERSSUBSTATUS_INFEAS, SCIP_BENDERSSUBSTATUS_OPTIMAL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FEASIBLE, SCIP_Longint, SCIP_OKAY, SCIP_SEPARATED, SCIP_STAGE_PRESOLVED, SCIP_STAGE_SOLVED, SCIP_STAGE_TRANSFORMED, SCIPbenderscutExec(), SCIPbenderscutGetNFound(), SCIPbenderscutIsLPCut(), SCIPbendersGetBenderscuts(), SCIPbendersGetNBenderscuts(), SCIPbendersGetNConvexSubproblems(), SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersOnlyCheckConvexRelax(), SCIPsetGetStage(), SCIPsetGetSubscipsOff(), SCIP_Benders::strengthenround, and subproblemIsActive().

Referenced by SCIPbendersExec().

◆ SCIPbendersExec()

SCIP_RETCODE SCIPbendersExec ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
SCIP_RESULT result,
SCIP_Bool infeasible,
SCIP_Bool auxviol,
SCIP_BENDERSENFOTYPE  type,
SCIP_Bool  checkint 
)

Solves the subproblem using the current master problem solution.

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.

TODO: consider allowing the possibility to pass solution information back from the subproblems instead of the scip instance. This would allow the use of different solvers for the subproblems, more importantly allowing the use of an LP solver for LP subproblems.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution
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 3577 of file benders.c.

References BENDERS_MAXPSEUDOSOLS, SCIP_Benders::bendersclock, createSolveSubproblemIndexList(), FALSE, SCIP_Benders::feasibilityphase, generateBendersCuts(), SCIP_Benders::iscopy, SCIP_Benders::lnscheck, SCIP_Benders::lnsmaxcalls, SCIP_Benders::lnsmaxcallsroot, SCIP_Benders::lnsmaxdepth, SCIP_Benders::maxslackvarcoef, SCIP_Benders::name, SCIP_Benders::ncalls, SCIP_Benders::npseudosols, NULL, performInteriorSolCutStrengthening(), resetSubproblemObjectiveValue(), SCIP_BENDERSENFOTYPE_CHECK, SCIP_BENDERSENFOTYPE_LP, SCIP_BENDERSENFOTYPE_PSEUDO, SCIP_BENDERSSOLVELOOP_USERCIP, SCIP_BENDERSSOLVELOOP_USERCONVEX, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_INVALIDRESULT, SCIP_LPSOLSTAT_UNBOUNDEDRAY, SCIP_OKAY, SCIP_SEPARATED, SCIP_SOLVELP, SCIP_STAGE_TRANSFORMED, SCIP_VERBLEVEL_HIGH, SCIPallocClearBlockMemoryArray, SCIPbendersFreeSubproblem(), SCIPbendersGetName(), SCIPbendersGetNCalls(), SCIPbendersGetNConvexSubproblems(), SCIPbendersGetNSubproblems(), SCIPbendersOnlyCheckConvexRelax(), SCIPbendersSolSlackVarsActive(), SCIPbendersSubproblem(), SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPfreeBlockMemoryArray, SCIPgetDepth(), SCIPgetLPSolstat(), SCIPgetMessagehdlr(), SCIPgetObjsense(), SCIPgetPrimalbound(), SCIPgetSolOrigObj(), SCIPgetStage(), SCIPinProbing(), SCIPmessagePrintVerbInfo(), SCIPprintSol(), SCIPsetDebugMsg, SCIPsetGetSubscipsOff(), SCIPsetIsLE(), SCIPsolveBendersSubproblems(), SCIPverbMessage(), SCIP_Benders::slackvarcoef, solveBendersSubproblems(), SCIP_Benders::sourcescip, SCIP_Benders::strengthenenabled, SCIP_Benders::strengthenround, subproblemIsActive(), TRUE, updateAuxiliaryVarLowerbound(), SCIP_Benders::updateauxvarbound, and updateSubproblemStatQueue().

Referenced by SCIPsolveBendersSubproblems().

◆ executeUserDefinedSolvesub()

static SCIP_RETCODE executeUserDefinedSolvesub ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
int  probnumber,
SCIP_BENDERSSOLVELOOP  solveloop,
SCIP_Bool infeasible,
SCIP_Real objective,
SCIP_RESULT result 
)
static

solves the user-defined subproblem solving function

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution
probnumberthe subproblem number
solveloopthe solve loop iteration. The first iter is for LP, the second for IP
infeasiblereturns whether the current subproblem is infeasible
objectivethe objective function value of the subproblem
resultthe result from solving the subproblem

Definition at line 4114 of file benders.c.

References SCIP_Benders::name, NULL, SCIP_BENDERSSOLVELOOP_USERCIP, SCIP_BENDERSSOLVELOOP_USERCONVEX, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_UNBOUNDED, SCIPbendersOnlyCheckConvexRelax(), SCIPerrorMessage, SCIPsetGetSubscipsOff(), SCIPsetInfinity(), SCIPsetIsInfinity(), and TRUE.

Referenced by SCIPbendersExecSubproblemSolve(), and SCIPbendersSolveSubproblem().

◆ SCIPbendersExecSubproblemSolve()

SCIP_RETCODE SCIPbendersExecSubproblemSolve ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
int  probnumber,
SCIP_BENDERSSOLVELOOP  solveloop,
SCIP_Bool  enhancement,
SCIP_Bool solved,
SCIP_Bool infeasible,
SCIP_BENDERSENFOTYPE  type 
)

executes the subproblem solving process

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution
probnumberthe subproblem number
solveloopthe solve loop iteration. The first iter is for LP, the second for IP
enhancementis the solve performed as part of and enhancement?
solvedflag to indicate whether the subproblem was solved
infeasiblereturns whether the current subproblem is infeasible
typethe enforcement type calling this function

Definition at line 4185 of file benders.c.

References executeUserDefinedSolvesub(), FALSE, SCIP_Benders::name, NULL, SCIP_BENDERSSOLVELOOP_CIP, SCIP_BENDERSSOLVELOOP_CONVEX, SCIP_BENDERSSOLVELOOP_USERCIP, SCIP_BENDERSSOLVELOOP_USERCONVEX, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_ERROR, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIP_UNBOUNDED, SCIP_VERBLEVEL_FULL, SCIPABORT, SCIPbendersGetAuxiliaryVarVal(), SCIPbendersGetSubproblemType(), SCIPbendersSetSubproblemObjval(), SCIPbendersSetupSubproblem(), SCIPbendersSolveSubproblemCIP(), SCIPbendersSolveSubproblemLP(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsSetup(), SCIPerrorMessage, SCIPgetBestSol(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPsetDebugMsg, SCIPsetInfinity(), SCIPverbMessage(), TRUE, and updateEventhdlrUpperbound().

Referenced by solveBendersSubproblems().

◆ SCIPbendersSetupSubproblem()

◆ SCIPbendersSolveSubproblem()

SCIP_RETCODE SCIPbendersSolveSubproblem ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
int  probnumber,
SCIP_Bool infeasible,
SCIP_Bool  solvecip,
SCIP_Real objective 
)

Solve a Benders' decomposition subproblems. This will either call the user defined method or the generic solving methods. If the generic method is called, then the subproblem must be set up before calling this method.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
solprimal CIP solution, can be NULL
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 4505 of file benders.c.

References executeUserDefinedSolvesub(), FALSE, initialiseSubproblem(), NULL, SCIP_BENDERSSOLVELOOP_USERCIP, SCIP_BENDERSSOLVELOOP_USERCONVEX, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIP_STATUS_INFEASIBLE, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSolveSubproblemCIP(), SCIPbendersSolveSubproblemLP(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsIndependent(), SCIPbendersSubproblemIsSetup(), SCIPerrorMessage, SCIPgetBestSol(), SCIPgetObjsense(), SCIPgetSolOrigObj(), SCIPinfinity(), SCIPinProbing(), SCIPstartProbing(), and TRUE.

Referenced by SCIPsolveBendersSubproblem().

◆ copyMemoryAndTimeLimits()

static SCIP_RETCODE copyMemoryAndTimeLimits ( SCIP scip,
SCIP subproblem 
)
static

copies the time and memory limit from the master problem to the subproblem

Parameters
scipthe SCIP data structure
subproblemthe Benders' decomposition subproblem

Definition at line 4613 of file benders.c.

References MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPgetMemExternEstim(), SCIPgetMemUsed(), SCIPgetParam(), SCIPgetRealParam(), SCIPgetSolvingTime(), SCIPparamGetRealMax(), and SCIPsetRealParam().

Referenced by SCIPbendersComputeSubproblemLowerbound(), and setSubproblemParams().

◆ storeOrigSubproblemParams()

◆ setSubproblemParams()

static SCIP_RETCODE setSubproblemParams ( SCIP scip,
SCIP subproblem 
)
static

sets the parameters for the subproblem

Parameters
scipthe SCIP data structure
subproblemthe subproblem SCIP instance

Definition at line 4673 of file benders.c.

References copyMemoryAndTimeLimits(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PARAMSETTING_OFF, SCIP_VERBLEVEL_NONE, SCIPsetBoolParam(), SCIPsetCharParam(), SCIPsetHeuristics(), SCIPsetIntParam(), SCIPsetPresolving(), and TRUE.

Referenced by SCIPbendersSolveSubproblemCIP(), and SCIPbendersSolveSubproblemLP().

◆ resetOrigSubproblemParams()

◆ SCIPbendersFreeSubproblem()

SCIP_RETCODE SCIPbendersFreeSubproblem ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber 
)

◆ SCIPbendersSubproblemIsOptimal()

SCIP_Bool SCIPbendersSubproblemIsOptimal ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
int  probnumber 
)

compares the subproblem objective value with the auxiliary variable value for optimality

Parameters
bendersthe benders' decomposition structure
setglobal SCIP settings
solprimal CIP solution
probnumberthe subproblem number

Definition at line 5058 of file benders.c.

References FALSE, NULL, SCIP_Bool, SCIP_Real, SCIPbendersGetAuxiliaryVarVal(), SCIPbendersGetSubproblemObjval(), SCIPrelDiff(), SCIPsetDebugMsg, SCIP_Benders::solutiontol, and TRUE.

Referenced by SCIPcheckBendersSubproblemOptimality(), and solveBendersSubproblems().

◆ SCIPbendersGetAuxiliaryVarVal()

SCIP_Real SCIPbendersGetAuxiliaryVarVal ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_SOL sol,
int  probnumber 
)

returns the value of the auxiliary variable value in a master problem solution

Parameters
bendersthe benders' decomposition structure
setglobal SCIP settings
solprimal CIP solution
probnumberthe subproblem number

Definition at line 5087 of file benders.c.

References NULL, SCIPbendersGetAuxiliaryVar(), and SCIPgetSolVal().

Referenced by SCIPbendersExecSubproblemSolve(), SCIPbendersSubproblemIsOptimal(), SCIPgetBendersAuxiliaryVarVal(), and solveBendersSubproblems().

◆ SCIPbendersComputeSubproblemLowerbound()

SCIP_RETCODE SCIPbendersComputeSubproblemLowerbound ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber,
SCIP_Real lowerbound,
SCIP_Bool infeasible 
)

Solves an independent subproblem to identify its lower bound. The lower bound is then used to update the bound on the auxiliary variable.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
probnumberthe subproblem to be evaluated
lowerboundthe lowerbound for the subproblem
infeasiblewas the subproblem found to be infeasible?

Definition at line 5108 of file benders.c.

References copyMemoryAndTimeLimits(), FALSE, MIPNODEFOCUS_EVENTHDLR_NAME, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_OPTIMAL, SCIP_NLPSOLSTAT_FEASIBLE, SCIP_NLPSOLSTAT_GLOBINFEASIBLE, SCIP_NLPSOLSTAT_GLOBOPT, SCIP_NLPSOLSTAT_LOCINFEASIBLE, SCIP_NLPSOLSTAT_LOCOPT, SCIP_NLPTERMSTAT_OKAY, SCIP_OKAY, SCIP_Real, SCIP_STATUS_INFEASIBLE, SCIP_VERBLEVEL_FULL, SCIP_VERBLEVEL_HIGH, SCIP_VERBLEVEL_NONE, SCIPbendersFreeSubproblem(), SCIPbendersGetAuxiliaryVar(), SCIPbendersGetSubproblemType(), SCIPbendersSubproblem(), SCIPbendersSubproblemIsIndependent(), SCIPdebugMsg, SCIPeventhdlrGetData(), SCIPfindEventhdlr(), SCIPgetDualbound(), SCIPgetIntParam(), SCIPgetLongintParam(), SCIPgetLPSolstat(), SCIPgetNLPObjval(), SCIPgetNLPSolstat(), SCIPgetNLPTermstat(), SCIPgetNNlpis(), SCIPgetObjsense(), SCIPgetRealParam(), SCIPgetSolOrigObj(), SCIPgetStatus(), SCIPinfinity(), SCIPinfoMessage(), SCIPisLPConstructed(), SCIPisNLPConstructed(), SCIPretransformObj(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetRealParam(), SCIPsolve(), SCIPsolveNLP, SCIPsolveProbingLP(), SCIPstartProbing(), SCIPvarGetLbGlobal(), SCIPverbMessage(), and TRUE.

Referenced by SCIPcomputeBendersSubproblemLowerbound(), and updateAuxiliaryVarLowerbound().

◆ SCIPbendersMergeSubproblemIntoMaster()

SCIP_RETCODE SCIPbendersMergeSubproblemIntoMaster ( SCIP_BENDERS benders,
SCIP_SET set,
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.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
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 5271 of file benders.c.

References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIP_VERBLEVEL_HIGH, SCIPaddCoefLinear(), SCIPaddCons(), SCIPaddVar(), SCIPbendersFreeSubproblem(), SCIPbendersGetAuxiliaryVar(), SCIPbendersSetSubproblemEnabled(), SCIPbendersSubproblem(), SCIPblkmem(), SCIPconsGetHdlr(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPcreateConsBasicLinear(), SCIPcreateVarBasic(), SCIPgetBendersMasterVar(), SCIPgetConsCopy(), SCIPgetConss(), SCIPgetNConss(), SCIPgetNVars(), SCIPgetVars(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPsetConsRemovable(), SCIPsetInfinity(), SCIPsnprintf(), SCIPvarGetLbOriginal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetOrigvarSum(), SCIPvarGetType(), SCIPvarGetUbOriginal(), SCIPverbMessage(), and TRUE.

Referenced by SCIPmergeBendersSubproblemIntoMaster().

◆ addConstraintToBendersSubproblem()

static SCIP_RETCODE addConstraintToBendersSubproblem ( SCIP_SET set,
SCIP subproblem,
SCIP_HASHMAP varmap,
SCIP_CONS sourcecons 
)
static

when applying a decomposition from a supplied format, constraints must be transferred from the master problem to the subproblem. This is achieved by adding new constraints to the subproblem

Parameters
setglobal SCIP settings
subproblemthe SCIP instance for the subproblem
varmapthe variable hash map mapping the source variables to the target variables
sourceconsthe constraint that being added to the subproblem

Definition at line 5456 of file benders.c.

References NULL, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIPaddCons(), SCIPaddVar(), SCIPallocBufferArray, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsMarkedPropagate(), SCIPconsIsModifiable(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateVar(), SCIPdebugMessage, SCIPerrorMessage, SCIPfreeBufferArray, SCIPgetConsCopy(), SCIPgetConsNVars(), SCIPgetConsVars(), SCIPhashmapExists(), SCIPhashmapInsert(), SCIPreleaseCons(), SCIPreleaseVar(), SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetType(), SCIPvarGetUbGlobal(), SCIPvarIsInitial(), SCIPvarIsRemovable(), and TRUE.

Referenced by SCIPbendersApplyDecomposition().

◆ removeVariablesAndConstraintsFromMaster()

static SCIP_RETCODE removeVariablesAndConstraintsFromMaster ( SCIP scip,
SCIP_CONS **  conss,
SCIP_VAR **  vars,
int *  conslabels,
int *  varslabels,
int  nconss,
int  nvars 
)
static

removes the variables and constraints from the master problem that have been transferred to a subproblem when the decomposition was applied.

Parameters
scipthe SCIP data structure
conssthe master problem constraints
varsthe master problem variables, can be NULL
conslabelsthe labels indicating the block for each constraint
varslabelsthe labels indicating the block for each variable, can be NULL
nconssthe number of constraints
nvarsthe number of variables

Definition at line 5540 of file benders.c.

References NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_PROBLEM, SCIPconsIsDeleted(), SCIPdelCons(), SCIPdelVar(), SCIPgetStage(), and SCIPvarIsDeleted().

Referenced by SCIPbendersApplyDecomposition().

◆ SCIPbendersApplyDecomposition()

◆ SCIPbendersGetVar()

SCIP_RETCODE SCIPbendersGetVar ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_VAR var,
SCIP_VAR **  mappedvar,
int  probnumber 
)

Returns the corresponding master or subproblem variable for the given variable. This provides a call back for the variable mapping between the master and subproblems.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
varthe variable for which the corresponding variable is desired
mappedvarthe variable that is mapped to var
probnumberthe problem number for the desired variable, -1 for the master problem

Definition at line 5703 of file benders.c.

References AUXILIARYVAR_NAME, NULL, SCIP_CALL, SCIP_OKAY, and SCIPvarGetName().

Referenced by checkSubproblemConvexity(), createSubproblems(), SCIPbendersChgMastervarsToCont(), SCIPbendersSetupSubproblem(), SCIPgetBendersMasterVar(), and SCIPgetBendersSubproblemVar().

◆ SCIPbendersSetCopy()

void SCIPbendersSetCopy ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSCOPY((*benderscopy))   
)

sets copy callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5750 of file benders.c.

References NULL.

Referenced by SCIPsetBendersCopy().

◆ SCIPbendersSetFree()

void SCIPbendersSetFree ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSFREE((*bendersfree))   
)

sets destructor callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5761 of file benders.c.

References NULL.

Referenced by SCIPsetBendersFree().

◆ SCIPbendersSetInit()

void SCIPbendersSetInit ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSINIT((*bendersinit))   
)

sets initialization callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5772 of file benders.c.

References NULL.

Referenced by SCIPsetBendersInit().

◆ SCIPbendersSetExit()

void SCIPbendersSetExit ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSEXIT((*bendersexit))   
)

sets deinitialization callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5783 of file benders.c.

References NULL.

Referenced by SCIPsetBendersExit().

◆ SCIPbendersSetInitpre()

void SCIPbendersSetInitpre ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSINITPRE((*bendersinitpre))   
)

sets presolving initialization callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5794 of file benders.c.

References NULL.

Referenced by SCIPsetBendersInitpre().

◆ SCIPbendersSetExitpre()

void SCIPbendersSetExitpre ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSEXITPRE((*bendersexitpre))   
)

sets presolving deinitialization callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5805 of file benders.c.

References NULL.

Referenced by SCIPsetBendersExitpre().

◆ SCIPbendersSetInitsol()

void SCIPbendersSetInitsol ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSINITSOL((*bendersinitsol))   
)

sets solving process initialization callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5816 of file benders.c.

References NULL.

Referenced by SCIPsetBendersInitsol().

◆ SCIPbendersSetExitsol()

void SCIPbendersSetExitsol ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSEXITSOL((*bendersexitsol))   
)

sets solving process deinitialization callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5827 of file benders.c.

References NULL.

Referenced by SCIPsetBendersExitsol().

◆ SCIPbendersSetPresubsolve()

void SCIPbendersSetPresubsolve ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSPRESUBSOLVE((*benderspresubsolve))   
)

sets the pre subproblem solve callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5838 of file benders.c.

References NULL.

Referenced by SCIPsetBendersPresubsolve().

◆ SCIPbendersSetSolvesubconvex()

void SCIPbendersSetSolvesubconvex ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSSOLVESUBCONVEX((*benderssolvesubconvex))   
)

sets convex solve callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5849 of file benders.c.

References NULL.

Referenced by SCIPsetBendersSolveAndFreesub().

◆ SCIPbendersSetSolvesub()

void SCIPbendersSetSolvesub ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSSOLVESUB((*benderssolvesub))   
)

sets solve callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5860 of file benders.c.

References NULL.

Referenced by SCIPsetBendersSolveAndFreesub().

◆ SCIPbendersSetPostsolve()

void SCIPbendersSetPostsolve ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSPOSTSOLVE((*benderspostsolve))   
)

sets post-solve callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5871 of file benders.c.

References NULL.

Referenced by SCIPsetBendersPostsolve().

◆ SCIPbendersSetSubproblemComp()

void SCIPbendersSetSubproblemComp ( SCIP_BENDERS benders,
SCIP_DECL_SORTPTRCOMP((*benderssubcomp))   
)

sets post-solve callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5882 of file benders.c.

References NULL.

Referenced by SCIPsetBendersSubproblemComp().

◆ SCIPbendersSetFreesub()

void SCIPbendersSetFreesub ( SCIP_BENDERS benders,
SCIP_DECL_BENDERSFREESUB((*bendersfreesub))   
)

sets free subproblem callback of Benders' decomposition

Parameters
bendersBenders' decomposition

Definition at line 5893 of file benders.c.

References NULL.

Referenced by SCIPsetBendersSolveAndFreesub().

◆ SCIPbendersSetPriority()

void SCIPbendersSetPriority ( SCIP_BENDERS benders,
SCIP_SET set,
int  priority 
)

sets priority of Benders' decomposition

Parameters
bendersBenders' decomposition
setglobal SCIP settings
prioritynew priority of the Benders' decomposition

Definition at line 5934 of file benders.c.

References FALSE, NULL, and SCIP_Benders::priority.

Referenced by SCIPsetBendersPriority().

◆ SCIPbendersEnableOrDisableClocks()

void SCIPbendersEnableOrDisableClocks ( SCIP_BENDERS benders,
SCIP_Bool  enable 
)

enables or disables all clocks of the Benders' decomposition, depending on the value of the flag

Parameters
bendersthe Benders' decomposition for which all clocks should be enabled or disabled
enableshould the clocks of the Benders' decomposition be enabled?

Definition at line 6040 of file benders.c.

References SCIP_Benders::bendersclock, NULL, SCIPclockEnableOrDisable(), and SCIP_Benders::setuptime.

◆ SCIPbendersAddSubproblem()

SCIP_RETCODE SCIPbendersAddSubproblem ( SCIP_BENDERS benders,
SCIP subproblem 
)

adds a subproblem to the Benders' decomposition data. If a custom subproblem solving method is used, then the subproblem pointer can be set to NULL

Parameters
bendersBenders' decomposition
subproblemsubproblem to be added to the data storage, can be NULL

Definition at line 6104 of file benders.c.

References SCIP_Benders::naddedsubprobs, SCIP_Benders::name, SCIP_Benders::nsubproblems, NULL, SCIP_ERROR, SCIP_OKAY, SCIPerrorMessage, and SCIP_Benders::subproblems.

Referenced by SCIPaddBendersSubproblem().

◆ SCIPbendersRemoveSubproblems()

void SCIPbendersRemoveSubproblems ( SCIP_BENDERS benders)

removes the subproblems from the Benders' decomposition data

Parameters
bendersBenders' decomposition

Definition at line 6128 of file benders.c.

References BMSclearMemoryArray, SCIP_Benders::naddedsubprobs, NULL, and SCIP_Benders::subproblems.

◆ SCIPbendersChgMastervarsToCont()

SCIP_RETCODE SCIPbendersChgMastervarsToCont ( SCIP_BENDERS benders,
SCIP_SET set,
int  probnumber 
)

changes all of the master problem variables in the given subproblem to continuous.

Parameters
bendersBenders' decomposition
setglobal SCIP settings
probnumberthe subproblem number

Definition at line 6437 of file benders.c.

References checkSubproblemConvexity(), initialiseLPSubproblem(), NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_VARTYPE_CONTINUOUS, SCIPbendersGetMastervarsCont(), SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersGetVar(), SCIPbendersSetMastervarsCont(), SCIPbendersSubproblem(), SCIPchgVarType(), SCIPgetVarsData(), SCIPvarGetType(), and TRUE.

Referenced by createSubproblems(), and SCIPbendersSetupSubproblem().

◆ SCIPbendersSetSubproblemEnabled()

void SCIPbendersSetSubproblemEnabled ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Bool  enabled 
)

Sets whether the subproblem is enabled or disabled. A subproblem is disabled if it has been merged into the master problem.

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
enabledflag to indicate whether the subproblem is enabled

Definition at line 6596 of file benders.c.

References SCIP_Benders::nactivesubprobs, NULL, SCIP_Bool, SCIPbendersGetNSubproblems(), SCIP_Benders::subprobenabled, and subproblemIsActive().

Referenced by SCIPbendersMergeSubproblemIntoMaster().

◆ SCIPbendersSetMastervarsCont()

SCIP_RETCODE SCIPbendersSetMastervarsCont ( SCIP_BENDERS benders,
int  probnumber,
SCIP_Bool  arecont 
)

sets a flag to indicate whether the master variables are all set to continuous

Parameters
bendersBenders' decomposition
probnumberthe subproblem number
arecontflag to indicate whether the master problem variables are continuous

Definition at line 6634 of file benders.c.

References SCIP_Benders::mastervarscont, NULL, SCIP_BENDERSSUBTYPE_CONVEXCONT, SCIP_BENDERSSUBTYPE_CONVEXDIS, SCIP_BENDERSSUBTYPE_NONCONVEXCONT, SCIP_BENDERSSUBTYPE_NONCONVEXDIS, SCIP_CALL, SCIP_OKAY, SCIPbendersGetNSubproblems(), SCIPbendersGetSubproblemType(), SCIPbendersSetSubproblemType(), SCIPbendersSubproblem(), SCIPendProbing(), and SCIPinProbing().

Referenced by SCIPbendersChgMastervarsToCont().

◆ SCIPbendersGetMastervarsCont()

SCIP_Bool SCIPbendersGetMastervarsCont ( SCIP_BENDERS benders,
int  probnumber 
)

returns whether the master variables are all set to continuous

Parameters
bendersBenders' decomposition
probnumberthe subproblem number

Definition at line 6669 of file benders.c.

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

Referenced by SCIPbendersChgMastervarsToCont().

◆ SCIPbendersStoreCut()

SCIP_RETCODE SCIPbendersStoreCut ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_VAR **  vars,
SCIP_Real vals,
SCIP_Real  lhs,
SCIP_Real  rhs,
int  nvars 
)

adds the data for the generated cuts to the Benders' cut storage

Parameters
bendersBenders' decomposition cut
setglobal SCIP settings
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 6813 of file benders.c.

References BMSreallocBlockMemoryArray, SCIP_BenderscutCut::lhs, SCIP_Benders::nstoredcuts, NULL, SCIP_BenderscutCut::nvars, SCIP_BenderscutCut::rhs, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPblkmem(), SCIPduplicateBlockMemoryArray, SCIPsetCalcMemGrowSize(), SCIP_Benders::storedcuts, SCIP_Benders::storedcutssize, SCIP_BenderscutCut::vals, and SCIP_BenderscutCut::vars.

Referenced by SCIPstoreBendersCut().

◆ SCIPbendersSetBenderscutsSorted()

void SCIPbendersSetBenderscutsSorted ( SCIP_BENDERS benders,
SCIP_Bool  sorted 
)

sets the sorted flags in the Benders' decomposition

Parameters
bendersBenders' decomposition structure
sortedthe value to set the sorted flag to

Definition at line 6861 of file benders.c.

References SCIP_Benders::benderscutsnamessorted, SCIP_Benders::benderscutssorted, and NULL.

Referenced by SCIPsetBenderscutPriority().

◆ SCIPbendersIncludeBenderscut()

SCIP_RETCODE SCIPbendersIncludeBenderscut ( SCIP_BENDERS benders,
SCIP_SET set,
SCIP_BENDERSCUT benderscut 
)

inserts a Benders' cut into the Benders' cuts list

Parameters
bendersBenders' decomposition structure
setglobal SCIP settings
benderscutBenders' cut

Definition at line 6873 of file benders.c.

References SCIP_Benders::benderscuts, SCIP_Benders::benderscutssize, SCIP_Benders::benderscutssorted, BMSreallocMemoryArray, FALSE, SCIP_Benders::nbenderscuts, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPsetCalcMemGrowSize().

Referenced by SCIPincludeBenderscut(), and SCIPincludeBenderscutBasic().

◆ SCIPbendersSortBenderscuts()

void SCIPbendersSortBenderscuts ( SCIP_BENDERS benders)

sorts Benders' decomposition cuts by priorities

Parameters
bendersBenders' decomposition

Definition at line 6962 of file benders.c.

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

Referenced by SCIPbendersCopyInclude(), SCIPbendersExit(), SCIPbendersExitsol(), SCIPbendersInit(), and SCIPbendersInitsol().

◆ SCIPbendersSortBenderscutsName()

void SCIPbendersSortBenderscutsName ( SCIP_BENDERS benders)

sorts Benders' decomposition cuts by name

Parameters
bendersBenders' decomposition

Definition at line 6977 of file benders.c.

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