<HTML>

<STYLE> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</STYLE>

<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">At the moment I have coupled Ipopt with CppAD in order to solve my non-linear optimization problem. I did it and to test the performance I am using a scalable problem.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">When the problem is small n = 100 then things converge reasonably fast compared with the exact hessian and jacobiam calculations.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">On the other hand, when I set n to 1000 I simply cannot have the results. The time required is enormous. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">I have used two strategies, which I will expose further, but none has performed satisfactorily.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Strategy 1: Use SparseHessian routine<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Actually Ipopt requires the Hessian of the Langrangian that has multipliers for each of the constraints and objective function Hessian. Because of that I was not able to properly compute the Hessian of the Langrangian at once by calling SparceHessian routine. I believe it should be done internally. One alternative would be to compute each of the constraint and objective function per time, but that causes the performance to be inefficient.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Strategy 2: Use Fortwo routine<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Ipopt requires the non-zero structure of the hessian, as well as its position (irow[NonZeros] and jcol[NonZeros]. I can calculate it all and use to specifically compute the partial derivative I want. Also I compute each constraint and objetive function per type on the irow and jcol nonzero points of the Hessian of the Langrangian.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">I thought it would be quick because the problem is sparse and I won’t need to compute the n x n space. <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">For some reason I don’t know the reason it is behaving even slower. I suspect that Fortwo is supposed to compute over the n forward dimension even if I don’t need then. Is that true?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Another idea I had is to modify Hessian to compute only the points I know it is a non-zero position (irow, jcol). Ipopt use the tripled format for sparse matrix computations.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">What I actually need is some orientation to change the codes in order to make sparse computation fast enough to make Ipopt and CppAD coupling effective. Thanks for any help and tip.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">I know that it is on the wish list and I would like to help with that.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Regards,<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman; mso-ansi-language: EN-US">Eduardo<o:p></o:p></SPAN></P><BR></HTML>