FRAMES NO FRAMES

Temporal Relations
PREVIOUS NEXT
Description
Temporal Constraints Between Activities
Temporal relations between resource constraints
Precedence Constraints On Activities vs. Precedence Relations On Resource Constraints
Description

Scheduler allows the posting of two kinds of temporal relations in the scheduling environment: temporal constraints (IloPrecedenceConstraint, IloTimeBoundConstraint) between activities of the environment, and temporal relations (precedence, sequence) between two resource constraints on the same resource.

Temporal Constraints Between Activities

Temporal constraints between activities are either instances of the class IloPrecedenceConstraint or instances of the class IloTimeBoundConstraint. Both classes are a subclass of the IBM® ILOG® Concert Technology class IloConstraint.

Precedence Constraints

Precedence constraints are instances of the class IloPrecedenceConstraint. They restrict the order of activities. They constrain an activity to start or end before, at, or after the start or end time of another activity.

Precedence constraints are created through member functions of the class IloActivity. Like all subclasses of IloConstraint, they must be added to the model to be considered in the search for solutions.

Precedence constraints involve the concept of delay. Delay is an amount of time (constant or variable) that must elapse between the two variables involved in the precedence constraint. If the delay is negative, it indicates the inverse of the maximal duration allowed to elapse between the two variables. In other words, endpoint2 can occur before endpoint1, but the difference between them cannot exceed -delay. See the following figure.

Precedence constraints between activities can be enforced in different ways by the scheduling algorithm. The member function IloResource::setPrecedenceEnforcement can be used to specify how much effort the scheduling algorithm must spend at enforcing precedence constraints between activities.

Time-Bound Constraints

Time-bound constraints are instances of the class IloTimeBoundConstraint. They constrain an activity to start or end before, at, or after a given time. They are created by a member function of IloActivity. Like all subclasses of IloConstraint, they must be added to the model to be considered in the search for solutions.

Temporal relations between resource constraints

Scheduler allows representation of two types of temporal relations between resource constraints on the same resource: precedence relations and sequencing relations. Note that unlike temporal constraints between activities, temporal relations between resource constraints are not objects, but relations expressed with member functions of the class IloResourceConstraint.

Before we describe in detail the different temporal relations between resource constraints, we need to introduce the concept of a contributing resource constraint.

In a model, a resource constraint rct is said to surely contribute if and only if it affects the availability of the resource. That is:

  • rct has been directly added to the model (not through a metaconstraint), and
  • the minimal processing time of the activity of rct is strictly greater than zero if the time extent of rct is IloFromStartToEnd, and
  • the minimal capacity required by rct is strictly greater than zero if rct is a capacity resource constraint.

In a model, a resource constraint rct is said to not possibly contribute if and only if it is sure that rct will not affect the availability of the resource. That is:

  • the opposite of rct has been directly added to the model (not through a metaconstraint), or
  • the processing time of the activity is equal to zero and the time extent of rct is IloFromStartToEnd, or
  • rct is a capacity resource constraint and the capacity required by rct is equal to zero.

Precedence Relations

A precedence relation is defined between two resource constraints with the member function setSuccessor().

rct1.setSuccessor(rct2) states that if rct1 and rct2 surely contribute to the model, then the activity of rct2 is constrained to execute after the activity of rct1 on the resource (that is, the start time of the activity of rct2 is greater than or equal to the end time of the activity of rct1).

Precedence relations between resource constraints can be enforced in different ways by the scheduling algorithm. The member function IloResource::setPrecedenceEnforcement can be used to specify how much effort the scheduling algorithm must spend at enforcing precedence relations between resource constraints.

Sequencing Relations

Sequencing relations are expressed with the member functions IloResourceConstraint::setNext, IloResourceConstraint::setSetup, IloResourceConstraint::setNotSetup, IloResourceConstraint::setNotNext, IloResourceConstraint::setTeardown and IloResourceConstraint::setNotTeardown.

rct1.setNext(rct2) states that if rct1 and rct2 surely contribute to the model, then no other resource constraint rct that surely contributes in the model can be executed between rct1 and rct2.

rct1.setNotNext(rct2) states that if rct1 and rct2 surely contribute to the model, then another resource constraint rct that surely contributes to the model must execute between rct1 and rct2.

rct.setSetup() states that if rct surely contributes to the model, then rct is the first resource constraint to execute on the resource.

rct.setNotSetup() states that if rct surely contributes to the model, then rct is not the first resource constraint to execute on the resource.

rct.setTeardown() states that if rct surely contributes to the model, then rct is the last resource constraint to execute on the resource.

rct.setNotTeardown() states that if rct surely contributes to the model, then rct is not the last resource constraint to execute on the resource.

Sequencing relations between resource constraints can be enforced in different ways by the scheduling algorithm. The member function IloResourceParam::setSequenceEnforcement can be used to specify how much effort the scheduling algorithm must spend at enforcing sequencing relations between resource constraints.

Precedence Constraints On Activities vs. Precedence Relations On Resource Constraints

This section answers the question: Should one use precedence constraints between activities, or precedence relations between resource constraints? This question arises because at first glance, a precedence constraint startsAfterEnd between two activities and a precedence relation setSuccessor between two resource constraints look very similar.

There are in fact three essential differences.

  1. Precedence relations between resource constraints have an effect on the start and end time of the corresponding activities only if the resource constraints surely contribute to the model, that is, if they affect for certain the availability of the resource. For example, a precedence relation between two resource constraints that requires a null quantity of the same discrete resource will not constrain the start and end time of the activities. From this point of view, a precedence relation between resource constraints rct1 and rct2 can be seen as a metaconstraint ( rct1 does not contribute or rct2 does not contribute or act2.startsAfterEnd(act1)). Precedence constraints between activities constrain the start and end time of activities regardless of which resource the activities require.
  2. A precedence constraint between two activities is a C++ object, whereas a precedence relation between two resource constraints is expressed simply by enforcing that relation on the resource. From this point of view, precedence relations between resource constraints are lighter than precedence constraints between activities. On the other hand, since precedence constraints between two activities are instances of IloConstraint, the constraints can be used in a metaconstraint. This is not possible for precedence relations between resource constraints.
  3. The formalism of precedence constraints between activities allows representation of some (constant or variable) delays between activities. This is not possible with precedence relations between resource constraints.

See Also

IloActivity, IloActivityConstraintsParam, IloPrecedenceConstraint, IloTimeBoundConstraint, IloResourceConstraint, IloResource, IloResourceParam.

PREVIOUS NEXT