Expressions on interval variables

Integer and numerical expressions are available to access or evaluate different attributes of an interval variable.

These expressions can be used, for example, to define a term for the cost function or to connect interval variables to integer and floating point expressions.

The integer expressions are startOf, endOf, lengthOf, and sizeOf and they provide access to the different attributes of an interval variable. Special care must be taken for optional intervals, as an integer value dval must be specified which represents the value of the expression when the interval is absent. If this value is omitted, it is supposed to be 0. For the syntax of integer expressions, see endOf, lengthOf, sizeOf, and startOf in the OPL Language Quick Reference.

The numerical expressions are startEval, endEval, lengthEval, and sizeEval, and they allow evaluation of a piecewise linear function on a given bound of an interval. As with integer expressions, in the case of optional intervals an integer value dval must be specified which represents the value of the expression when the interval is absent. If this value is omitted, it is supposed to be 0. For the syntax and examples of the use of a numerical expression, see endEval, lengthEval, sizeEval, and startEval in the OPL Language Quick Reference.

Let a_underscoredenote a fixed interval variable. The semantics of these expressions is shown in the table.

int_var4