types

Associates a non-negative integer with each interval variable in a sequence.

Purpose

The keyword types is used to associate a non-negative integer (called the type of the interval variable) with each interval variable in a sequence.

context
Model files (.mod)

Syntax

dvar interval a[i in ...] ...;             // Interval variables
int T[i in ...] = ...;                     // Integer non-negative types

dvar sequence s in all(i in ...) a[i] types all(i in ...) T[i];

Description

The integer type is used in the form of a noOverlap constraint that uses a transition distance. The transition distance is modeled as a tuple set { <t1,t2,dmin> } that specifies a minimal distance between pairs of types (t1,t2). It states that if an interval a2 of type t2 is scheduled after an interval a1 of type t1 in the sequence, a distance of at least dmin must separate the end of a1 from the start of a2 (provided that a1 and a2 are present).

This could be written in OPL as:

tuple triplet { int t1; int t2; int dmin; };
{ triplet } tdistance = ...;

constraints {

  noOverlap(seq, tdistance);
}

The integer (non-negative) types specified in the sequence are used to index the transition distance matrix.