size

OPL keyword (CP, scheduling) for defining interval size.

context
Model files (.mod)

Syntax

dvar interval a [size SZ | in SZMin .. SZMax]
                [intensity F]

Where:

int SZ;
int SZMin;
int SZMax;
stepFunction F;
0 <= SZ <= maxint/2 - 1
0 <= SZMin <= maxint/2 - 1
0 <= SZMax <= maxint/2 - 1

Description

You can specify an exact size for an interval, a size range for the interval, or leave the size unconstrained within the domain 0...maxint/2-1. Roughly, interval size equates to interval length as modified by interval intensity. In this way, interval size can be used as a measure of total work capacity of an interval.

Interval size, length, and intensity are always related by the following: size multiplied by granularity is equal to the integral of the intensity over the length of the interval. Intensity can not exceed 100%, so interval size can never exceed interval length.

Consider an interval one week in length. In this interval a worker works five full days, one half day, and has one day off; the intensity function would be 100% for five days, 50% for one day, and zero for the last day. The interval length is seven days and size equals 5.5 work days.

Note that the size is not defined for absent intervals. Although size is a CP keyword, it is still accepted as a CPLEX identifier.

Example

An interval variable with unconstrained size (in [0,maxint/2-1)):

dvar interval a;

An optional interval variable whose size 14 is modulated by an intensity function F:

dvar interval a optional size 14 intensity F;