Overview | Group | Tree | Graph | Index | Concepts |
Description |
Breaks Enforcement |
Capacity Enforcement |
Precedence Enforcement |
Sequence Enforcement |
Transition Time Enforcement |
Duration Enforcement |
There are two ways for the Scheduler extractor to determine which global resource constraint is implicitly added to the Solver: the content of the model, or the enforcement level parameter. This section discusses details of the enforcement level by parameters. For related information, see Adding Global Resource Constraints from the Scheduler Model.
An enforcement level is related to some semantic capability of the resource such as having a finite capacity or a finite set of states, or enforcing a total order on the activities.
Scheduler offers
a set of enforcement levels in the parameter class IloResourceParam
. Refer to the enumeration
IloEnforcementLevel
for more
information.
IloEnforcementLevel IloResourceParam::getBreaksEnforcement() const; IloEnforcementLevel IloResourceParam::getCapacityEnforcement() const; IloEnforcementLevel IloResourceParam::getPrecedenceEnforcement() const; IloEnforcementLevel IloResourceParam::getSequenceEnforcement() const; IloEnforcementLevel IloResourceParam::getTransitionTimeEnforcement() const;
The notion of resource enforcement is interpreted in the extraction as the addition of one or several global constraints.
Each type of enforcement level can be ignored (for example, IloResourceParam::ignoreCapacityConstraints
).
Ignoring an enforcement level is interpreted by the Scheduler
extractor as a relaxation of the related global constraint, which is
then not posted.
Each class of resource has its own default (value IloBasic
) for each type of enforcement
level. This default is fixed in Scheduler and corresponds to the most
common usage of the resource.
This parametrization is very important because the pruning
algorithms have very different performance levels. The most effective
algorithms are also the most time consuming. For example, the
timetable constraint algorithm is, on average, linear in the number of
activities, the edge finder level 1
is quadratic on
average, and, at worst, the disjunctive constraint is somewhere
in-between.
The breaks enforcement is interpreted with the break constraint by the Scheduler extractor. There is only one pruning algorithm available in the Scheduler Engine, therefore, the enforcement levels have no effect (except when the break constraints are ignored, in which case no enforcement is done). The break enforcement corresponds to a call to the function:
void IlcResource::setBreakList(IlcBreakList bl);
All levels for all resources are extracted as posting the breaks
constraint if the interval list of the Scheduler resource is not empty
and the ignoreBreaksConstraint
is IloFalse
.
The capacity enforcement is related to the main global constraint for a resource class. It corresponds to the maximal and minimal capacity constraints for a discrete resource, the maximal and minimal energy for an energy resource, the maximal and minimal content for a reservoir, and the possible set of states and must-be-in-use status for a state resource.
The Scheduler extractor has five sets of algorithms with which to interpret the capacity enforcement level: the timetable constraint, the light precedence graph constraint, the disjunctive constraint, the edge finder, and the balance constraint. These constraints are expressed with the corresponding functions:
IlcConstraint IlcCapResource::makeTimetableConstraint(); IlcConstraint IlcUnaryResource::makeLightPrecedenceGraphConstraint(); IlcConstraint IlcCapResource::makeDisjunctiveConstraint(); void IlcDiscreteResource::setEdgeFinder(IlcInt level) IlcConstraint IlcCapResource::makeBalanceConstraint();
The following table lists the enforcement levels for the various resources and their corresponding capacity enforcement. Default values are in bold.
Capacity Enforcement Level | Constraint Algorithm | |
---|---|---|
For Discrete Resources: | ||
IloLow, IloMediumLow, IloBasic | Timetable | |
IloMediumHigh | Timetable +Disjunctive | |
IloHigh | Timetable + Disjunctive + Edge finder (1) | |
IloExtended | Timetable + Disjunctive + Edge finder (1) + Balance | |
For Unary Resources: | ||
IloLow | Timetable | |
IloMediumLow | Light Precedence Graph | |
IloBasic | Light Precedence Graph + Disjunctive | |
IloMediumHigh | Light Precedence Graph + Disjunctive + Edge finder (1) | |
IloHigh | Light Precedence Graph + Disjunctive + Edge finder (2) | |
IloExtended | Light Precedence Graph + Disjunctive + Edge finder (2) + Balance | |
For Discrete Energy and Continuous Reservoir: | ||
All levels | Timetable | |
For Reservoir: | ||
IloLow, IloMediumLow , IloBasic,
IloMediumHigh | Timetable | |
IloHigh, IloExtended | Timetable + Balance | |
For State Resources: | ||
IloLow, IloMediumLow, IloBasic | Timetable | |
IloMediumHigh, IloHigh, IloExtended | Timetable + Disjunctive |
The precedence enforcement is related to the effort of the solver in analyzing the precedence relations between resource constraints on a resource. It is interpreted by the Scheduler extractor as the precedence graph constraint. For some classes of resources, namely the discrete and unary resources, specific algorithms can be triggered dealing with both the capacity limitations and the precedence graph knowledge. The precedence enforcement functions are:
IlcConstraint IlcResource::makePrecedenceGraphConstraint(); void IlcDiscreteResource::setPrecedencePropagation(IlcInt level = 1);
Note that when the capacity constraint is set to be ignored, the precedence propagation levels are ineffectual.
Interpretation of Precedence Enforcement Levels
Precedence Enforcement Level | Constraint Algorithm |
---|---|
For Discrete and Unary Resources: | |
IloLow, IloMediumLow, IloBasic | No global constraint |
IloMediumHigh | Precedence Graph |
IloHigh | Precedence Graph + Level 1 |
IloExtended | Precedence Graph + Level 2 |
For Discrete Energy, Discrete and Continuous Reservoirs, and State Resource: | |
IloLow, IloMediumLow, IloBasic | No global constraint |
IloMediumHigh, IloHigh, IloExtended | Precedence Graph |
A global schedule precedence graph (see the member function IlcSchedule::makePrecedenceGraphConstraint
)
is created when the enforcement level of the scheduler environment is set to a value
IloMediumHigh
or higher. See the member function IloSchedulerEnv::setPrecedenceEnforcement
.
Sequence enforcement is the way to model the fact that the execution of some activities must be synchronized, and that a cost may arise when transitioning between activities. This enforcement only applies to unary resources, and requires either the precedence graph constraint or the following sequence constraint. These constraints are expressed with the corresponding functions:
IlcConstraint IlcUnaryResource::makeSequenceConstraint(); IlcConstraint IlcUnaryResource::makePrecedenceGraph();
Interpretation of Sequence Enforcement Levels
Sequence Enforcement Level | Constraint Algorithm |
---|---|
For Unary Resources: | |
IloLow, IloMediumLow, IloBasic | No global constraint |
IloMediumHigh | Precedence Graph |
IloHigh, IloExtended | Sequence Constraint |
For all other resource classes: | |
Does not apply. |
The transition time enforcement is related to the effort of the solver in enforcing the transition times between activities processed on a given resource.
The Scheduler extractor has three sets of algorithms with which to interpret the transition time enforcement level: the type timetable constraint, the disjunctive constraint and the precedence graph constraint.
These constraints are expressed with the corresponding functions:
IlcConstraint IlcResource::makeTypeTimetableConstraint(); IlcConstraint IlcDiscreteResource::makeDisjunctiveConstraint(); IlcConstraint IlcResource::makePrecedenceConstraint();
The following table lists the enforcement levels for the various resources and their corresponding transition time enforcement. Default values are in bold.
Interpretation of Transition Time Enforcement Levels
Transition Time Enforcement Level | Constraint Algorithm |
---|---|
For Unary Resources: | |
IloLow, IloMediumLow, IloBasic | Light Precedence Graph (1) |
IloMediumHigh, IloHigh, IloExtended | Disjunctive Constraint (4) |
For State Resources: | |
IloLow, IloMediumLow, IloBasic | Type Timetable (2) (3) |
IloMediumHigh, IloHigh, IloExtended | Disjunctive Constraint (4) |
For all other resource classes: | |
IloLow, IloMediumLow, IloBasic, IloMediumHigh, IloHigh, IloExtended | Type Timetable (5) |
Note the following additions or exceptions to the interpretation described in the table.
ILOTRANSITIONTIMEOBJECT0
,
the Disjunctive Constraint is used instead of the Type Timetable Constraint,
as the Type Timetable Constraint is not able to enforce such a transition time objectIloResource::ignoreCapacityConstraints
),
then the Precedence Graph Constraint is used instead of the Disjunctive Constraint,
as posting the Disjunctive Constraint would also enforce capacity constraints.ILOTRANSITIONTIMEOBJECT0
.
In that case, the Precedence Graph Constraint is used instead.The duration enforcement is related to the effort of the solver in enforcing propagation on the duration variable of activities. The Scheduler extractor has one way to enforce a stronger propagation on those variables than the default propagation thanks to the functions:
The following table lists the enforcement levels for the various resources and their corresponding duration enforcement. Default values are in bold.
Duration Enforcement Level | Constraint Algorithm |
---|---|
For Discrete and Discrete Energy Resources: | |
IloLow, IloMediumLow, IloBasic | No global constraint |
IloMediumHigh, IloHigh, IloExtended | Extra timetable propagation |
For all other resource classes: | |
IloLow, IloMediumLow, IloBasic, IloMediumHigh, IloHigh, IloExtended | No global constraint |