Sir, I am trying to use your mpc code for a batch reactor in which the manipulated variable is flow instead of coolent temperature. Will the code work for it, sir.If not, can you please tell me what can we do to make work for it. I formed the PID controller for my model based on your code and tested it in a real-time system it worked well, sir. Please help me sir.