ILOG CPLEX 11.0 User's Manual > Advanced Programming Techniques > User-Cut and Lazy-Constraint Pools > Adding User Cuts and Lazy Constraints > Reading and Writing LP Files

User cuts and lazy constraints may also be specified in LP-format files, and so may be read:

When CPLEX writes LP-format files, user cuts and lazy constraints added through their respective add routines or read from LP format files will be included in the output files along with their names (if any).

General Syntax

The general syntax rules for LP format given in the reference manual ILOG CPLEX File Formats apply to user cuts and lazy constraints.

These sections, and the ordinary constraints section preceded by the keywords SUBJECT TO, can appear in any order and can be present multiple times, as long as they are placed after the objective function section and before any of the keywords BOUNDS, GENERALS, BINARIES, SEMI-CONTINUOUS or END.

Example

Here is an example of an LP file containing ordinary constraints and lazy constraints.

Maximize
 obj: 12 x1 + 5 x2 + 15 x3 + 10 x4
Subject To
 c1: 5 x1 + x2 + 9 x3 + 12 x4 <= 15
Lazy Constraints
 l1: 2 x1 + 3 x2 + 4 x3 + x4 <= 10
 l2: 3 x1 + 2 x2 + 4 x3 + 10 x4 <= 8
Bounds
 0 <= x1 <= 5
 0 <= x2 <= 5
 0 <= x3 <= 5
 0 <= x4 <= 5
Generals
 x1  x2  x3  x4
End  

ILOG CPLEX stores user cuts and lazy constraints in memory separately from ordinary constraints.