Toolkit for Automatic Control and Dynamic Optimization