<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks for the suggestions!<br><br>Regarding the first, I think it might not be so efficient for my problem, having<br>almost as many constraints as variables. But I might give it a try. Perhaps<br>one can modify the code for sparse_hess in some clever way ...<br><br>Regarding the second I am unfortunately clueless as to how one could<br>exploit that fact.<br><br>Kind regards,<br><br>Ingrid<br><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Sun, 7 Apr 2013 15:31:50 -0700<br>From: normvcr@telus.net<br>To: adol-c@list.coin-or.org<br>Subject: Re: [ADOL-C] Evaluating Hessian of Lagrangian<br><br>
<div class="ecxmoz-cite-prefix">Perhaps you can trace L as a function
of both x and lambda.<br>
Then when you need the hessian,<br>
calculate the hessian only with respect to x.<br>
Not sure if this is better/worse than what you suggested.<br>
<br>
When using the Hessian of the Lagrangian, you will eventually be
restricting<br>
attention to the kernel of your constraints. Do you know if this
fact<br>
would offer a simplification to how the hessian could be computed?<br>
<br>
Norm<br>
<br>
<br>
On 04/05/2013 04:02 AM, Ingrid Hallen wrote:<br>
</div>
<blockquote cite="mid:DUB107-W59AC8B59AD0A9DEA3D6DB2D2DA0@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Hi,<br>
<br>
I'm doing non-linear optimization with IPOPT. For this, I'm
using ADOL-C<br>
to compute the Hessian of the Lagrangian<br>
<br>
L(x,lambda) = f(x) + sum_{i}lambda_{i}h_{i}(x),<br>
<br>
where x are the variables, lambda the Lagrange multipliers and <br>
f(x) and h_{i}(x) objective and constraint functions.<br>
<br>
What I'm doing in my code is the following (omitting details):<br>
<br>
// **********************<br>
<br>
// Trace Lagrangian function<br>
trace_on(tag);<br>
<br>
for(i=0;i<n;i++) {<br>
xad[i] <<= x[i];<br>
}<br>
<br>
Lagrangian(xad, lambda);<br>
<br>
Lad >>=L;<br>
<br>
trace_off();<br>
<br>
// Evaluate Hessian of the Lagrangian<br>
repeat = 0;<br>
sparse_hess(tag,n,repeat,x,&nnz,&rind,&cind,&values,&options)<br>
<br>
// ***********************<br>
<br>
This works fine, but is not so efficient. One reason is that,
since lambda changes, <br>
the Lagrangian function has to be retaped every time the Hessian
is needed and so it <br>
appears that I cannot set repeat = 1 when calling sparse_hess.<br>
<br>
One way to circumvent this problem could perhaps be to trace the
objective<br>
and constraint functions individually and then construct the
Hessian of<br>
the Lagrangian using multiple calls to sparse_hess, but is there
a<br>
more convenient way to do it? <br>
<br>
Sincerely,<br>
<br>
Ingrid<br>
<br>
</div>
<br>
<fieldset class="ecxmimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
ADOL-C mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:ADOL-C@list.coin-or.org">ADOL-C@list.coin-or.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/adol-c" target="_blank">http://list.coin-or.org/mailman/listinfo/adol-c</a></pre>
</blockquote>
<br>
<br>_______________________________________________
ADOL-C mailing list
ADOL-C@list.coin-or.org
http://list.coin-or.org/mailman/listinfo/adol-c</div>                                            </div></body>
</html>