Skip to main content
FRAMES NO FRAMES

Piecewise linear and stepwise functions in CP Optimizer
PREVIOUS NEXT
Piecewise linear functions
Stepwise functions
Piecewise linear functions

In CP Optimizer, piecewise linear functions are typically used to model a known function of time, such as the cost incurred for completing an activity after a known date t (see Expressions over Interval Variables).

A piecewise linear function  F(t) is defined by a tuple F = piecewise(S, T, t0, v0) where:

pwl_func.png

 

Stepwise functions

In CP Optimizer, stepwise functions are typically used to model the efficiency of a resource over time (see Intensity and size and forbidden values). A stepwise function is a special case of piecewise linear function where all slopes are equal to 0 and the domain and image of F are integer. A stepwise function F(t) is defined by a tuple F = stepwise(V, T) where:

sw_func.png

 

PREVIOUS NEXT