ILOG CPLEX .NET Reference Manual

Cplex.LazyConstraintCallback Class

Callback class for lazy constraints.

For a list of all members of this type, see Cplex.LazyConstraintCallback Members.

System.Object
   ILOG.CPLEX.Cplex.Callback
      ILOG.CPLEX.Cplex.MIPCallback
         ILOG.CPLEX.Cplex.ControlCallback
            ILOG.CPLEX.Cplex.CutCallback
               ILOG.CPLEX.Cplex.LazyConstraintCallback

public abstract class Cplex.LazyConstraintCallback : CutCallback

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

This is an advanced class.

Important:

Advanced classes typically demand a profound 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 classes instead.

This is the lazy constraint callback class. Extensions of this class implement user-written lazy constraint callbacks. These allow you to add lazy constraint to the problem while the problem is being solved with branch-and-cut search. These lazy constraints may contribute to the model formulation and restrict the feasible region of the problem. By contrast, if a constraint to be added during branch-and-cut search does not change the feasible region of the active model but only strengthens the formulation, it is referred to as a user cut. Such constraints should better be added through Cplex.UserCutCallback because this allows Cplex potentially to perform more presolve reductions. It is an error, however, to add lazy constraints by means of a user cut callback.

The idea behind lazy constraints is that the LPs that are solved when the MIP is being solved can be kept smaller when these constraints are not included. Cplex will, however, include a lazy constraint in the LP as soon as it becomes violated. In other words, the solution computed by Cplex makes sure that all the lazy constraints that have been added are satisfied.

If you use LazyConstraintCallback, you are free to add cuts that may chop off solutions that are otherwise feasible with respect to the model, in contrast to UserCutCallback. In the case of UserCutCallback, you effectively promise CPLEX that you are not adding cuts that reduce the solution space by the callback.

Requirements

Namespace: ILOG.CPLEX

Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll)

See Also

Cplex.LazyConstraintCallback Members | ILOG.CPLEX Namespace