FRAMES NO FRAMES

Disjunctive Constraint
PREVIOUS NEXT
Description
Creating a Disjunctive Constraint
Timetables Differ from Disjunctive Constraints
Using Timetables with Disjunctive Constraints: Performance Considerations
Description

The standard way of dealing with resource constraints in Scheduler Engine is to create a Timetable representing available capacity over time. In the case of discrete, unary, and state resources an alternative representation of capacity constraints is available. This alternative representation consists of posting a unique, global, disjunctive constraint that states that if the resource is used by two activities throughout two time intervals [ti1 ti2) and [tj1 tj2) and the activities are incompatible, (that is, they cannot be scheduled simultaneously), then either ti2 is less than or equal to tj1, or tj2 is less than or equal to ti1.

Creating a Disjunctive Constraint

To create such a unique, global, disjunctive constraint, use the member functions IlcDiscreteResource::makeDisjunctiveConstraint or IlcStateResource::makeDisjunctiveConstraint.

Timetables Differ from Disjunctive Constraints

Here are highlights of the differences between those two representations.

  • The disjunctive representation deals only with requiring activities: to specify that the resource is not available over a given time interval, the user must create a “fake” activity that requires the resource over that interval. The use of the disjunctive representation may therefore prove costly (in CPU-time and memory) if a large collection of “fake” activities is created.
  • The disjunctive representation is more CPU-time consuming, but the propagation of global disjunctive constraints may result in more precise time bounds than the propagation of the corresponding timetable constraints. In the context of a particular scheduling application, more CPU-time may be spent propagating the disjunctive constraints, but this extra propagation may result in a better exploration of the search space and, consequently, in a drastic improvement of the overall CPU-time.
  • When no "fake" activities are created, the disjunctive representation requires less memory than the timetable representation.
Using Timetables with Disjunctive Constraints: Performance Considerations

It is possible to use both of the two representations in the same application and for the same resource. In such a case, redundant constraint propagation is performed. A priori, the CPU-time increases, but the combined effect of:

  • The more effective propagation of the disjunctive constraint and
  • The removal of "fake" activities,

may, in the end, make the combined use of both representations a more viable approach than the use of either of them separately.

Implementation

Mathematically, the disjunctive constraint associated with a unary resource R implements the following relation: for any two activities A and B that require capacity(A) and capacity(B) units of R ( capacity(A) and capacity(B) can be Boolean variables) over two time intervals [start(A) end(A)) and [start(B) end(B)),

((end(A) + getTransitionTime(A, B) <= start(B))

  || (end(B) + getTransitionTime(B, A) <= start(A))

  || (end(A) - start(A) == 0)

  || (end(B) - start(B) == 0)

  || (capacity(A) == 0)

  || (capacity(B) == 0))

That disjunctive constraint is called global because the same constraint applies to every A and B.

See Also

Edge Finder, IlcDiscreteResource, IlcResource, IlcStateResource, IlcUnaryResource, Ranking , Timetable, Transition Time in Scheduler Engine.

PREVIOUS NEXT