Debugging Model
AnsweredThe model that have is fairly complex and it becomes infeasible when I add a constraint. However, logically that constraint should hold good. How can I debug it. It was suggested to use model.computeIIS(). However, I am not sure how to interpret it. Where can I find information about debugging techniques that i can use?
-
Official comment
This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
-
Hi Shesha,
These articles may help: How do I diagnose a wrong result?, Why does Gurobi report my model is infeasible when it has a feasible solution?.
The model.computeIIS() finds the set of the constraints that are the cause of infeasibility. That can be written as "ilp" file for debugging.
model.optimize()
if model.Status == GRB.INFEASIBLE:
model.computeIIS()
model.write("IIS.ilp")Debugging can be difficult when there is a large amount of data or when the model is complex. So I recommend to start with a small data set/simple model to identify factors that may lead infeasibility.
Thanks,
Ryuta0
Post is closed for comments.
Comments
2 comments