Need for Infeasible Solution
AnsweredHi,
When does Gurobi determine that a model is infeasible?
I am trying to solve an optimization problem with zero objective value that should result in an infeasible solution (I know this because of the definition of the problem and I also confirmed it using a different solver and with the same parameters). However, I'm not getting the desired result. That is, instead of getting that the model is infeasible, I get that model.status == 2 and optimal objective is 0.0, yet this should not be the case. What am I doing wrong?
-
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 Michael,
It's hard to say what is going wrong without a log or any more information, however, the usual steps to check what is going on is to look at the model in LP format, and check if the returned solution is indeed feasible (within tolerances). By default, primal and dual feasibility tolerances are 1e-6, while the integrality tolerances is 1e-5. For a detailed explanation of tolerances and their meaning you might want to take a look at the numerical guide:
https://www.gurobi.com/documentation/8.1/refman/numerics_gurobi_guidelines.html
It can be that your model is missing some constraints... so I would definitely check the resulting LP file for a small instance.
Best regards, Daniel
0 -
Hi Daniel,
Thanks so much for your response.
You were right. Checking the LP file showed me what was wrong (some of my constraints were not properly written).
I've fixed it and I now get the desired result.
Thanks again,
Michael
0 -
Glad to hear that!
Daniel
0
Post is closed for comments.
Comments
4 comments