How to change one parameter in the DifferentialEquation after each step of the MPC?

I use a for loop and at each step I perform one controller step and update one parameter in the DifferentialEquation but the old value of it is used.. how to change this ?