Originally posted by: amindehghanian
Thanks again for your help on my posts!
Since I am adding my constraints dynamically, I think I need one small modification on what you said. It means even if I solve a node by CPXmipopt and obtain an integral solution, that solution may violate my (hidden) constraints!
I think I need to do the following in my CPXsetlazyconstraintcallbackfunc:
1. copy the presolved model into an LP object
2. call CPXmipopt on the copy, and obtain MIP optimal solution
3. generate my lazy constraint based on the MIP optimal solution
Right?
There is just one small issue with this method. Before calling lazyconstraintcallback, CPLEX solves the linear programming sub-problem of current node, and this is useless.
Thanks,
Amin
#CPLEXOptimizers#DecisionOptimization