Hello Pedro!
For a problem your size I would go for a collocation method and solve
with one of the NLP solvers in CasADi. Ipopt will probably be the
fastest (I'd be surprised if the solution would take much longer than
a second), but SQP methods often do a better job when solving a
sequence of related problems (hotstarting). If you want to try out an
SQP method you might want to test Worhp - academic licenses are free,
but better start out with Ipopt. You will find information in the
users' guide how to implement it and you can then go on to modify one
of the examples.
Since you have a parameter estimation problem, a Gauss-Newton
approximation of the Hessian is probably going to work fine, and might
outperform everything else, but it's probably easier just to try out a
BFGS Hessian (the default for Ipopt) or an exact (CasADi-generated)
Hessian first.
A different approach is to use an ODE integrator like you do now.
CasADi comes with the CVodes which is basically an extension of the
code you are using now, but with support for forward and adjoint
sensitivitiy analysis (with auto-generated sensitivity equations and
derivative information by CasADi). I don't have very good experiences
with embedding variable order, variable step-size integrators into
optimization problems, however. In any case, for your problem size, a
collocation method will probably work fine and might be orders of
magnitudes faster. There is a class called "Simulator" in CasADi which
does what you want, namely calculating the sensitivities of an output
function that depends on the ODE solution. Only forward sensitivities
are supported for this function though (i.e. it does all the
chain-rule stuff for you). In any case, I would not attempt adjoint
sensitivity analysis. Your problem is too small to justify this. By
the way, adjoint sensitivity analysis can be used both sensitivities
of the (functions of) states and of quadratures and CasADi supports
both.
I hope this helps!
Joel
2012/11/7 Pedro Tabacof <
tab...@gmail.com>: