Rapid-Design-of-Systems-Laboratory / beluga

General purpose indirect trajectory optimization
Other
25 stars 6 forks source link

Add ability to compute analytic jacobians #198

Open msparapa opened 5 years ago

msparapa commented 5 years ago

As Sean and I discussed, we should probably auto-generate the analytical jacobian functions instead of relying on numerical computations. This will eliminate one level of numerics used.

msparapa commented 5 years ago

@SeanMatthewNolan Do you have any specific problem where sensitivities in the Jacobian became an issue? I'm going to work on this, but I don't think I really have a way to quantify improvements.

SeanMatthewNolan commented 5 years ago

I would try a glide problem in which the vehicle skips pretty high in the atmosphere. That is the most accessible one that I can think of.

msparapa commented 5 years ago

@SeanMatthewNolan Check out some of these initial improvements. So far analytical Jacobians are only computed for ICRM control law and used in only the spbvp solver, which is fine because this is pretty much our highest performance combo. I'm seeing around 1.4x-2x performance improvements for using analytical jacobians over numerical ones. There's a new optim_options argument you can use 'analytical_jacobian': True to turn this on and off. I modified 3 of the examples, particle, financial, and moonlander, to use analytical jacobians.