@@ -246,7 +246,7 @@ function moveinput!(
246246 getestimates! (mpc, mpc. estim, ym, d)
247247 ŷs, Ŷs = predictstoch! (mpc, mpc. estim, d, ym)
248248 p = initpred! (mpc, mpc. estim. model, d, D̂, Ŷs, R̂y)
249- linconstaint ! (mpc, mpc. estim. model)
249+ linconstraint ! (mpc, mpc. estim. model)
250250 ΔŨ, _ = optim_objective! (mpc, p)
251251 Δu = ΔŨ[1 : mpc. estim. model. nu] # receding horizon principle: only Δu(k) is used (1st one)
252252 u = mpc. estim. lastu0 + mpc. estim. model. uop + Δu
359359
360360Init `F`, `d0` and `D̂0` prediction matrices for [`NonLinModel`](@ref).
361361
362- For [`NonLinModel`](@ref), the constant matrix `F` is ``\m athbf{F = Ŷ_s + Y_op} ``, thus
363- it incorporates the stochastic predictions and the output operating point ``\m athbf{y_op }``
362+ For [`NonLinModel`](@ref), the constant matrix `F` is ``\m athbf{F = Ŷ_s + Y_{op}} ``, thus it
363+ incorporates the stochastic predictions and the output operating point ``\m athbf{y_{op} }``
364364repeated over ``H_p``. `d0` and `D̂0` are the measured disturbances and the predictions
365365without the operating points ``\m athbf{d_{op}}``.
366366"""
378378
379379Set `b` vector for the linear model inequality constraints (``\m athbf{A ΔŨ ≤ b}``).
380380"""
381- function linconstaint ! (mpc:: PredictiveController , model:: LinModel )
381+ function linconstraint ! (mpc:: PredictiveController , model:: LinModel )
382382 mpc. con. b[:] = [
383383 - mpc. con. Umin + mpc. T_Hc* (mpc. estim. lastu0 + model. uop)
384384 + mpc. con. Umax - mpc. T_Hc* (mpc. estim. lastu0 + model. uop)
395395
396396Set `b` that excludes predicted output ``\m athbf{Ŷ}`` constraints for [`NonLinModel`](@ref).
397397"""
398- function linconstaint ! (mpc:: PredictiveController , model:: NonLinModel )
398+ function linconstraint ! (mpc:: PredictiveController , model:: NonLinModel )
399399 mpc. con. b[:] = [
400400 - mpc. con. Umin + mpc. T_Hc* (mpc. estim. lastu0 + model. uop)
401401 + mpc. con. Umax - mpc. T_Hc* (mpc. estim. lastu0 + model. uop)
@@ -420,7 +420,7 @@ function optim_objective!(mpc::PredictiveController, p)
420420 # if soft constraints, append the last slack value ϵ_{k-1}:
421421 ! isinf (mpc. C) && (ΔŨ0 = [ΔŨ0; lastΔŨ[end ]])
422422 set_start_value .(ΔŨ, ΔŨ0)
423- init_objective (mpc, ΔŨ)
423+ init_objective! (mpc, ΔŨ)
424424 try
425425 optimize! (optim)
426426 catch err
0 commit comments