Originally posted by: SystemAdmin
>
> Hi, I am using lazy constraints on a problem by including codes like cplex.addLazyConstraint(ax>=b).
> I ran exactly the same codes with cplex 12.2 and 12.4. The results are quite different where 12.2 gave me much better bounds.
> I understand that other stuff you have changed might also influence the performance, but I noticed in an earlier post mentioning that 12.4(12.3) may have fixed some lazy constraint problem from 12.2, does it mean that the 12.2 version may give me the wrong(invalid) result at all? or is it just different performance?
>
In 12.4 lazy constraint are only considered when integer solutions are encountered. In 12.2 they were also considered when CPLEX was looking for cuts. Does it help to
also add the lazy constraint as cuts?
> 2. I want to get the values of the candidate incumbent solution in my lazy constraint callback. By using getValues(sol,x) in the callback, I get the values of the relaxation solution, which should be integers if the candidate solution is obtained by solving the relaxation. What about the solutions got from primal heuristics? Are the heuristics all turned off so I don't worry about it?
>
Heuristics are not turned off. If a primal heuristic finds a solution then the lazy constraint callback is invoked and getValues() will return the values for the heuristic solution.
Is there a reason you want to distinguish between solutions from integral nodes and solution from heuristics?
#CPLEXOptimizers#DecisionOptimization