<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hello Karla,<br>
<br>
I assume you are using the Fortran interface.<br>
<br>
It is correct that Ipopt will call the evaluation routines for
values and derivatives (and objective and constraints) separately,
and it is not necessarily clear which subroutine is called first
with a new value of X. However, the NEW_X input variable tells
you if your subroutines have seen this value of X before.<br>
<br>
So, one thing you could do is to have a separate subroutine that
is called from any of the evaluation subroutines every time NEW_X
is .TRUE. . This common subroutine would then do your flow solve
and compute all values and derivatives and whatever you compute at
the same time. In that subroutine, you would then store those
computed quantities in DAT and IDAT so that they will be available
in any evaluation subroutine when they are called later. Note
that DAT and IDAT are your "user" DOUBLE PRECISION and INTEGER
arrays that are passed between all subroutines called by Ipopt
without Ipopt changing them, so they are "private" to you. When
later on an evaluation subroutine is called with NEW_X equal to
.FALSE., you could just get the requested quantities our of DAT
and IDAT, without having to call the common subroutine, avoiding a
resolve of your flow.<br>
<br>
You could also COMMON blocks instead of DAT and IDAT if you
prefer,<br>
<br>
I hope this helps,<br>
<br>
Andreas<br>
<br>
<pre class="moz-signature" cols="72">Andreas Waechter
Associate Professor
Department of Industrial Engineering and Management Sciences
McCormick School of Engineering
Northwestern University
Evanston, IL 60208
USA
<a class="moz-txt-link-freetext" href="http://users.iems.northwestern.edu/~andreasw/">http://users.iems.northwestern.edu/~andreasw/</a></pre>
On 06/27/2012 11:08 AM, Karla Telidetzki wrote:<br>
</div>
<blockquote
cite="mid:CAAG0rHt1A=Q6nbpL9DCK2UVJ9pG=TLxWgme+rEfptdHg=q8shQ@mail.gmail.com"
type="cite">Hello all,
<div><br>
</div>
<div>I have a fairly large aerodynamic shape optimization code,
written in Fortran, which is currently using SNOPT. I am trying
to implement IPOPT as well to see if we can get improved
performance for some of our more difficult problems. Since we
are already using a gradient based optimization code, all the
required functions and gradients are already coded, and just
need to be interfaced with IPOPT. My issue comes down to how to
best implement the flow solve component. After each optimization
iteration, a flow solve must be performed using the new design
variables, and the resulting functions and gradients are
calculated based on this flow solve. Therefore each subroutine
(EV_F, EV_GRAD_F, EV_G, EV_JAC_G) depend on the results of this
flow solve. SNOPT only requires a single user generated
subroutine that calculates the functions and gradients, and the
flow solve is currently called within this subroutine. I was
wondering if anybody has any suggestions on how to best call the
flow solve after each optimization iteration, such that all 4
subroutines can then use the information.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Karla Telidetzki</div>
<div>University of Toronto</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Ipopt mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="http://list.coin-or.org/mailman/listinfo/ipopt">http://list.coin-or.org/mailman/listinfo/ipopt</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>