[Ipopt] SNOPT to IPOPT

Andreas Waechter awaechter.iems at gmail.com
Wed Jun 27 12:46:58 EDT 2012


Hello Karla,

I assume you are using the Fortran interface.

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.

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.

You could also COMMON blocks instead of DAT and IDAT if you prefer,

I hope this helps,

Andreas

Andreas Waechter

Associate Professor
Department of Industrial Engineering and Management Sciences
McCormick School of Engineering
Northwestern University
Evanston, IL 60208
USA
http://users.iems.northwestern.edu/~andreasw/

On 06/27/2012 11:08 AM, Karla Telidetzki wrote:
> Hello all,
>
> 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.
>
> Thanks,
>
> Karla Telidetzki
> University of Toronto
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120627/2bf950a6/attachment.html>


More information about the Ipopt mailing list