| Overview | Group | Index | Concepts | 
This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.
The routine CPXaddlazyconstraints is used to add
 constraints to the list of constraints that should be added to the LP
 subproblem of a MIP optimization if they are violated. CPLEX handles
 addition of the constraints and makes sure that all integer solutions
 satisfy all the constraints. The constraints are added to those specified in
 prior calls to CPXaddlazyconstraints. 
Lazy constraints are constraints not specified in the constraint matrix of the MIP problem, but that must be not be violated in a solution. Using lazy constraints makes sense when there are a large number of constraints that must be satisfied at a solution, but are unlikely to be violated if they are left out.
The CPLEX parameter CPX_PARAM_REDUCE should be set to
 CPX_PREREDUCE_NOPRIMALORDUAL (0) or to
 CPX_PREREDUCE_PRIMALONLY (1) in order to turn off dual
 reductions.
Use CPXfreelazyconstraints to clear the list of lazy
 constraints.
The arguments of CPXaddlazyconstraints are the same as
 those of CPXaddrows, with the exception that new columns may
 not be specified, so there are no ccnt and colname
 arguments. Furthermore, unlike CPXaddrows,
 CPXaddlazyconstraints does not accept a NULL pointer for the
 array of righthand side values or senses.
Example
 status = CPXaddlazyconstraints (env, lp, cnt, nzcnt, rhs, sense,
                                 beg, ind, val, NULL);
 sense[i] | = 'L' | <= constraint | 
sense[i] | = 'E' | = constraint | 
sense[i] | = 'G' | >= constraint | 
| env | A pointer to the CPLEX environment as returned by   | 
| lp | A pointer to a CPLEX problem object as returned by   | 
| rcnt | An integer that indicates the number of new lazy constraints to be added.  | 
| nzcnt | An integer that indicates the number of nonzero constraint coefficients to be added to the constraint matrix. This specifies the length of the arrays   | 
| rhs | An array of length   | 
| sense | An array of length   | 
| rmatbeg | An array used with   | 
| rmatind | An array used with   | 
| rmatval | An array used with   | 
| rowname | An array containing pointers to character strings that represent the names of the lazy constraints. May be NULL, in which case the new lazy constraints are assigned default names if the lazy constraints already resident in the CPLEX problem object have names; otherwise, no names are associated with the lazy constraints. If row names are passed to   |