Check existence of ILP solution
AnsweredLet's say I have an ILP. However, I just want to quickly check if the ILP is feasible i.e. there exists integral solution that satisfies the constraints without having to find the optimal solution.
Is there an API in Gurobi that allows me to quickly do this without having to run the complete Branch-And-Bound method?
Does changing the objective to something like a constant work?
-
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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Anh,
generally you should be able to achieve your objective by setting the SolutionLimit parameter to 1 - Gurobi will then terminate after finding the first integer-feasible solution. I can't promise though that this will happen before B&B procedure starts. To steer Gurobi towards quickly finding solutions before even solving the root relaxation, you could play with the parameter NoRelHeurWork. Additionally I recommend you try playing with the following parameters: MIPFocus, Heuristics.
Alternatively, you could also try the following: sometimes forcing the variables to one of their bounds (for example forcing all variables to zero for a binary program) and running the solution process may help you establish the feasibility of your problem. Please bear in mind though that this is in no way a piece of general advice. Without knowing more about your problem, I cannot tell you anything more about the usefulness of such an approach in your case.
Hope this helps.
Best regards
Jonasz0
Post is closed for comments.
Comments
2 comments