[Ipopt] Showing Hessian in optimal solution
Jelmer Ypma
j.ypma at ucl.ac.uk
Thu Jun 25 05:56:20 EDT 2009
Hi Andreas and others,
thanks for your answer. At the moment, I approximate the Hessian using
the method Ipopt provides, so unfortunately I cannot store the Hessian
values in my TNLP class as far as I know.
It seems that in my code (or in the hs071.cpp example) the line
app->Options()->SetNumericValue( "print_level", 12 );
doesn't correctly set the print_level or gets replaced by a (lower)
default. If I add an ipopt.opt file with the same setting in the same
directory as the executable, everything works as expected.
Any ideas why this might happen?
Thanks,
Jelmer
On Wed, Jun 24, 2009 at 15:18, Andreas Waechter<andreasw at watson.ibm.com> wrote:
> Hi Jelmer,
>
> If you set the (file_)print_level high enough, Ipopt will write out also
> matrix data - this will then happen for all iterations, also for the last
> one, so if you want to see the Hessian matrix for debugging purposes, you
> can use that option (but it will usually a huge amount of data for larger
> problems).
>
> Otherwise, since the finalize_solution method is in your TNLP, you could
> just call your eval_h method from the same TNLP to compute the Hessian again
> at the solution point (or if you want to avoid recomputation, you could
> store the Hessian values in your TNLP class after you compute them, and then
> the values would be available in the finalize_solution call).
>
> Otherwise, going through ip_data and ip_cq might be a hassle, since the data
> is store in Ipopt objects which might be not so convenient for you to work
> with. Of course, you can try to find your way through these classes (and
> the Doxygen documentation might be helpful) if you really wanted to...
>
> Regards,
>
> Andreas
>
> On Mon, 22 Jun 2009, Jelmer Ypma wrote:
>
>> Dear all,
>>
>> I'm solving a problem using the C++ interface to Ipopt, which works
>> perfectly fine, so thanks a lot for making Ipopt publicly available!
>>
>> Is it possible to show the values of the Hessian in the optimal
>> solution? I'm guessing the Hessian (or its approximation) is available
>> somewhere, maybe in ip_data or ip_cq (Calculated Qunatities), so you
>> can print it in finalize_solution. However, I wasn't able to figure
>> out the specifics from the mailinglist archive or from looking at the
>> Ipopt source code.
>>
>> Thanks very much in advance,
>> Jelmer
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>>
>>
>
More information about the Ipopt
mailing list