retrieving Solution status in python
回答済みHi,
I am solving multiple models in a loop, and sometimes some of them might not have a feasible solution and python yields the error:
RuntimeError: The model is unsolved or no solution is obtained.
I want to avoid stopping the loop by this error, and instead retrieve the status variable so that I can do some changes and my loop (next models) keeps running.
Amal
0
-
正式なコメント
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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Please note that I am using the API gurobipy.
0 -
Hi Amal,
generally, the model status in Python can be retrieved by calling:
model.status
An overview of the model statuses can be seen here.
Hope this helps.
Best regards
Jonasz0
投稿コメントは受け付けていません。
コメント
3件のコメント