Skip to content

Commit

Permalink
rm duplicated test
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Sep 3, 2024
1 parent 6d6b4b9 commit 3f4f9f0
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions test/test_discrete_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f4f9f0

Please sign in to comment.