Skip to content

Commit f26344f

Browse files
committed
debug: fill MHE predictios with 0s when Nk < He
1 parent e18ab07 commit f26344f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/estimator/mhe/execute.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,10 @@ function predict_mhe!(
857857
)
858858
nu, nd, nx̂, nŵ, nym, Nk = model.nu, model.nd, estim.nx̂, estim.nx̂, estim.nym, estim.Nk[]
859859
x̂0 = x̂0arr
860+
if Nk < estim.He
861+
V̂ .= 0 # fill unused values a 0 for tracer sparsity detection
862+
X̂0 .= 0
863+
end
860864
if estim.direct # p = 0
861865
ŷ0next = ŷ0
862866
d0 = @views estim.D0[1:nd]

0 commit comments

Comments
 (0)