[Ipopt-tickets] [Ipopt] #112: Incorrect number of nonzeros in Lagrangian Hessian causes MA27 to fail
Ipopt
coin-trac at coin-or.org
Thu Oct 29 21:45:28 EDT 2009
#112: Incorrect number of nonzeros in Lagrangian Hessian causes MA27 to fail
-------------------------------------------+--------------------------------
Reporter: arrieta | Owner: ipopt-team
Type: clarification | Status: new
Priority: lowest | Component: Ipopt
Version: 3.7 (C++ Version) | Severity: trivial
Keywords: hessian lagrangian derivatives |
-------------------------------------------+--------------------------------
I was attempting to minimize Rosenbrock's "Banana Function":
{{{
f(x) = 100 * ( x2 - x1^2 )^2 + ( 1 - x1 )^2
}}}
using the C++ interface. The Hessian of f(x) has 4 nonzero components, so
I introduced nnz_h_lag = 4 in the get_nlp_info method.
The solution failed with message:
{{{
*** Error from MA27AD *** IFLAG = 1 IERROR = 1
The index of a matrix is out of range.
Please check your implementation of the Jabobian and Hessian
matrices.ERROR:
Problem in step computation,
but emergency mode cannot be activated.
}}}
The situation is that IPOPT expects only the lower triangle part of the
Hessian, thus the correct number of nonzeros is 3. Sure enough, this
simple change correctly leads to the solution: f(x)=0 at x=[1.0,1.0] in 24
iterations, starting from x=[8.0,8.0].
If someone runs into this problem, you may want to check that you
introduced the correct number of nonzero entries (and check the entries
themselves!).
Please play with the attached files, and try simply changing line 26 in
the file BananaNLP.cpp to see what I mean.
Happy Ipopting.
--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/112>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.
More information about the Ipopt-tickets
mailing list