Skip to content

Commit 9c6b44d

Browse files
committed
Merge branch 'main' into bench_ms_mhe
2 parents 9eb3c8b + 7fb1bd4 commit 9c6b44d

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎Project.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ModelPredictiveControl"
22
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
3-
version = "2.9.1"
3+
version = "2.9.2"
44
authors = ["Francis Gagnon"]
55

66
[deps]

‎src/estimator/execute.jl‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ function initstate!(estim::StateEstimator, u, ym, d=estim.buffer.empty)
182182
init_estimate!(estim, estim.model, y0m, d0, u0)
183183
# --- init covariance error estimate, if applicable ---
184184
init_estimate_cov!(estim, y0m, d0, u0)
185-
x̂ = estim.x̂0 + estim.x̂op
185+
estim.prepared[] = false
186+
x̂ = estim.buffer.x̂
187+
x̂ .= estim.x̂0 .+ estim.x̂op
186188
return x̂
187189
end
188190

‎test/2_test_state_estim.jl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ end
7575
@test evaloutput(kalmanfilter1) ≈ kalmanfilter1() ≈ [50, 30]
7676
@test evaloutput(kalmanfilter1, d) ≈ kalmanfilter1(d) ≈ [50, 30]
7777
@test initstate!(kalmanfilter1, [10, 50], [50, 30+1]) ≈ [zeros(3); [1]]
78+
@test kalmanfilter1.prepared[] == false
7879
linmodel2 = LinModel(append(tf(1, [1, 0]), tf(2, [10, 1])), 1.0)
7980
kalmanfilter2 = SteadyKalmanFilter(linmodel2, nint_u=[1, 1], direct=false)
8081
x = initstate!(kalmanfilter2, [10, 3], [0.5, 6+0.1])

0 commit comments

Comments
 (0)