A Sequential Quadratic Programming Method for Nonlinear Model Predictive Control