Skip to content

Commit 64ee27f

Browse files
committed
connect output
1 parent 1ab9deb commit 64ee27f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/discrete_blocks.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ A discrete-time noise source that returns a normally-distributed value at each c
169169
end
170170
@equations begin
171171
y(z) ~ mu + sigma*Symbolics.term(randn, rng; type=Real)
172+
output.u ~ y
172173
end
173174
end
174175

@@ -205,7 +206,8 @@ A discrete-time noise source that returns a uniformly distributed value at each
205206
rng = Random.Xoshiro()
206207
end
207208
@equations begin
208-
y(z) ~ l + (u-l)*Symbolics.term(randn, rng; type=Real)
209+
y(z) ~ l + (u-l)*Symbolics.term(rand, rng; type=Real)
210+
output.u ~ y
209211
end
210212
end
211213

test/test_discrete_blocks.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,10 @@ using ModelingToolkitStandardLibrary.Blocks
297297

298298
@named m = NoiseModel()
299299
m = complete(m)
300-
@test_skip begin # https://github.com/JuliaComputing/JuliaSimCompiler.jl/issues/397
301-
ssys = structural_simplify(IRSystem(m))
302-
prob = ODEProblem(ssys, [], (0.0, 10.0))
303-
sol = solve(prob, Tsit5())
304-
end
300+
ssys = structural_simplify(IRSystem(m))
301+
prob = ODEProblem(ssys, [], (0.0, 10.0))
302+
sol = solve(prob, Tsit5())
303+
@test !all(iszero, sol.u)
305304
# TODO: add tests
306305
end
307306

0 commit comments

Comments
 (0)