Is there a way to penalize changes in the control variables in a discrete system (linear cost) and set hard constraints? Is it by setting the parameter p? Or is it possible to penalize changes in the control variables by setting yref as shown in the code below?
(u_old refers to the control variable solved in the previous step)
for t in range(N):
ref = [yref1, yref2, 0, 0, 0, u_old[0], u_old[1], u_old[2], u_old[3]]
ref = np.array(ref)
solver.set(t, "yref", ref)