diff --git a/src/discrete_blocks.jl b/src/discrete_blocks.jl index fad62e0..ff342c6 100644 --- a/src/discrete_blocks.jl +++ b/src/discrete_blocks.jl @@ -169,6 +169,7 @@ A discrete-time noise source that returns a normally-distributed value at each c end @equations begin y(z) ~ mu + sigma*Symbolics.term(randn, rng; type=Real) + output.u ~ y end end @@ -205,7 +206,8 @@ A discrete-time noise source that returns a uniformly distributed value at each rng = Random.Xoshiro() end @equations begin - y(z) ~ l + (u-l)*Symbolics.term(randn, rng; type=Real) + y(z) ~ l + (u-l)*Symbolics.term(rand, rng; type=Real) + output.u ~ y end end diff --git a/test/test_discrete_blocks.jl b/test/test_discrete_blocks.jl index f16fb7c..2871cb8 100644 --- a/test/test_discrete_blocks.jl +++ b/test/test_discrete_blocks.jl @@ -297,11 +297,10 @@ using ModelingToolkitStandardLibrary.Blocks @named m = NoiseModel() m = complete(m) - @test_skip begin # https://github.com/JuliaComputing/JuliaSimCompiler.jl/issues/397 - ssys = structural_simplify(IRSystem(m)) - prob = ODEProblem(ssys, [], (0.0, 10.0)) - sol = solve(prob, Tsit5()) - end + ssys = structural_simplify(IRSystem(m)) + prob = ODEProblem(ssys, [], (0.0, 10.0)) + sol = solve(prob, Tsit5()) + @test !all(iszero, sol.u) # TODO: add tests end