brocksam / pycollo

General-purpose optimal control, trajectory optimisation and parameter optimisation using direct collocation
https://brocksam.github.io/pycollo/
MIT License
8 stars 3 forks source link

Automatic OCP scaling #12

Closed brocksam closed 4 years ago

brocksam commented 4 years ago

This PR includes the introduction of the new scaling module which allows the optimal control problem to be scaled within IPOPT to improve its convergence properties. At present this module presents two options for scaling methods: None and 'bounds'. With no scaling the problem is left as is. The bound scaling method (as suggested by Betts, 2010 and others) uses the user-supplied bounds of the problem variables to estimate appropriate scaling for the initial mesh. Scaling can then be updated for successive meshes by computing the derivative matrices at the (interpolated) previous solution and choosing scaling values that set the vector norms of the objective and constraint derivatives to 1.

Note that the scaling module also appears to allow both user-supplied scaling and scaling based on the user-supplied initial guess (as in GPOPS-II) however these approaches are not yet implemented.