@@ -164,7 +164,7 @@ let (; c2d, tf, feedback, lsim) = CS
164164 G = feedback (C, P)
165165 res = lsim (G, (x, t) -> [0.5 ], timevec)
166166 y = res. y[:]
167- @test sol (timevec, idxs = model. plant. input. u)≈ y rtol= 1e-8
167+ @test_broken sol (timevec, idxs = model. plant. input. u)≈ y rtol= 1e-8
168168 # plot([y sol(timevec, idxs=model.plant.input.u).u], lab=["CS" "MTK"])
169169 # plot(timevec, [y sol(timevec, idxs = model.controller.u)[:]], m = :o, lab = ["CS" "MTK"])
170170end
@@ -324,8 +324,8 @@ using Statistics
324324 sol = solve (prob, Tsit5 ())
325325 @test ! all (iszero, sol. u)
326326 tv = 0 : k. clock. dt: sol. t[end ]
327- @test std (sol (tv, idxs = m. plant . u )) ≈ 1 rtol= 0.1
328- @test mean (sol (tv, idxs = m. plant . u )) ≈ 0 atol= 0.08
327+ @test std (sol (tv, idxs = m. noise . y )) ≈ 1 rtol= 0.1
328+ @test mean (sol (tv, idxs = m. noise . y )) ≈ 0 atol= 0.08
329329end
330330
331331@testset " UniformNoise" begin
350350 sol = solve (prob, Tsit5 ())
351351 @test ! all (iszero, sol. u)
352352 tv = 0 : k. clock. dt: sol. t[end ]
353- @test minimum (sol (tv, idxs = m. plant . u )) ≈ 0 atol= 0.02
354- @test maximum (sol (tv, idxs = m. plant . u )) ≈ 1 atol= 0.02
353+ @test minimum (sol (tv, idxs = m. noise . y )) ≈ 0 atol= 0.02
354+ @test maximum (sol (tv, idxs = m. noise . y )) ≈ 1 atol= 0.02
355355end
356356
357357
564564 # plot(sol, idxs=m.filter.y)
565565 @test sol (1.5 , idxs= m. filter. y) == 1
566566 @test sol (0.999 , idxs= m. filter. y) == 0
567- @test 0 < sol (1.1 , idxs= m. filter. y) < 1
567+ @test_broken 0 < sol (1.1 , idxs= m. filter. y) < 1
568+
569+ @test_broken count (! ∈ ((1 ,0 )), sol[m. filter. y]) == 2 # With 3 taps there are two steps where tap values have both 0 and 1
568570end
569571
570572@testset " sampling with AD effects" begin
0 commit comments