-
Notifications
You must be signed in to change notification settings - Fork 35
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
Unbounded LPs reported as Infeasible #248
Comments
Minor correction to last two solves but it does still return `library (ROI, quietly = TRUE) # R Optimization Interface model_unbounded <- MIPModel() %>% set_objective(x+y, "max") %>% add_constraint(x+y >= 2000) #fabrication result_unbounded <- solve_model(model_infeas, with_ROI(solver = "glpk")) library (ROI.plugin.symphony, quietly = TRUE) # Plugin for solving result_unbounded <- solve_model(model_infeas, with_ROI(solver = "symphony")) library (ROI.plugin.lpsolve, quietly = TRUE) # Plugin for solving result_unbounded <- solve_model(model_infeas, with_ROI(solver = "lpsolve")) |
Hi prof-anderson, I'm not 100% sure but you solve the "model_infeas" in the solve statement, which is not defined in the code you are providing. I assume it was used before and is still in memory. If you are using "solve_model(model_unbounded , with_ROI(solver = "glpk"))" it should be fine. |
Good spot. I had typos from trying to simplify and come up with a short example. Thanks. I fixed the typos and it is still returning infeasible rather than unbounded.
|
Hello Edit:
the current version of ompr.roi only use two status "optimal" and "infeasible" which actually mean "success" and "failure" and are the direct translation of code = 0 or code = 1. Edit2: If you want to use the pull request version of rickyars, you may need to merge it manually with ompr master first since it is not based on the most recent version of ompr. |
Re: Dirk:
Do you have instructions for how to do that? Thanks, SteveM |
You have to create a new branch of the project from rickyars pull request in your own repository in github and then merge it with the master. I made it myself a few months ago, it is not really dificult but I don't remember the exact steps. |
Thanks. I thought I was going a little crazy. That seems like it is the exact source of the problem. I am using 0.8.0 from CRAN. Using an unreleased version isn't really an option for me since I have students using a mix of platforms (PC, Mac, RStudio.cloud) and R proficiency. If the issue is interpretation of the 0 status, a quick and dirty hack would be to change the returned message from "Infeasible" to "Infeasible/Unbounded" or "No Optimal Solution Found" and let the analyst infer the situation. A more full fix could then be incorporated later, perhaps using part of the fork mentioned above. Thanks again! |
Is this an immediate need for an ongoing course? I will try to work on this and the PR's of @rickyars next. |
Yes, it is exactly that.
Also solvers have verbosity options and print their results. It is hard to recover this information to use in a script but you can at least see it on your screen. |
ROI's status code is documented to be the following:
So what we could do is add another status code called |
We should probably do two things in the future:
A recent addition to |
Here is a simple two variable problem that returns a status of infeasible when it should be unbounded. I tested this three solver (glpk, lpsolve, and symphony). All packages are up to date from CRAN.
The text was updated successfully, but these errors were encountered: