Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Gurobi solve_result with "infeasible or unbounded" #243

Open
4er4er4er opened this issue Sep 10, 2024 · 3 comments
Open

Unexpected Gurobi solve_result with "infeasible or unbounded" #243

4er4er4er opened this issue Sep 10, 2024 · 3 comments
Assignees

Comments

@4er4er4er
Copy link
Contributor

A user reports that when they have a result like this,

Gurobi 11.0.3: infeasible or unbounded problem
769 simplex iterations
1 branching node

they get unexpected result values:

solve_result_num = 450
solve_result = limit

According to the Retrieving solutions section of the Gurobi documentation, the solve_result_num should be interpreted as

450-469 limit, problem is either infeasible or unbounded

So it appears that the issue is with solve_result because Gurobi is stopping due to a valid termination condition being found, rather than due to any limit being reached.

(This example gives the reported behavior when run under Windows, with this log. But the user ran under Linux and reported seeing "infeasible or unbounded" only with option presolve 10; instead.)

@glebbelov
Copy link
Contributor

Status "infeasible or unbounded" is a kind of limit because the solver decides not to find out which exact case is happening. This limit is the solver's default. To remove the limit, pass iis=1.

AMPL does not have a separate infeasible_or_unbounded status category. Gurobi ASL does not seem to report this status at all. Thus, MP puts this in the limit category.

The user's request seems to have 2 issues. First, the interpretation of "infeasible or unbounded" as limit. I can extend the docs to clarify this. We can also add "Pass option iis=1 to determine exactly." to the solver message.

The other issue is that this only happens with option presolve 10 - but this is inherent numerical nature of Math Programming. On MacOS, this only happens with option presolve 0 - otherwise, infeasible is reported. Passing iis=1 with option presolve 0 continues and says infeasible right away but then takes very long to actually compute the IIS. Setting a time limit might be good if the user wishes just the exact status, or we can introduce a separate time limit for IIS, so user can always pass iis=1 without loosing too much time on it.

@4er4er4er
Copy link
Contributor Author

I found a Gurobi Help Center article How do I resolve the error "Model is infeasible or unbounded"? that seems to give a simpler way to distinguish infeasible from unbounded. It does still require changing a parameter, however.

For a user who sometimes gets "infeasible" and sometimes "infeasible or unbounded" --- but who knows that the problem will not ever actually be unbounded --- we could advise testing for solve_result_num = 450 in addition to testing for infeasibility.

@glebbelov
Copy link
Contributor

Updated docs and solve messages with both hints (recommend dualreductions=0 or iis=1).

The proper test is (450 <= solve_result_num && solve_result_num < 470).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants