File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ const MSG_LINMODEL_ERR = " estim.model type must be a LinModel, see ManualEstimator docstring " *
2+ " to use a nonlinear state estimator with a linear controller"
3+
14struct PredictiveControllerBuffer{NT<: Real }
25 u :: Vector{NT}
36 Z̃ :: Vector{NT}
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ function ExplicitMPC(
157157 N_Hc = Diagonal (repeat (Nwt, Hc)),
158158 L_Hp = Diagonal (repeat (Lwt, Hp)),
159159) where {NT<: Real , SE<: StateEstimator{NT} }
160- isa (estim. model, LinModel) || error (" estim.model type must be a LinModel " )
160+ isa (estim. model, LinModel) || error (MSG_LINMODEL_ERR )
161161 nk = estimate_delays (estim. model)
162162 if Hp ≤ nk
163163 @warn (" prediction horizon Hp ($Hp ) ≤ estimated number of delays in model " *
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ function LinMPC(
256256 transcription:: TranscriptionMethod = DEFAULT_LINMPC_TRANSCRIPTION,
257257 optim:: JM = JuMP. Model (DEFAULT_LINMPC_OPTIMIZER, add_bridges= false ),
258258) where {NT<: Real , SE<: StateEstimator{NT} , JM<: JuMP.GenericModel }
259- isa (estim. model, LinModel) || error (" estim.model type must be a LinModel " )
259+ isa (estim. model, LinModel) || error (MSG_LINMODEL_ERR )
260260 nk = estimate_delays (estim. model)
261261 if Hp ≤ nk
262262 @warn (" prediction horizon Hp ($Hp ) ≤ estimated number of delays in model " *
You can’t perform that action at this time.
0 commit comments