Scippy

SCIP

Solving Constraint Integer Programs

cons_cumulative.h File Reference

Detailed Description

constraint handler for cumulative constraints

Author
Timo Berthold
Stefan Heinz
Jens Schulz

Given:

  • a set of jobs, represented by their integer start time variables $S_j$, their array of processing times $p_j$ and of their demands $d_j$.
  • an integer resource capacity $C$

The cumulative constraint ensures that for each point in time $t$ $\sum_{j: S_j \leq t < S_j + p_j} d_j \leq C$ holds.

Separation:
  • can be done using binary start time model, see Pritskers, Watters and Wolfe
  • or by just separating relatively weak cuts on the start time variables
Propagation:
  • time tabling, Klein & Scholl (1999)
  • Edge-finding from Petr Vilim, adjusted and simplified for dynamic repropagation (2009)
  • energetic reasoning, see Baptiste, Le Pape, Nuijten (2001)

Definition in file cons_cumulative.h.

#include "scip/scip.h"

Go to the source code of this file.

Macros

#define SCIP_DECL_SOLVECUMULATIVE(x)
 

Functions

SCIP_RETCODE SCIPincludeConshdlrCumulative (SCIP *scip)
 
SCIP_RETCODE SCIPcreateConsCumulative (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
 
SCIP_RETCODE SCIPcreateConsBasicCumulative (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity)
 
SCIP_RETCODE SCIPsetHminCumulative (SCIP *scip, SCIP_CONS *cons, int hmin)
 
int SCIPgetHminCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_RETCODE SCIPsetHmaxCumulative (SCIP *scip, SCIP_CONS *cons, int hmax)
 
int SCIPgetHmaxCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_VAR ** SCIPgetVarsCumulative (SCIP *scip, SCIP_CONS *cons)
 
int SCIPgetNVarsCumulative (SCIP *scip, SCIP_CONS *cons)
 
int SCIPgetCapacityCumulative (SCIP *scip, SCIP_CONS *cons)
 
int * SCIPgetDurationsCumulative (SCIP *scip, SCIP_CONS *cons)
 
int * SCIPgetDemandsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_RETCODE SCIPcheckCumulativeCondition (SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool *violated, SCIP_CONS *cons, SCIP_Bool printreason)
 
SCIP_RETCODE SCIPnormalizeCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int *capacity, int *nchgcoefs, int *nchgsides)
 
SCIP_RETCODE SCIPsplitCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int *hmin, int *hmax, int *split)
 
SCIP_RETCODE SCIPpresolveCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int hmin, int hmax, SCIP_Bool *downlocks, SCIP_Bool *uplocks, SCIP_CONS *cons, SCIP_Bool *delvars, int *nfixedvars, int *nchgsides, SCIP_Bool *cutoff)
 
SCIP_RETCODE SCIPpropCumulativeCondition (SCIP *scip, SCIP_PRESOLTIMING presoltiming, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_CONS *cons, int *nchgbds, SCIP_Bool *initialized, SCIP_Bool *explanation, SCIP_Bool *cutoff)
 
SCIP_RETCODE SCIPrespropCumulativeCondition (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_Real relaxedbd, SCIP_Bool *explanation, SCIP_RESULT *result)
 
SCIP_RETCODE SCIPvisualizeConsCumulative (SCIP *scip, SCIP_CONS *cons)
 
SCIP_RETCODE SCIPsetSolveCumulative (SCIP *scip, SCIP_DECL_SOLVECUMULATIVE((*solveCumulative)))
 
SCIP_RETCODE SCIPsolveCumulative (SCIP *scip, int njobs, SCIP_Real *ests, SCIP_Real *lsts, SCIP_Real *objvals, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Real timelimit, SCIP_Real memorylimit, SCIP_Longint maxnodes, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_Bool *unbounded, SCIP_Bool *error)
 
SCIP_RETCODE SCIPcreateWorstCaseProfile (SCIP *scip, SCIP_PROFILE *profile, int nvars, SCIP_VAR **vars, int *durations, int *demands)
 
int SCIPcomputeHmin (SCIP *scip, SCIP_PROFILE *profile, int capacity)
 
int SCIPcomputeHmax (SCIP *scip, SCIP_PROFILE *profile, int capacity)
 

Macro Definition Documentation

