You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ipopt can't find a local minimizer for this simple problem and reaches the iteration limit. If we solve the same optimization problem via the Problem interface, it finds the local minimizer in less than 30 iterations:
The Hessians are probably not correctly approximated under the hood in the first example. I guess there's something broken in the Cython wrapper as the Cython wrapper only checks if the passed problem instance has a hessian() method. I'll try to have a look at it and provide a PR in the next few days.
@jhelgert I am afraid you made an error in your formulation:
Constraints with type=ineq in the scipy interface have a lower bound of 0 and an upper bound of np.inf
In the manual example, you set the lower bound to -np.inf and the upper bound to 0
Thus, you are solving two different problems, explaining the different results of the optimization (having nothing to do with any Hessians). If you flip the signs of the return values of the con and con_jac functions in the first example, it solves just as well as the problem in the second one.
The scipy interface automatically uses Ipopt with a limited-memory quasi-Newton approximation once we don't pass any hessians, see here.
However, as the following example demonstrates, there's something going wrong with the scipy interface:
Ipopt can't find a local minimizer for this simple problem and reaches the iteration limit. If we solve the same optimization problem via the Problem interface, it finds the local minimizer in less than 30 iterations:
The Hessians are probably not correctly approximated under the hood in the first example. I guess there's something broken in the Cython wrapper as the Cython wrapper only checks if the passed problem instance has a
hessian()
method. I'll try to have a look at it and provide a PR in the next few days.PS: This bug is not related to #170 .
The text was updated successfully, but these errors were encountered: