sizeOf

OPL integer expression (scheduling) to access the size of an interval

context type
Model files (.mod)
dexpr int

Syntax

dexpr int sizeOf (a[,dval]);
 
Where:

dvar interval a;
int dval;

Description

This integer expression is used to access the size of an interval. Note that the expression lengthOf is also available. Interval size, length, and intensity are always related by the following formula: size multiplied by granularity is equal to the integral of the intensity over the length of the interval. Intensity cannot exceed 100%, so interval size can never exceed interval length.

Special care must be taken for optional intervals: in this case an integer value dval must be specified, to represent the value of the expression when the interval is absent. If this value is omitted, it is considered to be 0.