Namespace: ILOG.Concert
Assembly: oplall (in oplall.dll)
Syntax
Remarks
A cumul function expression is an expression whose value in a solution is a function from the set of integers to the set of non-negative integers. A cumul function expression represents the sum of individual contributions of intervals. A panel of elementary cumul function expressions is available to describe the individual contribution of an interval variable (or a fixed interval) to a cumul function expression:
- A pulse function is an elementary function defined by an interval variable (or a fixed interval) whose value is equal to 0 outside the interval and equal to a non-negative constant on the interval. This value is called the height of the pulse function. For instance the elementary function IPulse(a, 5) represents a pulse function of height 5. This function is equal to 0 before the start of interval variable a, to 5 between the start and the end of interval variable a and to 0 after the end of interval variable a. Several variants of pulse functions are available depending on the fact the interval is variable or fixed and whether the height is specified as a fixed integer or as a range of possible integer values.
- A step function is an elementary function defined by one of the end-points of an interval variable (its start or end) whose value is equal to 0 before this end-point and equal to a non-negative constant after the end-point. This value is called the height of the step function. For instance the elementary step function IStepAtStart(a, 3) represents a step function of height 3. This function is equal to 0 before the start of interval variable a and to 3 after the start of interval variable a. Several variants of step functions are available depending on which end-point of the interval variable is considered (start or end) and whether the height is specified as a fixed integer or as a range of possible integer values.
A cumul function expression is defined as the sum of the above elementary functions or their opposite. Several constraints over cumul function expressions are provided. These constraints allow restricting the possible values of the function over the complete horizon or over some fixed or variable interval:
- If f is a cumul function expression and max a non-negative integer the constraint f <= max states that function f must be everywhere lower than max.
- If f is a cumul function expression and min a non-negative integer the constraint min <= f states that function f must be everywhere greater than min.
- If f is a cumul function expression, a an interval variable and [min,max] a range of non-negative integers, the constraint IAlwaysIn(env,f,a,vmin,vmax) states that whenever interval variable a is present, the value of function f between the start and the end of interval a must belong to range [vmin,vmax]. Variants of this constraint are available to constrain a cumul function expression over a fixed interval.
For more information on cumul function expressions, see the concept Cumul Functions in the C++ Reference Manual.