Here the multivariable constrained MPC example is developed for the stirred tank reactor as detailed in "Model Predictive Control" by Camacho and Bordons P.144, P174. The model is also changed to the state space model and the control is then based on this. It would be hoped this would help potential MPC students in developing MPC models for multivariable and constrained cases. It is possible to run the unconstrained case too. This should be obvious once familiar with the file.