Skip to content

Commit fc00d65

Browse files
committed
test: new MovingHorizonEstimator test to improve coverage of the univariate case
1 parent 007fd17 commit fc00d65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/2_test_state_estim.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,11 @@ end
990990
info = getinfo(mhe5)
991991
@test info[:x̂] x̂ atol=1e-9
992992
@test info[:Ŷ][end-1:end] [50, 30] atol=1e-9
993+
# for coverage of NLP functions, the univariate syntax of JuMP.@operator
994+
mhe6 = MovingHorizonEstimator(nonlinmodel, He=1, Cwt=Inf)
995+
setconstraint!(mhe6, v̂min=[-51,-52], v̂max=[53,54])
996+
= preparestate!(mhe6, [50, 30], [5])
997+
@test zeros(6) atol=1e-9
993998
@test_nowarn ModelPredictiveControl.info2debugstr(info)
994999
end
9951000

0 commit comments

Comments
 (0)