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

MAINT: optimize: Additional linprog cleanup #9671

Closed
9 of 20 tasks
mdhaber opened this issue Jan 11, 2019 · 4 comments · Fixed by #15512
Closed
9 of 20 tasks

MAINT: optimize: Additional linprog cleanup #9671

mdhaber opened this issue Jan 11, 2019 · 4 comments · Fixed by #15512
Labels
maintenance Items related to regular maintenance tasks scipy.optimize

Comments

@mdhaber
Copy link
Contributor

mdhaber commented Jan 11, 2019

Separate from the enhancements in #9269, I wanted to keep a list of deferred maintenance.

@Kai-Striega
Copy link
Member

I would also like to add changing the type of bounds to NumPy arrays, at a minimum for internal use in the solvers.

@mdhaber
Copy link
Contributor Author

mdhaber commented Apr 7, 2019

Re: "figure out what changes caused interior-point to report failure despite success on some Netlib benchmarks"
I've tracked this down to commit 7d1619be79c1fb75072e34e007d01d2d4190bb94 in BUG: optimize: partial fix to linprog fails to detect infeasibility #8664.
Makes sense. Probably just a tolerance issue in that check.

@mdhaber
Copy link
Contributor Author

mdhaber commented Apr 7, 2019

@Kai-Striega In #9636 I did a bunch of benchmarking and noticed that there were a lot of problems for which 'interior-point was reporting failure despite having an objective function value very close to the correct value. This wasn't something I had observed in the original benchmarking (#7123), so I wanted to find out when this changed. We discussed this at the end of #9636 and ruled out the linprog refactoring. Looks instead like it's in PR #8676 (this commit). This makes total sense, because that commit added a direct constraint check of the solution. Looks like it's just the inherent limited accuracy of interior-point. Nothing has changed about the solution it returns (I checked), but this constraint check reveals that the constraints are not satisfied to the target tolerance (which was somewhat arbitrary; currently it uses sqrt(tol)).

Proposed solution: The current status message in this case is:
The solution does not satisfy the constraints, yet no errors were raised and there is no certificate of infeasibility or unboundedness. This is known to occur if the presolve option is False and the problem is infeasible. If you encounter this under different circumstances, please submit a bug report. Otherwise, please enable presolve.
Perhaps I'll change it to also explain that interior-point is not perfectly accurate and that the user should check the constraint residuals. If they're acceptable, great, if not, they can try using revised simplex.

Does that sound good? Or can you think of a more appropriate tolerance to use in the constraint check?

@Kai-Striega
Copy link
Member

@mdhaber sorry I missed this. I think updating the error message is a good fix. The tolerance used in the checks is arbitrary and the user may always specify a higher tolerance.

It may be worth noting somewhere how the tolerance from the tol parameter relates to the final tolerance used in the checks, although that should not be in the error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.optimize
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants