The PLFit15.lng Model

Fit a piecewise linear function

View the model
Download the model

Fit a piecewise linear function of one variable to an arbitrary function, y = f(x). The objective is: minimize weighted sum of maximum error plus average error.
The original function is presented as a sequence of (x,y) pairs.
Having a piecewise linear approximation is useful if you want to model the problem with a Mixed Integer Linear Model, e.g., using SOS2 sets;

Keywords:

Piecewise Linear | SOS2 | Approximation | Linear Approximation | Graph | Chart |