lengthOfPrev

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

Purpose

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

context type
Model files (.mod)
dexpr int

Syntax

dexpr int l = lengthOfPrev(p, a ,pVal [,absVal]);

where:
int pVal;
int absVal;

Description

This function returns an integer expression that represents the length 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 nVal. 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.