mechmotum / cyipopt

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

Add eps argument or passable option to minimize_ipopt() #115

Closed mdclemen closed 12 months ago

mdclemen commented 3 years ago

When using minimize_ipopt(), there is currently no way to update the default value of eps used by the IpoptProblemWrapper() class. eps is the default step size used when numerically evaluating the Jacobian. Some of the solvers for scipy.optimization.minimize(), which minimize_ipopt() tries to emulate, has an option for this. For example the "SLSQP" solver has a passable option eps, which the user can set to a desired value: https://docs.scipy.org/doc/scipy/reference/optimize.minimize-slsqp.html#optimize-minimize-slsqp.

moorepants commented 1 year ago

@mdhaber would this be addressed with your recent improvements to minimize_ipopt()?

mdhaber commented 1 year ago

Only in sense that an option eps can be used with method='slsqp'. I think the user wants an option eps to be used with IPOPT. Currently, it looks like it is just set to 1e-8: https://github.com/mechmotum/cyipopt/blob/f68a639eb518210dc82a31e190b87f6cba9dfc20/cyipopt/scipy_interface.py#L562

Would you like me to expose the option?

mdhaber commented 1 year ago

Just in case, I opened gh-228.