From 3f4f9f082028c38075582ae6011feefd2faea223 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Tue, 3 Sep 2024 16:54:00 +0200 Subject: [PATCH] rm duplicated test --- test/test_discrete_blocks.jl | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/test/test_discrete_blocks.jl b/test/test_discrete_blocks.jl index d81a568..cdd490f 100644 --- a/test/test_discrete_blocks.jl +++ b/test/test_discrete_blocks.jl @@ -354,32 +354,6 @@ end sol = solve(prob, Tsit5()) @test !all(iszero, sol.u) tv = 0:k.clock.dt:sol.t[end] - @test std(sol(tv, idxs = m.plant.u)) ≈ 1 rtol=0.1 - @test mean(sol(tv, idxs = m.plant.u)) ≈ 0 atol=0.08 -end - -@testset "UniformNoise" begin - k = ShiftIndex(Clock(0.01)) - - @mtkmodel NoiseModel begin - @components begin - noise = UniformNoise(z = k) - zoh = ZeroOrderHold(z = k) - plant = FirstOrder(T = 1e-4) # Included due to bug with only discrete-time systems - end - @equations begin - connect(noise.output, zoh.input) - connect(zoh.output, plant.input) - end - end - - @named m = NoiseModel() - m = complete(m) - ssys = structural_simplify(IRSystem(m)) - prob = ODEProblem(ssys, [], (0.0, 10.0)) - sol = solve(prob, Tsit5()) - @test !all(iszero, sol.u) - tv = 0:k.clock.dt:sol.t[end] @test minimum(sol(tv, idxs = m.plant.u)) ≈ 0 atol=0.02 @test maximum(sol(tv, idxs = m.plant.u)) ≈ 1 atol=0.02 end