Please, I am currently implementing direct multiple shooting methods* and I need one simple but fundamental concept answered:
When I want to provide not only objective function value (the result of ODE integrator) but as well derivatives (for the NLP solver), for the control parameters it is just sensitivity analysis of said ODE. But what about the parameters, which arise in direct multiple shooting from the discretization points of the path (state and cost trajectory)? What should I tell the solver about derivation of the cost by these parameters?
Of course, I managed to run the multiple shooting algorithms in Matlab, but now I want to add the derivatives of the ODE concerning control parameters. (Note to say, that this question does not depend on the implementation or on the problem itself.)
Is it sufficient to set them to zero? These parameters are not free, they are just numerical-clever-thingies, and their values are just bound using equality constraints.
*Brief description of direct multiple shooting, if you know the method by another name:
It is numeric method of discretization for optimal control problems. We have an ODE and control function. By translating this to NonLinear Programming problem, we can solve the original problem.
-Direct Single shooting does just this, just discretizes (at certain timepoints) the control function and calls a routine for NLP using the parameters of the discretized function as parameters to optimize against. (And the Cost function is just solved using ODE solver that gets these parameters.)
-Direct multiple shooting is somewhat clever. When computing the ODE (for calculating the cost function), it gets not only the parameters of the discretized control function but also the beginning points, where to begin the integration of the ODE. AND at the same time, the method says to the NLP optimizer - use equivality constraints to keep these parameters (beginnings of the trajectories) equal to endings of just the trajectory, that was computed at the previous time slot.
Exactly as described, for example, in https://workspace.imperial.ac.uk/people/Public/chemicalengineering/b.chachuat/ic-32_secured.pdf
By the way, if I get this working, I will definitely upload my solution in python + theano somewhere :)