Check feasibility when time limit is reached
AnsweredI have T seconds to solve an MIP problem. When the time limit T is reached, Gurobi could have found a feasible solution or failed to find one. In both cases, the status of the model becomes GRB.Status.TIME_LIMIT.
How do I know that if any feasible solutions found within the time limit?
One way could be trying gRBVar.X, where if an exception is thrown then you would know no feasible solutions could be found. But there must be a better way, right?
0
-
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?. -
I think I found an answer for this. Using gurobi.SolCount does the job.
0
Post is closed for comments.
Comments
2 comments