constraint handler for cumulative constraints with optional activities
Given a set of jobs \(J\). Each job~ \(j\) has a binary variables \(x_j\) which is one if this job is scheduled on that machine (otherwise it is zero), an integer start time variables \(S_j\), a processing time \(p_j\), and a demands \(d_j\). Besides that an integer resource capacity \(C\).
The optcumulative enfoces the cumulative conditions for those jobs which are assigned to that machine. Let \(J'\) be the subset of jobs assigned to that optcumulative constraint, then the cumulative constraint ensures that for each point in time \(t\) \(\sum_{j\in J': S_j \leq t < S_j + p_j} d_j \leq C\) holds.
Propagation:
LP Relaxation:
Definition in file cons_optcumulative.c.
#include <assert.h>
#include <string.h>
#include "cons_optcumulative.h"
#include "scip/cons_cumulative.h"
#include "scip/cons_knapsack.h"
#include "scip/scipdefplugins.h"
Go to the source code of this file.
Functions | |
static SCIP_RETCODE | unlockRounding (SCIP *scip, SCIP_CONS *cons, SCIP_VAR *binvar, SCIP_VAR *var, SCIP_Bool downlock, SCIP_Bool uplock) |
static SCIP_RETCODE | catchEventBinvar (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos) |
static SCIP_RETCODE | dropEventBinvar (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos) |
static SCIP_RETCODE | catchEventIntvar (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos) |
static SCIP_RETCODE | dropEventIntvar (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlr, int pos) |
static SCIP_RETCODE | catchAllEvents (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlrbinvars, SCIP_EVENTHDLR *eventhdlrintvars) |
static SCIP_RETCODE | dropAllEvents (SCIP *scip, SCIP_CONS *cons, SCIP_EVENTHDLR *eventhdlrbinvars, SCIP_EVENTHDLR *eventhdlrintvars) |
static void | createSortedEventpoints (SCIP *scip, SCIP_CONSDATA *consdata, int *starttimes, int *endtimes, int *startindices, int *endindices, SCIP_Bool local) |
static SCIP_Longint | computeMaxEnergy (SCIP *scip, SCIP_CONSDATA *consdata, int starttime, int endtime) |
static SCIP_RETCODE | collectVars (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_VAR **vars, SCIP_Longint *weights, int *nvars, int starttime, int endtime) |
static int | removeRedundantRows (SCIP_Longint *rowtightness, int *startidxs, int nrows, SCIP_Longint tightness) |
static SCIP_RETCODE | createRow (SCIP *scip, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_VAR **vars, SCIP_Longint *weights, int nvars, SCIP_Longint capacity, SCIP_Bool local, SCIP_Bool *rowadded, SCIP_Bool *consadded, SCIP_Bool *cutoff) |
static SCIP_RETCODE | addRelaxation (SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSHDLRDATA *conshdlrdata, SCIP_CONS *cons, SCIP_Bool *rowadded, SCIP_Bool *consadded, SCIP_Bool *cutoff) |
static void | collectActivities (SCIP_CONSDATA *consdata, SCIP_VAR **binvars, SCIP_VAR **vars, int *durations, int *demands, int *nfixedones, int *nfixedzeros, SCIP_Bool *auxiliary) |
static void | collectSolActivities (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol, SCIP_VAR **binvars, SCIP_VAR **vars, int *durations, int *demands, int *nvars, int *nfixedones, int *nfixedzeros, SCIP_Bool *auxiliary) |
static SCIP_RETCODE | solveCumulative (SCIP *scip, int nvars, SCIP_VAR **vars, int *durations, int *demands, int capacity, int hmin, int hmax, SCIP_Bool local, SCIP_Real *ests, SCIP_Real *lsts, SCIP_Longint maxnodes, SCIP_Bool *solved, SCIP_Bool *infeasible, SCIP_Bool *unbounded, SCIP_Bool *error) |
static SCIP_RETCODE | createConflictCons (SCIP *scip, const char *name, SCIP_VAR **binvars, int nvars) |
static SCIP_RETCODE | checkRedundancy (SCIP *scip, SCIP_CONS *cons, int *ndelconss, SCIP_Bool *redundant) |
static SCIP_RETCODE | solveSubproblem (SCIP *scip, SCIP_CONS *cons, SCIP_Bool conflictanalysis, SCIP_CONSDATA *consdata, SCIP_VAR **binvars, SCIP_VAR **vars, int *durations, int *demands, int nvars, int *nfixedvars, int *nchgbds, int *ndelconss, SCIP_Bool *cutoff) |
static SCIP_RETCODE | checkCons (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *violated, SCIP_Bool printreason) |
static SCIP_RETCODE | enfopsCons (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *trysol, SCIP_Bool *violated, SCIP_Bool *consadded, SCIP_Bool *solfeasible) |
static SCIP_RETCODE | upgradeCons (SCIP *scip, SCIP_CONS *cons, int *ndelconss, int *nupgdconss, SCIP_Bool *mustpropagate) |
static SCIP_RETCODE | fixIntegerVariable (SCIP *scip, SCIP_VAR *var, SCIP_Bool downlock, SCIP_Bool uplock, int *nchgbds) |
static SCIP_RETCODE | consdataDeletePos (SCIP *scip, SCIP_CONSDATA *consdata, SCIP_CONS *cons, int pos) |
static SCIP_RETCODE | applyZeroFixings (SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *nchgbds) |
static SCIP_RETCODE | removeIrrelevantJobs (SCIP *scip, SCIP_CONS *cons) |
static SCIP_RETCODE | presolveCumulativeCondition (SCIP *scip, SCIP_CONS *cons, int *nfixedvars, int *nchgcoefs, int *nchgsides, SCIP_Bool *cutoff) |
static SCIP_RETCODE | createSetPackingCons (SCIP *scip, SCIP_VAR *var1, SCIP_VAR *var2) |
static SCIP_RETCODE | createVarboundCons (SCIP *scip, SCIP_VAR *binvar, SCIP_VAR *intvar, int bound, SCIP_Bool lower) |
static SCIP_RETCODE | createBounddisjunctionCons (SCIP *scip, SCIP_VAR *binvar, SCIP_VAR *intvar, int lb, int ub) |
static SCIP_RETCODE | detectImplications (SCIP *scip, SCIP_CONS *cons, int *nchgcoefs, int *naddconss) |
static SCIP_RETCODE | propagateCons (SCIP *scip, SCIP_CONS *cons, SCIP_Bool conflictanalysis, int *nfixedvars, int *nchgbds, int *ndelconss, SCIP_Bool *cutoff) |
static | SCIP_DECL_CONSHDLRCOPY (conshdlrCopyOptcumulative) |
static | SCIP_DECL_CONSFREE (consFreeOptcumulative) |
static | SCIP_DECL_CONSINITPRE (consInitpreOptcumulative) |
static | SCIP_DECL_CONSEXITSOL (consExitsolOptcumulative) |
static | SCIP_DECL_CONSDELETE (consDeleteOptcumulative) |
static | SCIP_DECL_CONSTRANS (consTransOptcumulative) |
static | SCIP_DECL_CONSINITLP (consInitlpOptcumulative) |
static | SCIP_DECL_CONSSEPALP (consSepalpOptcumulative) |
static | SCIP_DECL_CONSENFOLP (consEnfolpOptcumulative) |
static | SCIP_DECL_CONSENFOPS (consEnfopsOptcumulative) |
static | SCIP_DECL_CONSCHECK (consCheckOptcumulative) |
static | SCIP_DECL_CONSPROP (consPropOptcumulative) |
static | SCIP_DECL_CONSPRESOL (consPresolOptcumulative) |
static | SCIP_DECL_CONSRESPROP (consRespropOptcumulative) |
static | SCIP_DECL_CONSLOCK (consLockOptcumulative) |
static | SCIP_DECL_CONSPRINT (consPrintOptcumulative) |
static | SCIP_DECL_CONSCOPY (consCopyOptcumulative) |
static | SCIP_DECL_CONSPARSE (consParseOptcumulative) |
static | SCIP_DECL_EVENTEXEC (eventExecOptcumulativeBinvars) |
static | SCIP_DECL_EVENTEXEC (eventExecOptcumulativeIntvars) |
SCIP_RETCODE | SCIPincludeConshdlrOptcumulative (SCIP *scip) |
SCIP_RETCODE | SCIPcreateConsOptcumulative (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_VAR **binvars, 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 | SCIPsetHminOptcumulative (SCIP *scip, SCIP_CONS *cons, int hmin) |
int | SCIPgetHminOptcumulative (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPsetHmaxOptcumulative (SCIP *scip, SCIP_CONS *cons, int hmax) |
int | SCIPgetHmaxOptcumulative (SCIP *scip, SCIP_CONS *cons) |
Debug Methods | |
static void | checkCounters (SCIP_CONSDATA *consdata) |
Miscellaneous Methods | |
static int | convertBoundToInt (SCIP *scip, SCIP_Real bound) |
Constraint data methods | |
static SCIP_RETCODE | consdataCreate (SCIP *scip, SCIP_CONSDATA **consdata, int nvars, SCIP_VAR **vars, SCIP_VAR **binvars, int *durations, int *demands, int capacity, SCIP_Bool check) |
static SCIP_RETCODE | consdataFree (SCIP *scip, SCIP_CONSDATA **consdata) |
static SCIP_RETCODE | consdataPrint (SCIP *scip, SCIP_CONSDATA *consdata, FILE *file) |
Constraint handler data | |
Method used to create and free the constraint handler data when including and removing the cumulative constraint handler. | |
static SCIP_RETCODE | conshdlrdataCreate (SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlrbinvars, SCIP_EVENTHDLR *eventhdlrintvars) |
static SCIP_RETCODE | conshdlrdataFree (SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata) |
#define CONSHDLR_NAME "optcumulative" |
Definition at line 78 of file cons_optcumulative.c.
#define CONSHDLR_DESC "constraint handler for cumulative constraints with optional activities" |
Definition at line 79 of file cons_optcumulative.c.
#define CONSHDLR_SEPAPRIORITY 0 |
priority of the constraint handler for separation
Definition at line 80 of file cons_optcumulative.c.
#define CONSHDLR_ENFOPRIORITY -2060000 |
priority of the constraint handler for constraint enforcing
Definition at line 81 of file cons_optcumulative.c.
#define CONSHDLR_CHECKPRIORITY -3100000 |
priority of the constraint handler for checking feasibility
Definition at line 82 of file cons_optcumulative.c.
#define CONSHDLR_SEPAFREQ 1 |
frequency for separating cuts; zero means to separate only in the root node
Definition at line 83 of file cons_optcumulative.c.
#define CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation
Definition at line 84 of file cons_optcumulative.c.
#define CONSHDLR_EAGERFREQ 100 |
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only
Definition at line 85 of file cons_optcumulative.c.
#define CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit)
Definition at line 87 of file cons_optcumulative.c.
#define CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts?
Definition at line 88 of file cons_optcumulative.c.
#define CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions?
Definition at line 89 of file cons_optcumulative.c.
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 90 of file cons_optcumulative.c.
#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
Definition at line 92 of file cons_optcumulative.c.
#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM |
Definition at line 93 of file cons_optcumulative.c.
#define EVENTHDLR_BINVARS_NAME "optcumulativebinvars" |
Definition at line 102 of file cons_optcumulative.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrOptcumulative().
#define EVENTHDLR_BINVARS_DESC "bound change event handler for binary variables of optcumulative constraints" |
Definition at line 103 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define EVENTHDLR_INTVARS_NAME "optcumulativeintvars" |
Definition at line 105 of file cons_optcumulative.c.
Referenced by SCIP_DECL_EVENTEXEC(), and SCIPincludeConshdlrOptcumulative().
#define EVENTHDLR_INTVARS_DESC "bound change event handler for integer variables of optcumulative constraints" |
Definition at line 106 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define DEFAULT_ROWRELAX FALSE |
add linear relaxation as LP row (otherwise a knapsack constraint is created)?
Definition at line 115 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define DEFAULT_CONFLICTANALYSIS TRUE |
participate in conflict analysis?"
Definition at line 116 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define DEFAULT_INTERVALRELAX TRUE |
create a relaxation for each start and end time point interval
Definition at line 117 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consInitOptcumulative NULL |
initialization method of constraint handler (called after problem was transformed)
Definition at line 2944 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consExitOptcumulative NULL |
deinitialization method of constraint handler (called before transformed problem is freed)
Definition at line 2948 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consExitpreOptcumulative NULL |
presolving deinitialization method of constraint handler (called after presolving has been finished)
Definition at line 2983 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consInitsolOptcumulative NULL |
solving process initialization method of constraint handler (called when branch and bound process is about to begin)
Definition at line 2987 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consEnforelaxOptcomulative NULL |
constraint enforcing method of constraint handler for relaxation solutions
Definition at line 2990 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consSepasolOptcumulative NULL |
separation method of constraint handler for arbitrary primal solutions
Definition at line 3158 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consActiveOptcumulative NULL |
constraint activation notification method of constraint handler
Definition at line 3741 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consDeactiveOptcumulative NULL |
constraint deactivation notification method of constraint handler
Definition at line 3745 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consEnableOptcumulative NULL |
constraint enabling notification method of constraint handler
Definition at line 3749 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consDisableOptcumulative NULL |
constraint disabling notification method of constraint handler
Definition at line 3753 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
#define consDelvarsOptcumulative NULL |
variable deletion method of constraint handler
Definition at line 3756 of file cons_optcumulative.c.
Referenced by SCIPincludeConshdlrOptcumulative().
|
static |
check constraint state (nglbfixedones and nglbfixedzeros)
consdata | optcumulative constraint data |
Definition at line 176 of file cons_optcumulative.c.
References assert(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal().
Referenced by applyZeroFixings(), catchAllEvents(), consdataDeletePos(), propagateCons(), and upgradeCons().
converts the given double bound which is integral to an int; in optimized mode the function gets inlined for performance; in debug mode we check some additional conditions
scip | SCIP data structure |
bound | double bound to convert |
Definition at line 227 of file cons_optcumulative.c.
References assert(), bound, SCIP_Real, SCIPisEQ(), and SCIPisIntegral().
Referenced by addRelaxation(), checkRedundancy(), collectVars(), computeMaxEnergy(), createSortedEventpoints(), detectImplications(), enfopsCons(), presolveCumulativeCondition(), propagateCons(), removeIrrelevantJobs(), and solveSubproblem().
|
static |
creates constraint data of optcumulative constraint
scip | SCIP data structure |
consdata | pointer to consdata |
nvars | number of variables |
vars | array of integer variables |
binvars | array of variable representing if the job has to be processed on this machine |
durations | array containing corresponding durations |
demands | array containing corresponding demands |
capacity | available cumulative capacity |
check | is the corresponding constraint a check constraint |
Definition at line 250 of file cons_optcumulative.c.
References assert(), FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBlockMemory, SCIPdebugMessage, SCIPduplicateBlockMemoryArray, SCIPgetTransformedVars(), SCIPisTransformed(), SCIPmarkDoNotMultaggrVar(), and vars.
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsOptcumulative().
|
static |
frees a optcumulative constraint data
scip | SCIP data structure |
consdata | pointer to linear constraint data |
Definition at line 347 of file cons_optcumulative.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPreleaseCons(), and SCIPreleaseRow().
Referenced by SCIP_DECL_CONSDELETE().
|
static |
prints optcumulative constraint to file stream
scip | SCIP data structure |
consdata | optcumulative constraint data |
file | output file (or NULL for standard output) |
Definition at line 390 of file cons_optcumulative.c.
References assert(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPinfoMessage(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), and SCIPwriteVarName().
Referenced by SCIP_DECL_CONSPRINT().
|
static |
creates constaint handler data for set partitioning / packing / covering constraint handler
scip | SCIP data structure |
conshdlrdata | pointer to store the constraint handler data |
eventhdlrbinvars | used event handler for tracing bound changes on binary variables |
eventhdlrintvars | used event handler for tracing bound changes on integer variables |
Definition at line 433 of file cons_optcumulative.c.
References assert(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by SCIPincludeConshdlrOptcumulative().
|
static |
frees constraint handler data for set partitioning / packing / covering constraint handler
scip | SCIP data structure |
conshdlrdata | pointer to the constraint handler data |
Definition at line 456 of file cons_optcumulative.c.
References assert(), NULL, SCIP_OKAY, and SCIPfreeBlockMemory.
Referenced by SCIP_DECL_CONSFREE().
|
static |
removes rounding locks for the given variable in the given optcumulative constraint
scip | SCIP data structure |
cons | optcumulative constraint |
binvar | decision variable |
var | start time variable |
downlock | has the integer start time variable a down lock |
uplock | has the integer start time variable an up lock |
Definition at line 473 of file cons_optcumulative.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPunlockVarCons(), TRUE, and var.
Referenced by consdataDeletePos().
|
static |
catches events for binary variable at given position
scip | SCIP data structure |
cons | set partitioning / packing / covering constraint |
eventhdlr | event handler to call for the event processing |
pos | array position of variable to catch bound change events for |
Definition at line 493 of file cons_optcumulative.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDRELAXED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_OKAY, SCIPcatchVarEvent(), SCIPconsGetData(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal().
Referenced by catchAllEvents().
|
static |
drops events for binary variable at given position
scip | SCIP data structure |
cons | set partitioning / packing / covering constraint |
eventhdlr | event handler to call for the event processing |
pos | array position of variable to catch bound change events for |
Definition at line 546 of file cons_optcumulative.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDRELAXED, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_OKAY, SCIPconsGetData(), SCIPdropVarEvent(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), and SCIPvarGetUbLocal().
Referenced by consdataDeletePos(), and dropAllEvents().
|
static |
catches events for integer variable at given position
scip | SCIP data structure |
cons | set partitioning / packing / covering constraint |
eventhdlr | event handler to call for the event processing |
pos | array position of variable to catch bound change events for |
Definition at line 593 of file cons_optcumulative.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_OKAY, SCIPcatchVarEvent(), SCIPconsGetData(), and var.
Referenced by catchAllEvents().
|
static |
drops events for integer variable at given position
scip | SCIP data structure |
cons | set partitioning / packing / covering constraint |
eventhdlr | event handler to call for the event processing |
pos | array position of variable to catch bound change events for |
Definition at line 628 of file cons_optcumulative.c.
References assert(), NULL, nvars, SCIP_CALL, SCIP_EVENTTYPE_BOUNDTIGHTENED, SCIP_EVENTTYPE_GBDCHANGED, SCIP_OKAY, SCIPconsGetData(), SCIPdropVarEvent(), and var.
Referenced by consdataDeletePos(), and dropAllEvents().
|
static |
catches bound change events for all variables in transformed optcumulative constraint
scip | SCIP data structure |
cons | set partitioning / packing / covering constraint |
eventhdlrbinvars | event handler to call for the event processing on binary variables |
eventhdlrintvars | event handler to call for the event processing on integer variables |
Definition at line 658 of file cons_optcumulative.c.
References assert(), catchEventBinvar(), catchEventIntvar(), checkCounters(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
Referenced by SCIP_DECL_CONSTRANS(), and SCIPcreateConsOptcumulative().
|
static |
drops bound change events for all variables in transformed optcumulative constraint
scip | SCIP data structure |
cons | set partitioning / packing / covering constraint |
eventhdlrbinvars | event handler to call for the event processing on binary variables |
eventhdlrintvars | event handler to call for the event processing on integer variables |
Definition at line 691 of file cons_optcumulative.c.
References assert(), dropEventBinvar(), dropEventIntvar(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
Referenced by SCIP_DECL_CONSDELETE().
|
static |
initialize the sorted event point arrays
scip | SCIP data structure |
consdata | constraint data |
starttimes | array to store sorted start events |
endtimes | array to store sorted end events |
startindices | permutation with rspect to the start times |
endindices | permutation with rspect to the end times |
local | shall local bounds be used |
Definition at line 723 of file cons_optcumulative.c.
References convertBoundToInt(), nvars, SCIP_Bool, SCIPsortIntInt(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), and var.
Referenced by addRelaxation().
|
static |
computes the maximum energy for all variables which correspond to jobs which start between the given start time and end time
scip | SCIP data structure |
consdata | optcumulative constraint data |
starttime | start time |
endtime | end time |
Definition at line 769 of file cons_optcumulative.c.
References assert(), convertBoundToInt(), SCIP_Longint, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and var.
Referenced by addRelaxation().
|
static |
collects all variables which correspond to jobs which start between the given start time and end time
scip | SCIP data structure |
consdata | optcumulative constraint data |
vars | array to store the variables |
weights | array to store the weights |
nvars | pointer to store the number of collected variables |
starttime | start time |
endtime | end time |
Definition at line 800 of file cons_optcumulative.c.
References assert(), convertBoundToInt(), nvars, SCIP_Longint, SCIP_OKAY, SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), var, and vars.
Referenced by addRelaxation().
|
static |
remove row which have a tightness which is smaller or equal to the given one
rowtightness | array containing the tightness for the previously selected rows |
startidxs | array containing for each row the index for the start event |
nrows | current number of rows |
tightness | tightness to use to detect redundant rows |
Definition at line 838 of file cons_optcumulative.c.
References SCIP_Longint.
Referenced by addRelaxation().
|
static |
depending on the parameters setting a row or an knapsack constraint is created
scip | SCIP data structure |
conshdlr | constraint handler |
name | name of the row |
vars | array of variable representing if the job has to be processed on this machine |
weights | start time variables of the activities which are assigned |
nvars | number of variables |
capacity | available cumulative capacity |
local | create local row |
rowadded | pointer to store if a row was added |
consadded | pointer to store if a constraint was added |
cutoff | pointer to store whether a cutoff occurred |
Definition at line 865 of file cons_optcumulative.c.
References assert(), cutoff, FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPaddRow(), SCIPaddVarToRow(), SCIPcacheRowExtensions(), SCIPconshdlrGetData(), SCIPcreateConsKnapsack(), SCIPcreateEmptyRowConshdlr(), SCIPdebug, SCIPflushRowExtensions(), SCIPgetDepth(), SCIPinfinity(), SCIPisCutEfficacious(), SCIPprintCons(), SCIPprintRow(), SCIPreleaseCons(), SCIPreleaseRow(), SCIProwIsInLP(), TRUE, and vars.
Referenced by addRelaxation().
|
static |
adds linear relaxation as cut to the LP
scip | SCIP data structure |
conshdlr | constraint handler |
conshdlrdata | constraint handler data structure |
cons | optcumulative constraint |
rowadded | pointer to store if a row was added |
consadded | pointer to store if a constraint was added |
cutoff | pointer to store whether a cutoff occurred |
Definition at line 936 of file cons_optcumulative.c.
References assert(), BMSclearMemoryArray, collectVars(), computeMaxEnergy(), convertBoundToInt(), createRow(), createSortedEventpoints(), cutoff, FALSE, i, MAX, MIN, NULL, nvars, removeRedundantRows(), SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPsnprintf(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), TRUE, and vars.
Referenced by SCIP_DECL_CONSINITLP(), and SCIP_DECL_CONSSEPALP().
|
static |
collect all activities which are locally (that means in the current branch and bound node) assigned to that machine
consdata | constraint data |
binvars | array of variable representing if the job has to be processed on this machine |
vars | start time variables of the activities which are assigned |
durations | durations of the activities |
demands | demands of the activities |
nfixedones | pointer to store number of activities assigned to that machine |
nfixedzeros | pointer to store number of binary variables fixed to zeor |
auxiliary | pointer to store if the integer start time variables of the assigned activities are auxiliary variables; that is the case if the optcumulative choice constraints is the only one having locks on these variables |
Definition at line 1156 of file cons_optcumulative.c.
References assert(), FALSE, SCIP_Bool, SCIPdebugMessage, SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), TRUE, and vars.
Referenced by propagateCons(), and upgradeCons().
|
static |
collect all activities which are assigned to that machine in the given solution
scip | SCIP data structure |
consdata | constraint data |
sol | primal solution, or NULL for current LP/pseudo solution |
binvars | array of variable representing if the job has to be processed on this machine |
vars | start time variables of the activities which are assigned |
durations | durations of the activities |
demands | demands of the activities |
nvars | pointer to store number of activities assigned to that machine |
nfixedones | pointer to store number of binary variables locally fixed to one |
nfixedzeros | pointer to store number of binary variables locally fixed to zero |
auxiliary | pointer to store if the integer start time variables of the assigned activities are auxiliary variables; that is the case if the machine choice constraints is the only one haveing locks on these variables |
Definition at line 1211 of file cons_optcumulative.c.
References FALSE, nvars, SCIP_Bool, SCIPdebugMessage, SCIPgetSolVal(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetUbLocal(), sol, TRUE, and vars.
Referenced by checkCons(), and enfopsCons().
|
static |
solves given cumulative condition as independent sub problem
scip | SCIP data structure |
nvars | number of start time variables (activities) |
vars | start time variables |
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) |
local | use local bounds, otherwise global |
ests | array to store the earlier start time for each job |
lsts | array to store the latest start time for each job |
maxnodes | maximum number of branch-and-bound nodes to solve the single cumulative constraint (-1: no limit) |
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 1269 of file cons_optcumulative.c.
References assert(), NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPfreeBufferArray, SCIPgetMemExternEstim(), SCIPgetMemUsed(), SCIPgetRealParam(), SCIPgetSolvingTime(), SCIPisInfinity(), SCIPsolveCumulative(), SCIPvarGetLbGlobal(), SCIPvarGetLbLocal(), SCIPvarGetObj(), SCIPvarGetUbGlobal(), SCIPvarGetUbLocal(), var, and vars.
Referenced by checkRedundancy(), enfopsCons(), SCIPsetSolveCumulative(), and solveSubproblem().
|
static |
create a logicor constraint which ensures that the jobs related to binary variables are not assigned in the same time to this optional cumulative constraint
scip | SCIP data structure |
name | name of conflict constraint |
binvars | array of binary variables |
nvars | number of variables |
Definition at line 1343 of file cons_optcumulative.c.
References FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPaddCoefLogicor(), SCIPaddCons(), SCIPcreateConsLogicor(), SCIPgetNegatedVar(), SCIPreleaseCons(), SCIPvarGetLbGlobal(), and TRUE.
Referenced by checkRedundancy(), and enfopsCons().
|
static |
check of the given constraint is redundant
scip | SCIP data structure |
cons | optcumulative constraint which collapsed to a cumulative constraint locally |
ndelconss | pointer to store the number of deleted constraints |
redundant | pointer to store if the constraint is redundant |
Definition at line 1377 of file cons_optcumulative.c.
References assert(), convertBoundToInt(), createConflictCons(), FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPconsGetData(), SCIPconsGetName(), SCIPdelConsLocal(), SCIPfreeBufferArray, SCIPinProbing(), SCIPsortRealPtrPtrIntInt(), SCIPvarGetLbGlobal(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetUbGlobal(), solveCumulative(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSPROP().
|
static |
solve the cumulative sub problem
scip | SCIP data structure |
cons | optcumulative constraint which collapsed to a cumulative constraint locally |
conflictanalysis | should conflict analysis be called for infeasible subproblems |
consdata | constraint data |
binvars | array of variable representing if the job has to be processed on this machine |
vars | start time variables of the activities which are assigned |
durations | durations of the activities |
demands | demands of the activities |
nvars | number of activities assigned to that machine |
nfixedvars | pointer to store the numbver of fixed variables |
nchgbds | pointer to store the number of changed bounds |
ndelconss | pointer to store the number of deleted constraints |
cutoff | pointer to store if the constraint is violated |
Definition at line 1524 of file cons_optcumulative.c.
References assert(), convertBoundToInt(), cutoff, FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_ERROR, SCIP_OKAY, SCIP_Real, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPallocBufferArray, SCIPanalyzeConflictCons(), SCIPdelConsLocal(), SCIPfixVar(), SCIPfreeBufferArray, SCIPinitConflictAnalysis(), SCIPinProbing(), SCIPsortRealPtrPtrIntInt(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetUbLocal(), solveCumulative(), TRUE, and vars.
Referenced by propagateCons().
|
static |
check if the given constrait is valid; checks each starting point of a job whether the remaining capacity is at least zero or not. If not (*violated) is set to TRUE
scip | SCIP data structure |
cons | constraint to be checked |
sol | primal solution, or NULL for current LP/pseudo solution |
violated | pointer to store if the constraint is violated |
printreason | should the reason for the violation be printed? |
Definition at line 1685 of file cons_optcumulative.c.
References assert(), collectSolActivities(), NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPcheckCumulativeCondition(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, sol, and vars.
Referenced by SCIP_DECL_CONSCHECK().
|
static |
check if the given constrait is valid; checks each starting point of a job whether the remaining capacity is at least zero or not. If not (*violated) is set to TRUE
scip | SCIP data structure |
cons | constraint to be checked |
trysol | primal solution to construct, or NULL |
violated | pointer to store if the constraint is violated/infeasible |
consadded | pointer to store if a constraint was added |
solfeasible | pointer to store if the constraint solution is potentially feasible |
Definition at line 1740 of file cons_optcumulative.c.
References assert(), collectSolActivities(), convertBoundToInt(), createConflictCons(), FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcheckCumulativeCondition(), SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPisStopped(), SCIPsetSolVal(), SCIPsortRealPtrPtrIntInt(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), solveCumulative(), TRUE, and vars.
Referenced by SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFOPS().
|
static |
upgrade constraints to an cumulative constraint
scip | SCIP data structure |
cons | constraint to be checked |
ndelconss | pointer to store the number of deleted constraints |
nupgdconss | pointer to store the number of upgrade constraints |
mustpropagate | pointer to store if the constraints has to be propagated |
Definition at line 1875 of file cons_optcumulative.c.
References assert(), checkCounters(), collectActivities(), FALSE, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPaddCons(), SCIPaddConsLocal(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDeleted(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsCumulative(), SCIPdebugMessage, SCIPdelCons(), SCIPdelConsLocal(), SCIPfixVar(), SCIPfreeBufferArray, SCIPreleaseCons(), SCIPsetHmaxCumulative(), SCIPsetHminCumulative(), SCIPsnprintf(), TRUE, and vars.
Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
|
static |
since the binary variable is fixed to zero, depending in the objective coefficient of the integer variable and the rounding locks, we might can fix the integer variable
scip | SCIP data structure |
var | integer variable to fix |
downlock | does the variable has down lock given by the optcumulative constraint |
uplock | does the variable has up lock given by the optcumulative constraint |
nchgbds | pointer to store the number changed variable bounds |
Definition at line 1999 of file cons_optcumulative.c.
References assert(), objval, SCIP_Bool, SCIP_CALL, SCIP_INVALID, SCIP_OKAY, SCIP_Real, SCIPfixVar(), SCIPinProbing(), SCIPinRepropagation(), SCIPisNegative(), SCIPisPositive(), SCIPisZero(), SCIPvarGetLbLocal(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetObj(), SCIPvarGetUbLocal(), and var.
Referenced by applyZeroFixings(), and propagateCons().
|
static |
deletes coefficient at given position from constraint data
scip | SCIP data structure |
consdata | cumulative constraint data |
cons | knapsack constraint |
pos | position of coefficient to delete |
Definition at line 2072 of file cons_optcumulative.c.
References assert(), checkCounters(), dropEventBinvar(), dropEventIntvar(), FALSE, NULL, nvars, SCIP_CALL, SCIP_OKAY, SCIPconsGetHdlr(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsTransformed(), SCIPdebugMessage, SCIPvarGetName(), and unlockRounding().
Referenced by applyZeroFixings(), detectImplications(), presolveCumulativeCondition(), and removeIrrelevantJobs().
|
static |
remove all jobs for which the binary variable is globally fixed to zero
scip | SCIP data structure |
cons | constraint to be checked |
nchgcoefs | pointer to store the number changed coefficients |
nchgbds | pointer to store the number changed variable bounds |
Definition at line 2132 of file cons_optcumulative.c.
References assert(), checkCounters(), consdataDeletePos(), fixIntegerVariable(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsIsChecked(), SCIPdebugMessage, SCIPvarGetName(), SCIPvarGetUbGlobal(), and TRUE.
Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
|
static |
remove jobs which have a duration or demand of zero (zero energy) or lay outside the efficient horizon [hmin, hmax); this is done in the SCIP_DECL_CONSINITPRE() callback
scip | SCIP data structure |
cons | constraint to propagate |
Definition at line 2180 of file cons_optcumulative.c.
References assert(), consdataDeletePos(), convertBoundToInt(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), and var.
Referenced by SCIP_DECL_CONSINITPRE().
|
static |
presolve cumulative condition w.r.t. effective horizon by detecting irrelevant variables
scip | SCIP data structure |
cons | constraint to be checked |
nfixedvars | pointer to store the number of fixed variables |
nchgcoefs | pointer to store the number of changed coefficients |
nchgsides | pointer to store the number of changed sides |
cutoff | buffer to store whether a cutoff is detected |
Definition at line 2241 of file cons_optcumulative.c.
References assert(), BMSclearMemoryArray, consdataDeletePos(), convertBoundToInt(), cutoff, NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPfixVar(), SCIPfreeBufferArray, SCIPpresolveCumulativeCondition(), SCIPvarGetLbGlobal(), SCIPvarGetUbGlobal(), and var.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
create an an set partitioning constraint
scip | SCIP data structure |
var1 | first variable |
var2 | second variable |
Definition at line 2326 of file cons_optcumulative.c.
References NULL, SCIP_CALL, SCIP_OKAY, SCIPaddCoefSetppc(), SCIPaddCons(), SCIPcreateConsBasicSetpack(), SCIPdebugPrintCons, and SCIPreleaseCons().
Referenced by detectImplications().
|
static |
create variable bound constraint
scip | SCIP data structure |
binvar | binary variable x |
intvar | integer variable y |
bound | variable bound |
lower | variable lower bound? (Otherwise upper bound) |
Definition at line 2347 of file cons_optcumulative.c.
References assert(), bound, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPcreateConsBasicVarbound(), SCIPdebugPrintCons, SCIPinfinity(), SCIPreleaseCons(), SCIPvarGetLbGlobal(), and SCIPvarGetUbGlobal().
Referenced by detectImplications().
|
static |
create bound disjunction constraint
scip | SCIP data structure |
binvar | binary variable x |
intvar | integer variable y |
lb | lower bound |
ub | lower bound |
Definition at line 2385 of file cons_optcumulative.c.
References NULL, SCIP_BOUNDTYPE_LOWER, SCIP_BOUNDTYPE_UPPER, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPcreateConsBasicBounddisjunction(), SCIPdebugPrintCons, SCIPfreeBufferArray, SCIPreleaseCons(), and vars.
Referenced by detectImplications().
|
static |
detect implication
scip | SCIP data structure |
cons | optcumulative constraint |
nchgcoefs | pointer to store the number of changed coefficients |
naddconss | pointer to store the number of added constraints |
Definition at line 2431 of file cons_optcumulative.c.
References assert(), consdataDeletePos(), convertBoundToInt(), createBounddisjunctionCons(), createSetPackingCons(), createVarboundCons(), FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetName(), SCIPdebugMessage, SCIPvarGetLbGlobal(), SCIPvarGetName(), SCIPvarGetUbGlobal(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSPRESOL().
|
static |
propgates given constraint
scip | SCIP data structure |
cons | constraint to be checked |
conflictanalysis | should conflict analysis be called for infeasible subproblems |
nfixedvars | pointer to store the number of fixed variables |
nchgbds | pointer to store the number changed variable bounds |
ndelconss | pointer to store the number of deleted constraints |
cutoff | pointer to store if a cutoff (infeasibility) was detected |
Definition at line 2643 of file cons_optcumulative.c.
References assert(), BMSclearMemoryArray, checkCounters(), collectActivities(), convertBoundToInt(), cutoff, FALSE, fixIntegerVariable(), NULL, nvars, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PRESOLTIMING_ALWAYS, SCIP_Real, SCIPaddConflictBinvar(), SCIPallocBufferArray, SCIPanalyzeConflictCons(), SCIPcomputeHmin(), SCIPconsGetData(), SCIPconsIsChecked(), SCIPcreateWorstCaseProfile(), SCIPdebugMessage, SCIPendProbing(), SCIPfixVarProbing(), SCIPfreeBufferArray, SCIPinProbing(), SCIPinRepropagation(), SCIPisStopped(), SCIPnewProbingNode(), SCIPprofileCreate(), SCIPprofileDeleteCore(), SCIPprofileFree(), SCIPprofileInsertCore(), SCIPpropagateProbing(), SCIPpropCumulativeCondition(), SCIPstartProbing(), SCIPtightenVarLb(), SCIPtightenVarUb(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetNLocksDown(), SCIPvarGetNLocksUp(), SCIPvarGetUbLocal(), solveSubproblem(), TRUE, var, and vars.
Referenced by SCIP_DECL_CONSPRESOL(), and SCIP_DECL_CONSPROP().
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 2912 of file cons_optcumulative.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetName(), SCIPincludeConshdlrOptcumulative(), TRUE, and valid.
|
static |
destructor of constraint handler to free constraint handler data (called when SCIP is exiting)
Definition at line 2928 of file cons_optcumulative.c.
References assert(), conshdlrdataFree(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconshdlrSetData().
|
static |
presolving initialization method of constraint handler (called when presolving is about to begin)
Definition at line 2953 of file cons_optcumulative.c.
References assert(), c, CONSHDLR_NAME, NULL, removeIrrelevantJobs(), SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPfindHeur().
|
static |
solving process deinitialization method of constraint handler (called before branch and bound process data is freed)
Definition at line 2994 of file cons_optcumulative.c.
References assert(), c, NULL, SCIP_CALL, SCIP_OKAY, SCIPconsGetData(), and SCIPreleaseRow().
|
static |
frees specific constraint data
Definition at line 3020 of file cons_optcumulative.c.
References assert(), consdataFree(), CONSHDLR_NAME, dropAllEvents(), NULL, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), and SCIPvarIsTransformed().
|
static |
transforms constraint data into data belonging to the transformed problem
Definition at line 3049 of file cons_optcumulative.c.
References assert(), catchAllEvents(), consdataCreate(), NULL, SCIP_CALL, SCIP_OKAY, SCIP_STAGE_TRANSFORMING, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateCons(), SCIPdebugMessage, and SCIPgetStage().
|
static |
LP initialization method of constraint handler
Definition at line 3097 of file cons_optcumulative.c.
References addRelaxation(), assert(), c, cutoff, FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPconshdlrGetData(), and SCIPconsIsInitial().
|
static |
separation method of constraint handler for LP solutions
Definition at line 3124 of file cons_optcumulative.c.
References addRelaxation(), assert(), c, cutoff, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SEPARATED, and SCIPconshdlrGetData().
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 3163 of file cons_optcumulative.c.
References assert(), c, CONSHDLR_NAME, enfopsCons(), FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCurrentSol(), SCIPdebugMessage, SCIPfreeSol(), SCIPheurPassSolTrySol(), SCIPprintSol(), and TRUE.
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 3234 of file cons_optcumulative.c.
References assert(), c, CONSHDLR_NAME, enfopsCons(), FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_CONSADDED, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconshdlrGetData(), SCIPconshdlrGetName(), SCIPcreateCurrentSol(), SCIPdebugMessage, SCIPfreeSol(), SCIPheurPassSolTrySol(), and TRUE.
|
static |
feasibility check method of constraint handler for integral solutions
Definition at line 3290 of file cons_optcumulative.c.
References assert(), c, checkCons(), CONSHDLR_NAME, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_FEASIBLE, SCIP_INFEASIBLE, SCIP_OKAY, SCIPconshdlrGetName(), and sol.
|
static |
domain propagation method of constraint handler
Definition at line 3318 of file cons_optcumulative.c.
References applyZeroFixings(), assert(), c, checkRedundancy(), cutoff, FALSE, NULL, propagateCons(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_REDUCEDDOM, SCIPconshdlrGetData(), SCIPconsIsDeleted(), SCIPdebugMessage, SCIPincConsAge(), SCIPinProbing(), SCIPresetConsAge(), TRUE, and upgradeCons().
|
static |
presolving method of constraint handler
Definition at line 3417 of file cons_optcumulative.c.
References applyZeroFixings(), assert(), c, cutoff, detectImplications(), FALSE, NULL, nvars, presolveCumulativeCondition(), propagateCons(), result, SCIP_Bool, SCIP_CALL, SCIP_CUTOFF, SCIP_DIDNOTFIND, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_SUCCESS, SCIPaddCons(), SCIPconsGetData(), SCIPconsGetName(), SCIPconsIsChecked(), SCIPconsIsDynamic(), SCIPconsIsEnforced(), SCIPconsIsInitial(), SCIPconsIsLocal(), SCIPconsIsModifiable(), SCIPconsIsPropagated(), SCIPconsIsRemovable(), SCIPconsIsSeparated(), SCIPconsIsStickingAtNode(), SCIPcreateConsOptcumulative(), SCIPdebugMessage, SCIPdelCons(), SCIPinProbing(), SCIPnormalizeCumulativeCondition(), SCIPreleaseCons(), SCIPsnprintf(), SCIPsplitCumulativeCondition(), TRUE, and upgradeCons().
|
static |
propagation conflict resolving method of constraint handler
Definition at line 3587 of file cons_optcumulative.c.
References assert(), BMSclearMemoryArray, FALSE, NULL, nvars, result, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_OKAY, SCIP_SUCCESS, SCIPaddConflictBinvar(), SCIPaddConflictLb(), SCIPaddConflictUb(), SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPconshdlrGetData(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPrespropCumulativeCondition(), SCIPvarGetLbAtIndex(), TRUE, and vars.
|
static |
variable rounding lock method of constraint handler
Definition at line 3699 of file cons_optcumulative.c.
References assert(), NULL, SCIP_CALL, SCIP_LOCKTYPE_MODEL, SCIP_OKAY, SCIPaddVarLocksType(), SCIPconsGetData(), and vars.
|
static |
constraint display method of constraint handler
Definition at line 3760 of file cons_optcumulative.c.
References assert(), consdataPrint(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPconsGetData().
|
static |
constraint copying method of constraint handler
Definition at line 3773 of file cons_optcumulative.c.
References assert(), FALSE, NULL, nvars, propagate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPallocBufferArray, SCIPconsGetData(), SCIPconsGetName(), SCIPcreateConsOptcumulative(), SCIPfreeBufferArray, SCIPgetVarCopy(), TRUE, valid, and vars.
|
static |
constraint parsing method of constraint handler
Definition at line 3836 of file cons_optcumulative.c.
References assert(), NULL, nvars, propagate, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateConsOptcumulative(), SCIPdebugMsg, SCIPfreeBufferArray, SCIPparseVarName(), SCIPsetHmaxOptcumulative(), SCIPsetHminOptcumulative(), SCIPstrCopySection(), SCIPstrToRealValue(), SCIPvarGetName(), TRUE, var, and vars.
|
static |
Definition at line 3945 of file cons_optcumulative.c.
References assert(), EVENTHDLR_BINVARS_NAME, FALSE, NULL, SCIP_EVENTTYPE_GLBCHANGED, SCIP_EVENTTYPE_GUBCHANGED, SCIP_EVENTTYPE_LBRELAXED, SCIP_EVENTTYPE_LBTIGHTENED, SCIP_EVENTTYPE_UBRELAXED, SCIP_EVENTTYPE_UBTIGHTENED, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPeventGetType(), SCIPeventhdlrGetName(), and SCIPinProbing().
|
static |
Definition at line 3994 of file cons_optcumulative.c.
References assert(), EVENTHDLR_INTVARS_NAME, FALSE, NULL, SCIP_OKAY, SCIPeventhdlrGetName(), and SCIPinProbing().
SCIP_RETCODE SCIPincludeConshdlrOptcumulative | ( | SCIP * | scip | ) |
creates the handler for optcumulative constraints and includes it in SCIP
scip | SCIP data structure |
Definition at line 4024 of file cons_optcumulative.c.
References consActiveOptcumulative, consDeactiveOptcumulative, consDelvarsOptcumulative, consDisableOptcumulative, consEnableOptcumulative, consEnforelaxOptcomulative, consExitOptcumulative, consExitpreOptcumulative, 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(), consInitOptcumulative, consInitsolOptcumulative, consSepasolOptcumulative, DEFAULT_CONFLICTANALYSIS, DEFAULT_INTERVALRELAX, DEFAULT_ROWRELAX, EVENTHDLR_BINVARS_DESC, EVENTHDLR_BINVARS_NAME, EVENTHDLR_INTVARS_DESC, EVENTHDLR_INTVARS_NAME, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPaddBoolParam(), SCIPincludeConshdlrBasic(), SCIPincludeEventhdlrBasic(), SCIPsetConshdlrActive(), SCIPsetConshdlrCopy(), SCIPsetConshdlrDelete(), SCIPsetConshdlrDelvars(), SCIPsetConshdlrDisable(), SCIPsetConshdlrEnable(), SCIPsetConshdlrEnforelax(), SCIPsetConshdlrExit(), SCIPsetConshdlrExitpre(), SCIPsetConshdlrExitsol(), SCIPsetConshdlrFree(), SCIPsetConshdlrInit(), SCIPsetConshdlrInitlp(), SCIPsetConshdlrInitpre(), SCIPsetConshdlrInitsol(), SCIPsetConshdlrParse(), SCIPsetConshdlrPresol(), SCIPsetConshdlrPrint(), SCIPsetConshdlrProp(), SCIPsetConshdlrResprop(), SCIPsetConshdlrSepa(), and SCIPsetConshdlrTrans().
Referenced by runShell(), and SCIP_DECL_CONSHDLRCOPY().
SCIP_RETCODE SCIPcreateConsOptcumulative | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
SCIP_VAR ** | vars, | ||
SCIP_VAR ** | binvars, | ||
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 optcumulative constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nvars | number of variables (jobs) |
vars | array of integer variable which corresponds to starting times for a job |
binvars | array of variable representing if the job has to be processed on this machine |
durations | array containing corresponding durations |
demands | array containing corresponding demands |
capacity | available cumulative capacity |
initial | should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. |
separate | should the constraint be separated during LP processing? Usually set to TRUE. |
enforce | should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. |
check | should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. |
propagate | should the constraint be propagated during node processing? Usually set to TRUE. |
local | is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. |
modifiable | is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. |
dynamic | is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are seperated as constraints. |
removable | should 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'. |
stickingatnode | should 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 4098 of file cons_optcumulative.c.
References assert(), catchAllEvents(), consdataCreate(), CONSHDLR_NAME, FALSE, NULL, nvars, propagate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIP_STAGE_PROBLEM, SCIPconshdlrGetData(), SCIPcreateCons(), SCIPerrorMessage, SCIPfindConshdlr(), SCIPgetStage(), and vars.
Referenced by createCipFormulation(), createMipCpFormulation(), SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSPARSE(), and SCIP_DECL_CONSPRESOL().
SCIP_RETCODE SCIPsetHminOptcumulative | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | hmin ) |
set the left bound of the time axis to be considered (including hmin)
scip | SCIP data structure |
cons | constraint data |
hmin | left bound of time axis to be considered |
Definition at line 4177 of file cons_optcumulative.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIP_DECL_CONSPARSE().
returns the left bound of the time axis to be considered
scip | SCIP data structure |
cons | constraint |
Definition at line 4201 of file cons_optcumulative.c.
References assert(), CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
SCIP_RETCODE SCIPsetHmaxOptcumulative | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | hmax ) |
set the right bound of the time axis to be considered (not including hmax)
scip | SCIP data structure |
cons | constraint data |
hmax | right bound of time axis to be considered |
Definition at line 4221 of file cons_optcumulative.c.
References assert(), CONSHDLR_NAME, NULL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.
Referenced by SCIP_DECL_CONSPARSE().
returns the right bound of the time axis to be considered
scip | SCIP data structure |
cons | constraint |
Definition at line 4244 of file cons_optcumulative.c.
References assert(), CONSHDLR_NAME, NULL, SCIPABORT, SCIPconsGetData(), SCIPconsGetHdlr(), SCIPconshdlrGetName(), and SCIPerrorMessage.