#define SCIP_DECL_SOLVECUMULATIVE (   x)
Value:
SCIP_RETCODE x (int njobs, SCIP_Real* ests, SCIP_Real* lsts, SCIP_Real* objvals, \
int* durations, int* demands, int capacity, int hmin, int hmax, \
SCIP_Real timelimit, SCIP_Real memorylimit, SCIP_Longint maxnodes, \
SCIP_Bool* solved, SCIP_Bool* infeasible, SCIP_Bool* unbounded, SCIP_Bool* error)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
#define SCIP_Bool
Definition: def.h:53
#define SCIP_Real
Definition: def.h:127
#define SCIP_Longint
Definition: def.h:112

solves given cumulative condition as independent sub problem

Note
The time and memory limit should be respected.
If the problem was solved to the earliest start times (ests) and latest start times (lsts) array contain the solution values; If the problem was not solved these two arrays contain the global bounds at the time the sub solver was interrupted.

input:

  • njobs : number of jobs (activities)
  • objvals : array of objective coefficients for each job (linear objective function), or NULL if none
  • durations : array of durations
  • demands : array of demands
  • capacity : cumulative capacity
  • hmin : left bound of time axis to be considered (including hmin)
  • hmax : right bound of time axis to be considered (not including hmax)
  • timelimit : time limit for solving in seconds
  • memorylimit : memory limit for solving in mega bytes (MB)
  • maxnodes : maximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit)

input/output:

  • ests : array of earliest start times for each job
  • lsts : array of latest start times for each job

output:

  • solved : pointer to store if the problem is solved (to optimality)
  • infeasible : pointer to store if the problem is infeasible
  • unbounded : pointer to store if the problem is unbounded
  • error : pointer to store if an error occurred

Definition at line 86 of file cons_cumulative.h.

Function Documentation

SCIP_RETCODE SCIPincludeConshdlrCumulative ( SCIP scip)

creates the constraint handler for cumulative constraints and includes it in SCIP

creates the handler for cumulative constraints and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 13499 of file cons_cumulative.c.

