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

Add CyIpoptEvaluationError and handle in callbacks #215

Merged
merged 9 commits into from
Sep 15, 2023

Conversation

Robbybp
Copy link
Contributor

@Robbybp Robbybp commented Jul 25, 2023

Fixes #210

  • New cyipopt.exceptions module that contains only CyIpoptEvaluationError for now
  • In function and derivative callbacks, if CyIpoptEvaluationError is raised by user's callback, we ignore the exception and return false to Ipopt
  • Test this behavior on HS071. Ipopt completes the solve (by cutting the step size) if the error occurs in the objective or constraints, but quits immediately if the error occurs in the derivatives.

The tests are integration tests, which I've included in test_hs071.py. I can move these to their own module if that would be more appropriate.

@moorepants
Copy link
Collaborator

Thanks for this. LGTM.

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

Successfully merging this pull request may close these issues.

Handle function evaluation errors
2 participants