mechmotum / cyipopt

Cython interface for the interior point optimzer IPOPT
Eclipse Public License 2.0
227 stars 54 forks source link

Add sanity checks to Jacobian / Hessian indices #216

Closed chrhansk closed 11 months ago

chrhansk commented 1 year ago

If the indices are not correct, then ipopt seems to segfault, so the errors should be caught earlier in the interface.

moorepants commented 11 months ago

Can you add some unit tests for these error messages?

chrhansk commented 11 months ago

I added tests for the Hessian. There is apparently a problem with the error handling in Ipopt itself (see coin-or/Ipopt/pull/697) which so far prevents error messages from the Jacobian evaluation being handled within Ipopt.

chrhansk commented 11 months ago

Edit: https://github.com/coin-or/Ipopt/pull/697 has been merged, so the bug in Ipopt should be fixed starting from version 3.14.13. I added corresponding skipping conditions.

moorepants commented 11 months ago

Thanks for this contribution. LGTM.