@@ -212,7 +212,7 @@ function initpred!(mpc::PredictiveController, model::LinModel, d, D̂, R̂y, R̂
212
212
mul! (F, mpc. G, mpc. d0, 1 , 1 ) # F = F + G*d0
213
213
mul! (F, mpc. J, mpc. D̂0, 1 , 1 ) # F = F + J*D̂0
214
214
end
215
- Cy, Cu, M_Hp_Ẽ, L_Hp_P̃U = mpc. buffer. Ŷ, mpc. buffer. U, mpc. buffer. Ẽ, mpc. buffer. P̃u
215
+ Cy, Cu, M_Hp_Ẽ, L_Hp_P̃u = mpc. buffer. Ŷ, mpc. buffer. U, mpc. buffer. Ẽ, mpc. buffer. P̃u
216
216
q̃, r = mpc. q̃, mpc. r
217
217
q̃ .= 0
218
218
r .= 0
@@ -226,8 +226,8 @@ function initpred!(mpc::PredictiveController, model::LinModel, d, D̂, R̂y, R̂
226
226
# --- input setpoint tracking term ---
227
227
if ! mpc. weights. iszero_L_Hp[]
228
228
Cu .= mpc. Tu_lastu0 .+ mpc. Uop .- R̂u
229
- mul! (L_Hp_P̃U , mpc. weights. L_Hp, mpc. P̃u)
230
- mul! (q̃, L_Hp_P̃U ' , Cu, 1 , 1 ) # q̃ = q̃ + L_Hp*P̃u'*Cu
229
+ mul! (L_Hp_P̃u , mpc. weights. L_Hp, mpc. P̃u)
230
+ mul! (q̃, L_Hp_P̃u ' , Cu, 1 , 1 ) # q̃ = q̃ + L_Hp*P̃u'*Cu
231
231
r .+ = dot (Cu, mpc. weights. L_Hp, Cu) # r = r + Cu'*L_Hp*Cu
232
232
end
233
233
# --- finalize ---
0 commit comments