Piecewise linear functions

Piecewise linear functions are typically used in scheduling models to model a known function of time.

In CP Optimizer, piecewise linear functions are typically used in modeling a known function of time, for instance the cost that is incurred for completing an activity after a known date. A piecewise linear function is a function defined on an interval [xmin, xmax) which is partitioned into segments such that over each segment, the function is linear.

When two consecutive segments of the function are colinear, these segments are merged so that the function is always represented with the minimal number of segments.

In the C++ API of CP Optimizer, the interface IloNumToNumSegmentFunction represents piecewise linear functions.

In the Java™ API of CP Optimizer, the class IloNumToNumSegmentFunction represents piecewise linear functions.

In the C# API of CP Optimizer, the interface INumToNumSegmentFunction represents piecewise linear functions.

Note:

Piecewise linear function

A piecewise linear function is a function that is defined on an interval that is partitioned into segments such that over each segment, the function is linear.

Each interval [x1, x2) on which the function is linear is called a segment.

When two consecutive segments of the function are colinear, these segments are merged so that the function is always represented with the minimal number of segments.