typeOfPrev

An OPL function (scheduling) that returns the type of the previous interval in a given sequence.

Purpose

An OPL function (scheduling) that returns the type of the previous interval in a given sequence.

context type
Model files (.mod)
dexpr int

Syntax

dexpr int t = typeOfPrev (p, a ,pVal [,absVal]);

where:
int pVal;
int absVal;

Description

This function returns an integer expression that represents the type of the interval variable that is previous to interval a in sequence variable p. When interval a is present and is the first interval of sequence p, the function returns the constant integer value pVal. When interval a is absent, the function returns the constant integer value absVal. If the value absVal is omitted, it is considered to be 0.