[CppAD] Goddard Rocket using CppAD and Ipopt

Jens A. Berger jens.berger at lsespace.com
Fri Aug 1 05:23:20 EDT 2008


Dear Brad,

in our tests we had to use retape=1 otherwise the derivative test in
ipopt would fail (since we have dependent variables). So If I understand
correctly we should use conditional expressions and use retape=0. Then
the sparsity pattern will be considered as well.

Thanks, Jens


Brad Bell wrote:
>
> If you look at the source code in
> https://projects.coin-or.org/CppAD/browser/trunk/example/ipopt_cppad_nlp.cpp
>
>
> You will notice that if retape is true then the sparsity patterns are
> set to dense. On the other hand, if retape is false, the sparsity
> patterns are calculated and used. This is because CppAD assumes that
> the operation sequence may change when retape is true.
>
> If you are unsure if the operation sequence is changing, you can try
> using retape equal to false and true. If the answers are different,
> then the operation sequence is changing and you need to use retape
> equal to true.
>
> You may be able change you code and avoid having to retape using
> conditional expressions.
>     http://www.coin-or.org/CppAD/Doc/condexp.xml
>
> On Thu, 31 Jul 2008, Andreas Waechter wrote:
>
>> Hi Jens,
>>
>> Brad is the best to comment on the performance of CppAD, I don't konw
>> about this.
>>
>> However, what I see is that the Jacobian and the Hessian are given to
>> Ipopt in DENSE representation!  I don't know how/if CppAD detects
>> which constraint functions depend on which variables, but from the
>> output you sent it seems that the information give to Ipopt is that
>> all functions first and second derivatives depend on all optimization
>> variables.  This of course leads to a huge increase in memory
>> consumption and computation time compared to the run with sparse
>> matrices that your other implementation did.
>>
> .
> .
> .
>>> On Thu, 31 Jul 2008, Jens A. Berger wrote:
>>>
>>>> Dear Bradley and Andreas
>>>>
>>>> using the "ipopt_cppad_nlp" class of the CppAD examples we implemented
>>>> the goddard rocket problem as described in the COPS examples:
>>>>
>>>> http://www-unix.mcs.anl.gov/~more/cops/cops3.pdf
>>>>
>>>> The good news is, that we managed to find an optimal solution with
>>>> ipopt
>>>> using this implementation (See attached ipopt_cppad_rocket.tgz).
>>>> However, when choosing a discretization of  k=500 we were facing quite
>>>> long computation times of ~84 minutes with many iterations, while
>>>> ~1 GB
>>>> of memory was reserved  (see attached ipopt_cppad_rocket_k500.log for
>>>> details).
>>>>
>>>> We did a comparison to our "in house analytical method" which is:
>>>> finding of the derivatives of f and g with an analytical method, then
>>>> calculate the values of the Jacobian and Hessian for every
>>>> discretization step. Using this method we needed only ~5 seconds and
>>>> less iterations to find a solution for a discretization of k=500. Here
>>>> around 100 MB memory were needed (see attached analytical_k500.log for
>>>> details).
>>>>
>>>> A while ago we did some runs with AMPL and/or OS on the goodard rocket
>>>> problem and experienced run times of < 1 minute for a
>>>> discretization of
>>>> k=500. All calculation times we give are based on ubuntu, Intel Core 2
>>>> Duo 2.6 Ghz, 3 GB RAM.
>>>>
>>>>
> .
> .
> .



More information about the CppAD mailing list