4.2.2.10. Scheduling constraints

In this section: alternative, cumulative, cumulatives, disjunctive, disjunctive_strict, span.

alternative

predicate alternative(var opt int: span_start,
                      var int: span_duration,
                      array [int] of var opt int: start,
                      array [int] of var int: duration)

Alternative constraint for optional tasks. The task with start time span_start and duration span_duration spans the optional tasks with start times start[i] and duration duration[i]), and at most one of those tasks can occur.

cumulative

1.  predicate cumulative(array [$$E] of var int: start,
                         array [$$E] of var int: duration,
                         array [$$E] of var int: resource,
                         var int: capacity)

2.  predicate cumulative(array [$$E] of var opt int: start,
                         array [$$E] of var int: duration,
                         array [$$E] of var int: resource,
                         var int: capacity)
  1. Requires that a set of tasks given by start times start, duration duration, and resource requirements resource, never require more than a global resource bound capacity at any one time.

    Assumptions:

    • forall i, duration[i] >= 0 and resource[i] >= 0

  2. Requires that a set of tasks given by start times start, duration duration, and resource requirements resource, never require more than a global resource bound capacity at any one time. Start times are optional variables, so that absent tasks do not need to be scheduled.

    Assumptions:

    • forall i, duration[i] >= 0 and resource[i] >= 0

cumulatives

1.  predicate cumulatives(array [$$E] of var int: start,
                          array [$$E] of var int: duration,
                          array [$$E] of var int: resource,
                          array [$$E] of var $$M: machine,
                          array [$$M] of var int: upper_bound)

2.  predicate cumulatives(array [$$E] of var int: start,
                          array [$$E] of var int: duration,
                          array [$$E] of var int: resource,
                          array [$$E] of var $$M: machine,
                          array [$$M] of var int: lower_bound)

3.  predicate cumulatives(array [$$E] of var opt int: start,
                          array [$$E] of var int: duration,
                          array [$$E] of var int: resource,
                          array [$$E] of var $$M: machine,
                          array [$$M] of var int: upper_bound)

4.  predicate cumulatives(array [$$E] of var opt int: start,
                          array [$$E] of var int: duration,
                          array [$$E] of var int: resource,
                          array [$$E] of var $$M: machine,
                          array [$$M] of var int: lower_bound)
  1. We have a set of tasks given by start times start, duration duration, resource requirements resource, and machine machine. We also have a set of machine given by resource capacities upper_bound. The constraint requires that forall i, machine[i] is in the index set of upper_bound and that for each machine j and time instant t, either no task assigned to j executes at t, or the total resource requirement of such tasks is not greater than the given bound upper_bound[j]. Resource requirements can be positive (for consumption) or negative (for production).

    Assumptions:

    • forall i, duration[i] >= 0

  2. We have a set of tasks given by start times start, duration duration, resource requirements resource, and machine machine. We also have a set of machine given by resource minima lower_bound. The constraint requires that forall i, machine[i] is in the index set of lower_bound and that for each machine j and time instant t, either no task assigned to j executes at t, or the total resource requirement of such tasks is not less than the given bound lower_bound[j]. Resource requirements can be positive (for consumption) or negative (for production).

    Assumptions:

    • forall i, duration[i] >= 0

  3. We have a set of optional tasks given by start times start, duration duration, resource requirements resource, and machine machine. We also have a set of machine given by resource capacities upper_bound. The constraint requires that forall i, machine[i] is in the index set of upper_bound and that for each machine j and time instant t, either no task assigned to j executes at t, or the total resource requirement of such tasks is not greater than the given bound upper_bound[j]. Resource requirements can be positive (for consumption) or negative (for production).

    Assumptions:

    • forall i, duration[i] >= 0

  4. We have a set of optional tasks given by start times start, duration duration, resource requirements resource, and machine machine. We also have a set of machine given by resource minima lower_bound. The constraint requires that forall i, machine[i] is in the index set of lower_bound and that for each machine j and time instant t, either no task assigned to j executes at t, or the total resource requirement of such tasks is not less than the given bound lower_bound[j]. Resource requirements can be positive (for consumption) or negative (for production).

    Assumptions:

    • forall i, duration[i] >= 0

disjunctive

1.  predicate disjunctive(array [$$T] of var int: start,
                          array [$$T] of var int: duration)

2.  predicate disjunctive(array [$$T] of var opt int: start,
                          array [$$T] of var int: duration)
  1. Requires that a set of tasks given by start times start and duration duration do not overlap in time. Tasks with duration 0 can be scheduled at any time, even in the middle of other tasks.

    Assumptions:

    • forall i, duration[i] >= 0

  2. Requires that a set of tasks given by start times start and duration duration do not overlap in time. Tasks with duration 0 can be scheduled at any time, even in the middle of other tasks. Start times are optional variables, so that absent tasks do not need to be scheduled.

    Assumptions:

    • forall i, duration[i] >= 0

disjunctive_strict

1.  predicate disjunctive_strict(array [$$T] of var int: start,
                                 array [$$T] of var int: duration)

2.  predicate disjunctive_strict(array [$$T] of var opt int: start,
                                 array [$$T] of var int: duration)
  1. Requires that a set of tasks given by start times start and duration duration do not overlap in time. Tasks with duration 0 CANNOT be scheduled at any time, but only when no other task is running.

    Assumptions:

    • forall i, duration[i] >= 0

  2. Requires that a set of tasks given by start times start and duration duration do not overlap in time. Tasks with duration 0 CANNOT be scheduled at any time, but only when no other task is running. Start times are optional variables, so that absent tasks do not need to be scheduled.

    Assumptions:

    • forall i, duration[i] >= 0

span

predicate span(var opt int: span_start,
               var int: span_duration,
               array [$$E] of var opt int: start,
               array [$$E] of var int: duration)

Span constraint for optional tasks. Task (span_start,span_duration) spans the optional tasks (start[i],duration[i]) in the array arguments.