Numerical methods for model predictive control