<div dir="ltr">Hello <span style="font-family:arial,sans-serif;font-size:12.666666984558105px">Xue, </span>Rodrigo, <div><br></div><div>one easy way to do this is to use CasADi (see <a href="http://casadi.org">casadi.org</a>). 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.</div>
<div><br></div><div>See <casadi root>/examples/python/ipopt_nl.py for importing .nl files and <casadi root>/examples/cplusplus/nlp_codegen.cpp.</div><div><div><br></div><div>Good luck!</div></div><div>Joel</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/6 Rodrigo Lopez-Negrete <span dir="ltr"><<a href="mailto:r.lopez.negrete@gmail.com" target="_blank">r.lopez.negrete@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Xue,<br><br></div>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 <a href="http://www.netlib.org/ampl/solvers/examples/README.gjh" target="_blank">http://www.netlib.org/ampl/solvers/examples/README.gjh</a>.<br>
<br></div><div>For more info you may want to check out (both by DM Gay)<br><br>Automatic differentiation of nonlinear AMPL models:<br><a href="http://www.cs.bell-labs.com/cm/cs/what/ampl/REFS/autodiff.pdf" target="_blank">http://www.cs.bell-labs.com/cm/cs/what/ampl/REFS/autodiff.pdf</a><br>
<br>Writing NL files<br><a href="http://www.cs.sandia.gov/%7Edmgay/nlwrite.pdf" target="_blank">http://www.cs.sandia.gov/~dmgay/nlwrite.pdf</a><br></div><div><br></div>I hope this helps,<br></div> Rodrigo<div><div>
<img src="http://images/cleardot.gif"></div></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Mon, Jan 6, 2014 at 2:28 PM, <span dir="ltr"><<a href="mailto:xuey@andrew.cmu.edu" target="_blank">xuey@andrew.cmu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Could anyone tell me how to get the symbolic Hessian of a problem? I'm<br>
calling IPOPT from AMPL. Thanks!<br>
<br>
Best regards,<br>
<br>
Xue Yang<br>
<br>
Department of Chemical Engineering<br>
Carnegie Mellon University<br>
Pittsburgh, PA 15213<br>
<br>
_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><span style="font-family:Arial,Helvetica,sans-serif;font-size:14.1667px;border-collapse:collapse;color:rgb(51,51,51)"><strong><span><font color="#000000"><span style>Rodrigo</span></font></span><font color="#000000"><span style> López-</span></font><span><font color="#000000"><span style>Negrete</span></font></span><font color="#000000"><span style> de la Fuente</span></font></strong><br>
Email: <a href="mailto:r.lopez.negrete@gmai.com" target="_blank">r.lopez.negrete@gmail.com</a><div><span style="color:rgb(34,34,34)"><span style>WWW</span></span><span style>: <a href="http://rodrigo.lopez-negrete.org" target="_blank">http://rodrigo.lopez-negrete.org</a></span><br>
</div></span>
</font></span></div>
<br>_______________________________________________<br>
Ipopt mailing list<br>
<a href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br>
<a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><br>-- <br>Joel Andersson<div>Ptge. Busquets 11-13, atico 3</div><div>E-08940 Cornella de Llobregat, Spain</div><div>Home: +34-93-6034011<br>
Mobile: +32-486-672874 (Belgium) / +34-63-4408800 (Spain) / +46-707-360512 (Sweden)</div></div>
</div>