Lazy constraints and solution pruning
OngoingHi,
I am solving a MIP using lazy constraints, added during MIPSOL callbacks. I have set the lazy constraints param = 1.
I am having trouble with gurobi reporting the model as infeasible. I can solve the problem without using lazy constraints, and I can even collect the constraints generated on the fly and add them to the base model and show that is feasible too.
Is it possible that the integer values passed in the mipsol callback are being pruned after adding a lazy constraint? The lazy constraints will cut off the values of some continuous variables, but any set of values for the integer variables should admit a feasible solution in this model.
After/during mipsol callbacks is there any way to resolve the continuous variables? I would adjust myself but cbSetSolution is not allowed in mipsol callbacks. Again, these integer variables are always feasible, I would just need to adjust the continuous variables.
Thanks!
 John

Hi John,
I am not sure if I fully understand your issue. You are saying that when you use callbacks to generate lazy constraints then Gurobi declares your model as infeasible. However, if you add all constraints explicitly and declare them as lazy constraints then Gurobi declares the problem as feasible. Is this correct?
If not, could you try adding all lazy constraints explicitly to the model without declaring them as lazy and checking whether the model remains feasible? If it is not feasible, then please have a look at the Knowledge Base article How do I determine why my model is infeasible?
If your model remains feasible, could you then share a minimal working example showing the issue (see Posting to the Community Forum)?
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
1 comment