30.01.2015 Views

ILOG CPLEX C++ API 9.0 Reference Manual

ILOG CPLEX C++ API 9.0 Reference Manual

ILOG CPLEX C++ API 9.0 Reference Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IloCplex::VariableSelect<br />

Group optim.cplex.cpp.piecewiselinear<br />

The <strong>API</strong> of <strong>ILOG</strong> <strong>CPLEX</strong> Piecewise Linear Formulations for users of <strong>C++</strong>.<br />

IloCplex::PWLFormulation<br />

Enumerations Summary<br />

Description<br />

Piecewise Linearity in <strong>ILOG</strong> <strong>CPLEX</strong><br />

Some problems are most naturally represented by constraints over functions that are<br />

not purely linear but consist of linear segments. Such functions are sometimes known<br />

as piecewise linear.<br />

How to Define a Piecewise Linear Function<br />

To define a piecewise linear function in Concert Technology, you need these<br />

components:<br />

◆ the variable of the piecewise linear function;<br />

◆ the breakpoints of the piecewise linear function;<br />

◆ the slope of each segment (that is, the rate of increase or decrease of the function<br />

between two breakpoints);<br />

◆ the geometric coordinates of at least one point of the function.<br />

In other words, for a piecewise linear function of n breakpoints, you need to know n+1<br />

slopes. Typically, the breakpoints of a piecewise linear function are specified as an<br />

array of numeric values. The slopes of its segments are indicated as an array of<br />

numeric values as well. The geometric coordinates of at least one point of the function<br />

must also be specified. Then in Concert Technology, those details are brought together<br />

in an instance of the class IloPiecewiseLinear.<br />

Another way to specify a piecewise linear function is to give the slope of the first<br />

segment, two arrays for the coordinates of the breakpoints, and the slope of the last<br />

segment.<br />

For examples of these ways of defining a piecewise linear function, see this topic in the<br />

<strong>ILOG</strong> <strong>CPLEX</strong> User's <strong>Manual</strong>.<br />

Discontinuous Piecewise Linear Functions<br />

Intuitively, in a continuous piecewise linear function, the endpoint of one segment has<br />

the same coordinates as the initial point of the next segment. There are piecewise<br />

linear functions, however, where two consecutive breakpoints may have the same x<br />

<strong>ILOG</strong> <strong>CPLEX</strong> <strong>C++</strong> <strong>API</strong> <strong>9.0</strong> REFERENCE M ANUAL 228

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!