[Ipopt] How to get the symbolic Hessian

Joel Andersson j.a.e.andersson at gmail.com
Mon Jan 6 15:07:18 EST 2014


Hello Xue, Rodrigo,

one easy way to do this is to use CasADi (see casadi.org). If you export
the NLP as an .nl file from AMPL, you can then import the .nl file into
CasADi and have CasADi generate a symbolic Hessian (using forward over
adjoint AD by source code transformation). You can then export it as
self-contained C-code and inspect the algorithm.

See <casadi root>/examples/python/ipopt_nl.py for importing .nl files and
<casadi root>/examples/cplusplus/nlp_codegen.cpp.

Good luck!
Joel



2014/1/6 Rodrigo Lopez-Negrete <r.lopez.negrete at gmail.com>

> Hi Xue,
>
> Extracting the symbolic Hessian directly from AMPL may not be possible due
> to the fact that it is computed only when needed using automatic
> differentiation included in the AMPL library. However, you may be able to
> extract the Hessian at a given point using the example 'solver' gjh freely
> available from the Netlib library at
> http://www.netlib.org/ampl/solvers/examples/README.gjh.
>
> For more info you may want to check out (both by DM Gay)
>
> Automatic differentiation of nonlinear AMPL models:
> http://www.cs.bell-labs.com/cm/cs/what/ampl/REFS/autodiff.pdf
>
> Writing NL files
> http://www.cs.sandia.gov/~dmgay/nlwrite.pdf
>
> I hope this helps,
>  Rodrigo
>
>
> On Mon, Jan 6, 2014 at 2:28 PM, <xuey at andrew.cmu.edu> wrote:
>
>> Hi all,
>>
>> Could anyone tell me how to get the symbolic Hessian of a problem? I'm
>> calling IPOPT from AMPL. Thanks!
>>
>> Best regards,
>>
>> Xue Yang
>>
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>>
>
>
>
> --
> *Rodrigo López-Negrete de la Fuente*
> Email: r.lopez.negrete at gmail.com <r.lopez.negrete at gmai.com>
> WWW: http://rodrigo.lopez-negrete.org
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt
>
>


-- 

-- 
Joel Andersson
Ptge. Busquets 11-13, atico 3
E-08940 Cornella de Llobregat, Spain
Home: +34-93-6034011
Mobile: +32-486-672874 (Belgium) / +34-63-4408800 (Spain) / +46-707-360512
(Sweden)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20140106/34c943b5/attachment.html>


More information about the Ipopt mailing list