References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PRESOLTIMING, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, CONSHDLR_SEPAFREQ, CONSHDLR_SEPAPRIORITY, conshdlrdataCreate(), DEFAULT_COEFTIGHTENING, DEFAULT_CUTSASCONSS, DEFAULT_DETECTDISJUNCTIVE, DEFAULT_DETECTVARBOUNDS, DEFAULT_DISJUNCTIVE, DEFAULT_DUALPRESOLVE, DEFAULT_EFCHECK, DEFAULT_EFINFER, DEFAULT_FILLBRANCHCANDS, DEFAULT_LOCALCUTS, DEFAULT_MAXNODES, DEFAULT_NORMALIZE, DEFAULT_PRESOLPAIRWISE, DEFAULT_SEPAOLD, DEFAULT_TTEFCHECK, DEFAULT_TTEFINFER, DEFAULT_TTINFER, DEFAULT_USEADJUSTEDJOBS, DEFAULT_USEBDWIDENING, DEFAULT_USEBINVARS, DEFAULT_USECOVERCUTS, EVENTHDLR_DESC, EVENTHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_LONGINT_MAX, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddLongintParam(), SCIPcreateConsCumulative(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrGetNVars(), SCIPsetConshdlrGetVars(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrInitpre(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), SCIPsetConshdlrTrans(), and TRUE.

Referenced by SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_EVENTEXEC(), and SCIPincludeDefaultPlugins().

SCIP_RETCODE SCIPcreateConsCumulative ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
SCIP_Bool  initial,
SCIP_Bool  separate,
SCIP_Bool  enforce,
SCIP_Bool  check,
SCIP_Bool  propagate,
SCIP_Bool  local,
SCIP_Bool  modifiable,
SCIP_Bool  dynamic,
SCIP_Bool  removable,
SCIP_Bool  stickingatnode 
)

creates and captures a cumulative constraint

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
initialshould the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'.
separateshould the constraint be separated during LP processing? Usually set to TRUE.
enforceshould the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints.
checkshould the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints.
propagateshould the constraint be propagated during node processing? Usually set to TRUE.
localis constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints.
modifiableis constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint.
dynamicis constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints.
removableshould the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'.
stickingatnodeshould the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data.

Definition at line 13629 of file cons_cumulative.c.

References consdataCatchEvents(), consdataCreate(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_PROBLEM, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPcreateConsBasicCumulative(), SCIPdebugMessage, SCIPerrorMessage, SCIPfindConshdlr(), and SCIPgetStage().

Referenced by CREATE_CONSTRAINT(), createConsCumulative(), createCumulativeCons(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIPcreateConsBasicCumulative(), and SCIPincludeConshdlrCumulative().

SCIP_RETCODE SCIPcreateConsBasicCumulative ( SCIP scip,
SCIP_CONS **  cons,
const char *  name,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity 
)

creates and captures an absolute power constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsCumulative(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsCumulative() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()

creates and captures a cumulative constraint in its most basic version, i. e., all constraint flags are set to their basic value as explained for the method SCIPcreateConsCumulative(); all flags can be set via SCIPsetConsFLAGNAME-methods in scip.h

See also
SCIPcreateConsCumulative() for information about the basic constraint flag configuration
Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity

Definition at line 13711 of file cons_cumulative.c.

References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateConsCumulative(), SCIPsetHminCumulative(), and TRUE.

Referenced by SCIP_DECL_SOLVECUMULATIVE(), and SCIPcreateConsCumulative().

SCIP_RETCODE SCIPsetHminCumulative ( SCIP scip,
SCIP_CONS cons,
int  hmin 
)

set the left bound of effective horizon

set the left bound of the time axis to be considered (including hmin)

Parameters
scipSCIP data structure
consconstraint data
hminleft bound of time axis to be considered

Definition at line 13731 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHminCumulative().

Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_SOLVECUMULATIVE(), and SCIPcreateConsBasicCumulative().

int SCIPgetHminCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the left bound of the effective horizon

returns the left bound of the time axis to be considered

Parameters
scipSCIP data structure
consconstraint

Definition at line 13755 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPsetHmaxCumulative().

Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHminCumulative().

SCIP_RETCODE SCIPsetHmaxCumulative ( SCIP scip,
SCIP_CONS cons,
int  hmax 
)

set the right bound of the effective horizon

set the right bound of the time axis to be considered (not including hmax)

Parameters
scipSCIP data structure
consconstraint data
hmaxright bound of time axis to be considered

Definition at line 13775 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetHmaxCumulative().

Referenced by createConsCumulative(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), SCIP_DECL_SOLVECUMULATIVE(), and SCIPgetHminCumulative().

int SCIPgetHmaxCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the right bound of effective horizon

returns the right bound of the time axis to be considered

Parameters
scipSCIP data structure
consconstraint

Definition at line 13799 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetVarsCumulative().

Referenced by SCIP_DECL_CONSRESPROP(), and SCIPsetHmaxCumulative().

SCIP_VAR** SCIPgetVarsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the start time variables of the cumulative constraint

returns the activities of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13819 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetNVarsCumulative().

Referenced by SCIPgetHmaxCumulative(), and writeFzn().

int SCIPgetNVarsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the number of start time variables of the cumulative constraint

returns the activities of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13840 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetCapacityCumulative().

Referenced by SCIPgetVarsCumulative(), and writeFzn().

int SCIPgetCapacityCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the capacity of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13861 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDurationsCumulative().

Referenced by SCIPgetNVarsCumulative(), and writeFzn().

int* SCIPgetDurationsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the durations of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13882 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), SCIPerrorMessage, and SCIPgetDemandsCumulative().

Referenced by SCIPgetCapacityCumulative(), and writeFzn().

int* SCIPgetDemandsCumulative ( SCIP scip,
SCIP_CONS cons 
)

returns the demands of the cumulative constraint

Parameters
scipSCIP data structure
consconstraint data

Definition at line 13903 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIPABORT, SCIPcheckCumulativeCondition(), SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.

Referenced by SCIPgetDurationsCumulative(), and writeFzn().

SCIP_RETCODE SCIPcheckCumulativeCondition ( SCIP scip,
SCIP_SOL sol,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_Bool violated,
SCIP_CONS cons,
SCIP_Bool  printreason 
)

check for the given starting time variables with their demands and durations if the cumulative conditions for the given solution is satisfied

Parameters
scipSCIP data structure
solprimal solution, or NULL for current LP/pseudo solution
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
violatedpointer to store if the cumulative condition is violated
consconstraint which is checked
printreasonshould the reason for the violation be printed?

Definition at line 13926 of file cons_cumulative.c.

References checkCumulativeCondition(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPnormalizeCumulativeCondition().

Referenced by SCIPgetDemandsCumulative().

SCIP_RETCODE SCIPnormalizeCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int *  capacity,
int *  nchgcoefs,
int *  nchgsides 
)

normalize cumulative condition

Parameters
scipSCIP data structure
nvarsnumber of start time variables (activities)
varsarray of start time variables
durationsarray of durations
demandsarray of demands
capacitypointer to store the changed cumulative capacity
nchgcoefspointer to count total number of changed coefficients
nchgsidespointer to count number of side changes

Definition at line 13951 of file cons_cumulative.c.

References normalizeCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPsplitCumulativeCondition().

Referenced by SCIPcheckCumulativeCondition().

SCIP_RETCODE SCIPsplitCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int *  hmin,
int *  hmax,
int *  split 
)

searches for a time point within the cumulative condition were the cumulative condition can be split

Parameters
scipSCIP data structure
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
hminpointer to store the left bound of the effective horizon
hmaxpointer to store the right bound of the effective horizon
splitpoint were the cumulative condition can be split

Definition at line 13969 of file cons_cumulative.c.

References computeEffectiveHorizonCumulativeCondition(), SCIP_CALL, SCIP_OKAY, and SCIPpresolveCumulativeCondition().

Referenced by SCIPnormalizeCumulativeCondition().

SCIP_RETCODE SCIPpresolveCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int  hmin,
int  hmax,
SCIP_Bool downlocks,
SCIP_Bool uplocks,
SCIP_CONS cons,
SCIP_Bool irrelevants,
int *  nfixedvars,
int *  nchgsides,
SCIP_Bool cutoff 
)

presolve cumulative condition w.r.t. effective horizon by detecting irrelevant variables

Parameters
scipSCIP data structure
nvarsnumber of start time variables (activities)
varsarray of start time variables
durationsarray of durations
hminleft bound of time axis to be considered
hmaxright bound of time axis to be considered (not including hmax)
downlocksarray storing if the variable has a down lock, or NULL
uplocksarray storing if the variable has an up lock, or NULL
consconstraint which gets propagated, or NULL
irrelevantsarray mark those variables which are irrelevant for the cumulative condition
nfixedvarspointer to store the number of fixed variables
nchgsidespointer to store the number of changed sides
cutoffbuffer to store whether a cutoff is detected

Definition at line 13988 of file cons_cumulative.c.

References presolveConsEst(), presolveConsLct(), SCIP_CALL, SCIP_OKAY, and SCIPpropCumulativeCondition().

Referenced by SCIPsplitCumulativeCondition().

SCIP_RETCODE SCIPpropCumulativeCondition ( SCIP scip,
SCIP_PRESOLTIMING  presoltiming,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_CONS cons,
int *  nchgbds,
SCIP_Bool initialized,
SCIP_Bool explanation,
SCIP_Bool cutoff 
)

propagate the given cumulative condition

Parameters
scipSCIP data structure
presoltimingcurrent presolving timing
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands
capacityavailable cumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
consconstraint which gets propagated
nchgbdspointer to store the number of variable bound changes
initializedwas conflict analysis initialized
explanationbool array which marks the variable which are part of the explanation if a cutoff was detected, or NULL
cutoffpointer to store if the cumulative condition is violated

Definition at line 14019 of file cons_cumulative.c.

References CONSHDLR_NAME, FALSE, NULL, propagateCumulativeCondition(), SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPrespropCumulativeCondition().

Referenced by SCIPpresolveCumulativeCondition().

SCIP_RETCODE SCIPrespropCumulativeCondition ( SCIP scip,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_VAR infervar,
int  inferinfo,
SCIP_BOUNDTYPE  boundtype,
SCIP_BDCHGIDX bdchgidx,
SCIP_Real  relaxedbd,
SCIP_Bool explanation,
SCIP_RESULT result 
)

resolve propagation w.r.t. the cumulative condition

Parameters
scipSCIP data structure
nvarsnumber of start time variables (activities)
varsarray of start time variables
durationsarray of durations
demandsarray of demands
capacitycumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
infervarthe conflict variable whose bound change has to be resolved
inferinfothe user information
boundtypethe type of the changed bound (lower or upper bound)
bdchgidxthe index of the bound change, representing the point of time where the change took place
relaxedbdthe relaxed bound which is sufficient to be explained
explanationbool array which marks the variable which are part of the explanation if a cutoff was detected, or NULL
resultpointer to store the result of the propagation conflict resolving call

Definition at line 14068 of file cons_cumulative.c.

References intToInferInfo(), respropCumulativeCondition(), SCIP_CALL, SCIP_OKAY, SCIPvisualizeConsCumulative(), and TRUE.

Referenced by SCIPpropCumulativeCondition().

SCIP_RETCODE SCIPsetSolveCumulative ( SCIP scip,
SCIP_DECL_SOLVECUMULATIVE((*solveCumulative))   
)

sets method to solve an individual cumulative condition

Parameters
scipSCIP data structure

Definition at line 14194 of file cons_cumulative.c.

References CONSHDLR_NAME, NULL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPerrorMessage, SCIPfindConshdlr(), and SCIPsolveCumulative().

Referenced by SCIPvisualizeConsCumulative().

SCIP_RETCODE SCIPsolveCumulative ( SCIP scip,
int  njobs,
SCIP_Real ests,
SCIP_Real lsts,
SCIP_Real objvals,
int *  durations,
int *  demands,
int  capacity,
int  hmin,
int  hmax,
SCIP_Real  timelimit,
SCIP_Real  memorylimit,
SCIP_Longint  maxnodes,
SCIP_Bool solved,
SCIP_Bool infeasible,
SCIP_Bool unbounded,
SCIP_Bool error 
)

solves given cumulative condition as independent sub problem

Note
If the problem was solved to the earliest start times (ests) and latest start times (lsts) array contain the solution values; If the problem was not solved these two arrays contain the global bounds at the time the sub solver was interrupted.
Parameters
scipSCIP data structure
njobsnumber of jobs (activities)
estsarray with the earlier start time for each job
lstsarray with the latest start time for each job
objvalsarray of objective coefficients for each job (linear objective function), or NULL if none
durationsarray of durations
demandsarray of demands
capacitycumulative capacity
hminleft bound of time axis to be considered (including hmin)
hmaxright bound of time axis to be considered (not including hmax)
timelimittime limit for solving in seconds
memorylimitmemory limit for solving in mega bytes (MB)
maxnodesmaximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit)
solvedpointer to store if the problem is solved (to optimality)
infeasiblepointer to store if the problem is infeasible
unboundedpointer to store if the problem is unbounded
errorpointer to store if an error occurred

