last (scheduling)

OPL function (scheduling) to sequence interval variables

Purpose

OPL function (scheduling) to sequence interval variables. For the function regarding element position in a set, see last.

type
boolean

Syntax

last(p, a)

Where:

dvar interval a;
dvar sequence p;

Description

This function states that if interval a is present, it will be the last interval in the sequence p.

Note:
  • Unless a noOverlap constraint is applied to the sequence variable, the order of intervals in a sequence does not necessarily correspond to the order of the intervals in time.
  • This constraint cannot be used in a meta-constraint.