FRAMES NO FRAMES

Resource Enforcement as Global Constraint Declaration
PREVIOUS NEXT
Description
Breaks Enforcement
Capacity Enforcement
Precedence Enforcement
Sequence Enforcement
Transition Time Enforcement
Duration Enforcement
Description

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.

Breaks Enforcement

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.

Capacity Enforcement

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(); 
Interpretation of Capacity Enforcement Levels

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, IloBasicTimetable
IloMediumHighTimetable +Disjunctive
IloHighTimetable + Disjunctive + Edge finder (1)
IloExtendedTimetable + Disjunctive + Edge finder (1) + Balance
For Unary Resources:
IloLowTimetable
IloMediumLowLight Precedence Graph
IloBasicLight Precedence Graph + Disjunctive
IloMediumHighLight Precedence Graph + Disjunctive + Edge finder (1)
IloHighLight Precedence Graph + Disjunctive + Edge finder (2)
IloExtendedLight Precedence Graph + Disjunctive + Edge finder (2) + Balance
For Discrete Energy and Continuous Reservoir:
All levels Timetable
For Reservoir:
IloLow, IloMediumLow, IloBasic, IloMediumHighTimetable
IloHigh, IloExtendedTimetable + Balance
For State Resources:
IloLow, IloMediumLow, IloBasicTimetable
IloMediumHigh, IloHigh, IloExtendedTimetable + Disjunctive
Precedence Enforcement

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, IloBasicNo global constraint
IloMediumHighPrecedence Graph
IloHighPrecedence Graph + Level 1
IloExtendedPrecedence Graph + Level 2
For Discrete Energy, Discrete and Continuous Reservoirs, and State Resource:
IloLow, IloMediumLow, IloBasicNo global constraint
IloMediumHigh, IloHigh, IloExtendedPrecedence 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

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, IloBasicNo global constraint
IloMediumHighPrecedence Graph
IloHigh, IloExtendedSequence Constraint
For all other resource classes:
Does not apply.
Transition Time Enforcement

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, IloBasicLight Precedence Graph (1)
IloMediumHigh, IloHigh, IloExtendedDisjunctive Constraint (4)
For State Resources:
IloLow, IloMediumLow, IloBasicType Timetable (2) (3)
IloMediumHigh, IloHigh, IloExtendedDisjunctive Constraint (4)
For all other resource classes:
IloLow, IloMediumLow, IloBasic, IloMediumHigh, IloHigh, IloExtendedType Timetable (5)

Note the following additions or exceptions to the interpretation described in the table.

  1. The Light Precedence Graph is a lighter version of the precedence graph constraint restricted to the management of rank information (ranked first or last, possible first or last).
  2. When the transition time on the state resource is a user defined transition time built with the macro 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 object
  3. When the capacity, the precedence or the sequence enforcement levels are so that a Disjunctive, a Precedence Graph or a Sequence Constraint is already defined on the state resource (see the previous sections Capacity Enforcement, Precedence Enforcement, and Sequence Enforcement), then the Type Timetable is not used as the Disjunctive or the Precedence Graph Constraint is sufficient to enforce transition times.
  4. When the capacity constraints are to be ignored on the resource (see the member function IloResource::ignoreCapacityConstraints), then the Precedence Graph Constraint is used instead of the Disjunctive Constraint, as posting the Disjunctive Constraint would also enforce capacity constraints.
  5. On discrete resources, discrete energy resources and reservoirs, the Type Timetable is used to enforce transition times except if the transition time on the resource is a user-defined transition time built with the macro ILOTRANSITIONTIMEOBJECT0. In that case, the Precedence Graph Constraint is used instead.
Duration Enforcement

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:

  1. void IlcDiscreteResource::setTimetablePropagation(IlcInt level=1L);
  2. void IlcDiscreteEnergy::setTimetablePropagation(IlcInt level=1L);

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, IloBasicNo global constraint
IloMediumHigh, IloHigh, IloExtendedExtra timetable propagation
For all other resource classes:
IloLow, IloMediumLow, IloBasic, IloMediumHigh, IloHigh, IloExtendedNo global constraint
PREVIOUS NEXT