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 re-solve 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
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
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
Post is closed for comments.
Comments
2 comments