Skip to content

Commit b2ba5df

Browse files
committed
test: MHE construction with wrong covestim
1 parent 58e7d15 commit b2ba5df

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/2_test_state_estim.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,14 @@ end
904904
@test_throws ArgumentError MovingHorizonEstimator(linmodel)
905905
@test_throws ArgumentError MovingHorizonEstimator(linmodel, He=0)
906906
@test_throws ArgumentError MovingHorizonEstimator(linmodel, Cwt=-1)
907+
@test_throws ErrorException MovingHorizonEstimator(
908+
nonlinmodel, 5, 1:2, 0, [1, 1], I_6, I_6, I_2, Inf; optim,
909+
covestim = InternalModel(nonlinmodel)
910+
)
911+
@test_throws ArgumentError MovingHorizonEstimator(
912+
nonlinmodel, 5, 1:2, 0, [1, 1], I_6, I_6, I_2, Inf; optim,
913+
covestim = UnscentedKalmanFilter(nonlinmodel, nint_ym=[2,2])
914+
)
907915
end
908916

909917
@testitem "MovingHorizonEstimator estimation and getinfo" setup=[SetupMPCtests] begin

0 commit comments

Comments
 (0)