Originally posted by: GiovanniP
Hello,
I am having a hard time understanding this behavior of Lazy Constraints callback.
A bit of background: I am using Cplex 12.5.1 from the Java Callable Libraries. I am coding a Benders decomposition, where I have an MIP master, with general integers (not binary).
I do the following: In the lazycallback main I use node data to check at which B&C node things happen, print some info and then call my cuts generation routine.
I experiencing the following: Cplex returns twice to the same integer node, with the same identical integer solution generated at that node one iteration before. Therefore I need to check that in order to prevent the algorithm to resolve the same subproblems. In other words it seems that lazyconstraint callbacks do the following:
1) find an integer node and call the callback
2) add cuts
3) find again the same integer solution (same B&C node)
4) re-add (obviously the same) cuts
5) find a different integer solution (possibly for the same B&C node)
Skipping this is not a problem though. It is easy to skip the cuts routing. However, I would like to know what is the reason cplex does what I mentioned before.
Is there anything I am missing? something like isAfterCutLoop()?
I should mention that when I skip the cuts generation in the second callback call, the algorithm still works fine producing the optimal solution.
Thanks for the comments in advance.
#CPLEXOptimizers#DecisionOptimization