Reputation: 390
In Gurobi, is it possible to see if a group of constraints and variables are feasible without actually optimizing the problem? It seems if the objective is a constant, Gurobi still does a lot of heavy computation to find an optimal solution, which I don't need!
Upvotes: 3
Views: 1386
Reputation: 1
I am not sure if there is a better way to do this, but you can use either solution limits or time limits to stop the solver once a condition is met.
For example:
model.Params.SolutionLimit = n
stops the solver once n solutions have been found.
model.Params.SolutionLimit = n
stops the solver once it has run for n seconds too.
You can look at this gurobi parameters page for more info here
Upvotes: 0
Reputation: 16724
Sorry. Except for very easy infeasibilities that can be detected in the presolver, Gurobi may have to do lots of work to prove whether the model is feasible or infeasible. No silver bullets here.
Upvotes: 2