@@ -646,10 +646,10 @@ end
646646
647647 mhe7 = MovingHorizonEstimator (nonlinmodel, He= 10 )
648648 @test mhe7. He == 10
649- @test length (mhe7. X̂ ) == 10 * 6
650- @test length (mhe7. Ym ) == 10 * 2
651- @test length (mhe7. U ) == 10 * 2
652- @test length (mhe7. D ) == 10 * 1
649+ @test length (mhe7. X̂0 ) == 10 * 6
650+ @test length (mhe7. Y0m ) == 10 * 2
651+ @test length (mhe7. U0 ) == 10 * 2
652+ @test length (mhe7. D0 ) == 10 * 1
653653 @test length (mhe7. Ŵ) == 10 * 6
654654
655655 mhe8 = MovingHorizonEstimator (nonlinmodel, He= 5 , nint_u= [1 , 1 ], nint_ym= [0 , 0 ])
762762 linmodel1 = setop! (LinModel (sys,Ts,i_u= [1 ,2 ]), uop= [10 ,50 ], yop= [50 ,30 ])
763763 mhe1 = MovingHorizonEstimator (linmodel1, He= 1 , nint_ym= 0 , Cwt= 1e3 )
764764 setconstraint! (mhe1, x̂min= [- 51 ,- 52 ], x̂max= [53 ,54 ])
765- @test all ((mhe1. con. X̂min , mhe1. con. X̂max ) .≈ ([- 51 ,- 52 ], [53 ,54 ]))
766- @test all ((mhe1. con. x̃min [2 : end ], mhe1. con. x̃max [2 : end ]) .≈ ([- 51 ,- 52 ], [53 ,54 ]))
765+ @test all ((mhe1. con. X̂0min , mhe1. con. X̂0max ) .≈ ([- 51 ,- 52 ], [53 ,54 ]))
766+ @test all ((mhe1. con. x̃0min [2 : end ], mhe1. con. x̃0max [2 : end ]) .≈ ([- 51 ,- 52 ], [53 ,54 ]))
767767 setconstraint! (mhe1, ŵmin= [- 55 ,- 56 ], ŵmax= [57 ,58 ])
768768 @test all ((mhe1. con. Ŵmin, mhe1. con. Ŵmax) .≈ ([- 55 ,- 56 ], [57 ,58 ]))
769769 setconstraint! (mhe1, v̂min= [- 59 ,- 60 ], v̂max= [61 ,62 ])
778778
779779 mhe2 = MovingHorizonEstimator (linmodel1, He= 4 , nint_ym= 0 , Cwt= 1e3 )
780780 setconstraint! (mhe2, X̂min= - 1 (1 : 10 ), X̂max= 1 (1 : 10 ))
781- @test all ((mhe2. con. X̂min , mhe2. con. X̂max ) .≈ (- 1 (3 : 10 ), 1 (3 : 10 )))
782- @test all ((mhe2. con. x̃min [2 : end ], mhe2. con. x̃max [2 : end ]) .≈ (- 1 (1 : 2 ), 1 (1 : 2 )))
781+ @test all ((mhe2. con. X̂0min , mhe2. con. X̂0max ) .≈ (- 1 (3 : 10 ), 1 (3 : 10 )))
782+ @test all ((mhe2. con. x̃0min [2 : end ], mhe2. con. x̃0max [2 : end ]) .≈ (- 1 (1 : 2 ), 1 (1 : 2 )))
783783 setconstraint! (mhe2, Ŵmin= - 1 (11 : 18 ), Ŵmax= 1 (11 : 18 ))
784784 @test all ((mhe2. con. Ŵmin, mhe2. con. Ŵmax) .≈ (- 1 (11 : 18 ), 1 (11 : 18 )))
785785 setconstraint! (mhe2, V̂min= - 1 (31 : 38 ), V̂max= 1 (31 : 38 ))
0 commit comments