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

"nlopt failure" should be recoverable #14

Closed
kasrllc opened this issue May 16, 2014 · 5 comments
Closed

"nlopt failure" should be recoverable #14

kasrllc opened this issue May 16, 2014 · 5 comments

Comments

@kasrllc
Copy link

kasrllc commented May 16, 2014

In the function "chk", you often throw which causes the final value of the optimum to be unavailable. In some cases, the optimum is still useful. It would be better to have access to this.

@dfannius
Copy link

I agree (I just ran into this myself).

One can work around this by keeping track of the current best variable in the objective function, but it's a bit ugly.

@stevengj
Copy link
Collaborator

stevengj commented Jun 1, 2016

Which exception in particular are you thinking of as being recoverable? In general, the underlying nlopt library may not save the final value best of the optimum on failures.

@dfannius
Copy link

dfannius commented Jun 7, 2016

At least NLOPT_ROUNDOFF_LIMITED should be recoverable, since the documentation specifically states that "the optimization still typically returns a useful result" in this case.

@dfannius
Copy link

Looking at the code, I see that in fact chk() already handles the NLOPT_ROUNDOFF_LIMITED case, so that's good.

@odow
Copy link
Member

odow commented Jan 25, 2023

Closing as stale.

We graceful handle ROUNDOFF_LIMITED and FORCED_STOP errors.

Please re-open if you're still interested in this and have a different error code that you'd like to be recoverable.

@odow odow closed this as completed Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants