ILOG CPLEX .NET Reference Manual

IMPModeler.PiecewiseLinear Method (INumExpr, Double[], Double[], Double, Double)

Creates an expression node that represents a continuous or discontinuous piecewise linear function.

INumExpr PiecewiseLinear(
   INumExpr expr,
   double[] points,
   double[] slopes,
   double a,
   double fa
);

Parameters

expr
An expression indicating where to evaluate the piecewise linear function.
points
An array of breakpoints for the piecewise linear function.
slopes
An array of slopes for the piecewise linear function.
a
First coordinate of the anchor point of the piecewise linear function.
fa
Second coordinate of the anchor point of the piecewise linear function.

Return Value

A piecewise linear function of expr.

Remarks

The piecewise linear function is evaluated at expr and is defined by the remaining arguments. The array points contains the n breakpoints for i=1, ... , n-1. The array slopes contains the value of the slope for each piece defined by the breakpoints. The slope of the function for values less than points[0] is slopes[0]. Similarly, slopes[i] specifies the slope between points[i-1] and points[i]. Thus the array slope must have one more element than the array points.

By setting points[i-1] == points[i], you can represent a discontinuous piecewise linear function. In this case, the function will make a step of size slopes[i-1] at position points[i].

The values a and fa define the x and y coordinates of one point of the piecewise linear function. This point is referred to as the anchor point.

See Also

IMPModeler Interface | ILOG.Concert Namespace | IMPModeler.PiecewiseLinear Overload List