What is a piecewise linear function?
Defines a piecewise linear function.
Some problems are most naturally represented by constraints over functions that are not purely linear but consist of linear segments. Such functions are also known as piecewise linear. In this topic, a transportation example shows you various ways of stating and solving problems that lend themselves to a piecewise linear model. Before plunging into the problem itself, this section defines a few terms appearing in this discussion.
From a geometric point of view, Figure 1
shows a conventional piecewise linear function f(x) .
This particular function consists of four segments. If you consider
the function over four separate intervals, (-∞, 4) and [4, 5)
and [5, 7) and [7, ∞) , you see that f(x) is linear in each of those separate intervals.
For that reason, it is said to be piecewise linear. Within each of
those segments, the slope of the linear function is clearly constant,
though it is different between segments. The points where the slope
of the function changes are known as breakpoints. The piecewise linear
function in Figure 1 has three breakpoints.

Piecewise linear functions are often used to represent or to approximate nonlinear unary functions (that is, nonlinear functions of one variable). For example, piecewise linear functions frequently represent situations where costs vary with respect to quantity or gains vary over time.