I was wondering something else, now the model itself works.
It seems to have trouble with another reference then a constant one.
I have put a step function as input, but when the amplitude changes, the problem becomes infeasible. I have checked the tutorial again, and if I understand correctly, the reference is assumed to be constant along the horizon at every time step. But is it also possible to have different reference values along the horizon to improve performance?
For example, when the amplitude changes, the reference sequence becomes: [0 0 0 0 0.5 0.5 0.5].
But this gives the infeasibility problem. Is there any way to include this? Or am I supposed to assume a constant reference along the horizon?
Many thanks!