Definition at line 14224 of file cons_cumulative.c.

References CONSHDLR_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPconshdlrGetData(), SCIPcreateWorstCaseProfile(), SCIPerrorMessage, SCIPfindConshdlr(), and TRUE.

Referenced by SCIPsetSolveCumulative(), and solveIndependentCons().

SCIP_RETCODE SCIPcreateWorstCaseProfile ( SCIP scip,
SCIP_PROFILE profile,
int  nvars,
SCIP_VAR **  vars,
int *  durations,
int *  demands 
)

creates the worst case resource profile, that is, all jobs are inserted with the earliest start and latest completion time

Parameters
scipSCIP data structure
profileresource profile
nvarsnumber of variables (jobs)
varsarray of integer variable which corresponds to starting times for a job
durationsarray containing corresponding durations
demandsarray containing corresponding demands

Definition at line 14280 of file cons_cumulative.c.

References computeImpliedEst(), computeImpliedLct(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPblkmem(), SCIPcalcHashtableSize(), SCIPcomputeHmin(), SCIPconvertRealToInt(), SCIPfreeBufferArray, SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapInsert(), SCIPprofileInsertCore(), SCIPsortDownIntInt(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().

Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPsolveCumulative().

int SCIPcomputeHmin ( SCIP scip,
SCIP_PROFILE profile,
int  capacity 
)

computes w.r.t. the given worst case resource profile the first time point where the given capacity can be violated

Parameters
scipSCIP data structure
profileworst case resource profile
capacitycapacity to check

Definition at line 14359 of file cons_cumulative.c.

References SCIPcomputeHmax(), SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().

Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPcreateWorstCaseProfile().

int SCIPcomputeHmax ( SCIP scip,
SCIP_PROFILE profile,
int  capacity 
)

computes w.r.t. the given worst case resource profile the first time point where the given capacity is satisfied for sure

Parameters
scipSCIP data structure
profileworst case profile
capacitycapacity to check

Definition at line 14389 of file cons_cumulative.c.

References SCIPprofileGetLoads(), SCIPprofileGetNTimepoints(), and SCIPprofileGetTimepoints().

Referenced by computeAlternativeBounds(), computeEffectiveHorizonCumulativeCondition(), and SCIPcomputeHmin().