Originally posted by: JorisK
Paul Ruben wrote a nice blog post on the differences and usage of lazy constraints and user cuts:
http://orinanobworld.blogspot.nl/2012/08/user-cuts-versus-lazy-constraints.html In addition, a good application (programmed in Java), can be found here (applying user cuts and lazy constraints to TSP):
http://rma350.scripts.mit.edu/home/?p=116 Finally, the cplex manual in the installation folder of your cplex has also a section on cuts.
Btw, give the forum search a try.
>> 2 For most of condition the best time to add valid constraint is to treat it as normal constraint, if I need to get a best result, is it necessary to code constraint in cut, normal constraint,user cut and lazy constraint separately to acquire the best performance?
I'm not sure what you are saying here. Valid inequalities do not change the outcome of your MIP formulation. So I'm not sure what you mean by "best result". Here is a copy from the java manual, which probably clarifies your question:
===============
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 IloCplex.UserCutCallback because this allows IloCplex 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. IloCplex will, however, include a lazy constraint in the LP as soon as it becomes violated. In other words, the solution computed by IloCplex 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.
===============
#CPLEXOptimizers#DecisionOptimization