Surrogate Models for Optimization of Dynamical Systems