Stochastic programming applied to model predictive control