@@ -356,16 +356,16 @@ function initpred!(mpc::PredictiveController, model::LinModel, d, D̂, Ŷs, R̂
356356end
357357
358358@doc raw """
359- initpred!(mpc::PredictiveController, model::NonLinModel , d, D̂, Ŷs, R̂y )
359+ initpred!(mpc::PredictiveController, model::SimModel , d, D̂, Ŷs, R̂y )
360360
361- Init `F`, `d0` and `D̂0` prediction matrices for [`NonLinModel `](@ref).
361+ Init `F`, `d0` and `D̂0` prediction matrices when model is not a [`LinModel `](@ref).
362362
363- For [`NonLinModel`](@ref) , the constant matrix ``\m athbf{F = Ŷ_s + Y_{op}}``, thus it
363+ In such a case , the constant matrix is ``\m athbf{F = Ŷ_s + Y_{op}}``, thus it
364364incorporates the stochastic predictions and the output operating point ``\m athbf{y_{op}}``
365365repeated over ``H_p``. `d0` and `D̂0` are the measured disturbances and its predictions
366366without the operating points ``\m athbf{d_{op}}``.
367367"""
368- function initpred! (mpc:: PredictiveController , model:: NonLinModel , d, D̂, Ŷs , R̂y )
368+ function initpred! (mpc:: PredictiveController , model:: SimModel , d, D̂, Ŷs , R̂y )
369369 mpc. F[:] = Ŷs + mpc. Yop
370370 if model. nd ≠ 0
371371 mpc. d0[:], mpc. D̂0[:] = d - model. dop, D̂ - mpc. Dop
@@ -392,12 +392,8 @@ function linconstraint!(mpc::PredictiveController, model::LinModel)
392392 set_normalized_rhs .(mpc. optim[:linconstraint ], mpc. con. b[mpc. con. i_b])
393393end
394394
395- @doc raw """
396- linconstraint!(mpc::PredictiveController, model::NonLinModel)
397-
398- Set `b` that excludes predicted output ``\m athbf{Ŷ}`` constraints for [`NonLinModel`](@ref).
399- """
400- function linconstraint! (mpc:: PredictiveController , model:: NonLinModel )
395+ " Set `b` excluding predicted output constraints when `model` is not a [`LinModel`](@ref)."
396+ function linconstraint! (mpc:: PredictiveController , model:: SimModel )
401397 mpc. con. b[:] = [
402398 - mpc. con. Umin + mpc. T_Hc* (mpc. estim. lastu0 + model. uop)
403399 + mpc. con. Umax - mpc. T_Hc* (mpc. estim. lastu0 + model. uop)
@@ -870,14 +866,7 @@ function init_linconstraint(::LinModel,
870866 return A, i_b, b
871867end
872868
873- @doc raw """
874- init_linconstraint(model::NonLinModel,
875- A_Umin, A_Umax, A_ΔŨmin, A_ΔŨmax, A_Ŷmin, A_Ŷmax,
876- i_Umin, i_Umax, i_ΔŨmin, i_ΔŨmax, i_Ŷmin, i_Ŷmax
877- )
878-
879- Init the values without predicted output constraints if `model` is not a [`LinModel`](@ref).
880- """
869+ " Init values without predicted output constraints if `model` is not a [`LinModel`](@ref)."
881870function init_linconstraint (:: SimModel ,
882871 A_Umin, A_Umax, A_ΔŨmin, A_ΔŨmax, _ , _ ,
883872 i_Umin, i_Umax, i_ΔŨmin, i_ΔŨmax, _ , _
0 commit comments