Piecewise linear (PWL) in the Interactive Optimizer
The Interactive Optimizer supports piecewise linear (PWL) expressions.
The Interactive Optimizer supports piecewise linear (PWL) constraints in the usual ways that it supports other constraints of your model. Whether you read your model from a formatted file (such as LP or MPS, for example), or from a binary SAV file, or whether you enter your model with the add command, you must declare the breakpoints of any piecewise linear constraints in increasing order of their x-coordinates, so that CPLEX can manipulate them as you intend.
Enter
As you enter your model, you can type your piecewise linear constraint (as you type other constraints of your model), and then press Enter from the keyboard.
Add
After you have entered a model in the Interactive Optimizer, you can also use the add command (as you would to add other constraints to your model).
Read
If you enter your model by reading a formatted file with the read command, you can take advantage of the PWL section of the LP or MPS file formats. For syntax of the PWL section in the LP file format, see Piecewise linear (PWL) constraints in LP file format. Likewise, for syntax of the PWL section in the MPS file format, see Piecewise linear (PWL) constraints in MPS files.