We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f4a05b commit ccecabeCopy full SHA for ccecabe
src/estimator/mhe/execute.jl
@@ -237,10 +237,12 @@ function initpred!(estim::MovingHorizonEstimator, model::LinModel)
237
M_Nk = [estim.invP̄ zeros(nx̂, nYm); zeros(nYm, nx̂) invR̂_Nk]
238
Ñ_Nk = [fill(C, nϵ, nϵ) zeros(nϵ, nx̂+nŴ); zeros(nx̂, nϵ+nx̂+nŴ); zeros(nŴ, nϵ+nx̂) invQ̂_Nk]
239
M_Nk_ẼZ̃ = M_Nk*ẼZ̃
240
- mul!(estim.q̃[1:nZ̃], M_Nk_ẼZ̃', FZ̃)
241
- lmul!(2, estim.q̃[1:nZ̃])
+ @views mul!(estim.q̃[1:nZ̃], M_Nk_ẼZ̃', FZ̃)
+ @views lmul!(2, estim.q̃[1:nZ̃])
242
estim.p .= dot(FZ̃, M_Nk, FZ̃)
243
- estim.H̃.data[1:nZ̃, 1:nZ̃] .= lmul!(2, (ẼZ̃'*M_Nk*ẼZ̃ .+ Ñ_Nk))
+ estim.H̃.data[1:nZ̃, 1:nZ̃] = Ñ_Nk
244
+ @views mul!(estim.H̃.data[1:nZ̃, 1:nZ̃], ẼZ̃', M_Nk_ẼZ̃, 1, 1)
245
+ @views lmul!(2, estim.H̃.data[1:nZ̃, 1:nZ̃])
246
Z̃var_Nk::Vector{VariableRef} = @views optim[:Z̃var][1:nZ̃]
247
H̃_Nk = @views estim.H̃[1:nZ̃,1:nZ̃]
248
q̃_Nk = @views estim.q̃[1:nZ̃]
0 commit comments