Skip to content

Commit d38d1c8

Browse files
committed
add rng in JumpProblems that are simualted
1 parent efda47c commit d38d1c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/simulation_and_solving/hybrid_models.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ let
101101
rn = complete(extend(rn2, rn))
102102
tspan = (0.0, 200.0)
103103
jinputs = JumpInputs(rn, u0map, tspan, pmap; save_positions = (false, false))
104-
jprob = JumpProblem(jinputs; rng, save_positions = (false, false))
104+
jprob = JumpProblem(jinputs; rng, save_positions = (false, false); rng)
105105
Xsamp = 0.0
106106
Nsims = 4000
107107
for n in 1:Nsims
@@ -146,8 +146,8 @@ let
146146
ps_hybrid = [ps_ode; ps_jump]
147147
tspan = (0.0, 10000.0)
148148
ode_prob = ODEProblem(rn_ode, u0_ode, tspan, ps_ode)
149-
jump_prob = JumpProblem(JumpInputs(rn_jump, u0_jump, tspan, ps_jump; remake_warn = false); save_positions = (false,false))
150-
hybrid_prob = JumpProblem(JumpInputs(rn_hybrid, u0_hybrid, tspan, ps_hybrid; remake_warn = false); save_positions = (false,false))
149+
jump_prob = JumpProblem(JumpInputs(rn_jump, u0_jump, tspan, ps_jump; remake_warn = false); save_positions = (false,false); rng)
150+
hybrid_prob = JumpProblem(JumpInputs(rn_hybrid, u0_hybrid, tspan, ps_hybrid; remake_warn = false); save_positions = (false,false); rng)
151151

152152
# Performs simulations. Checks that ODE parts are identical. Check that jump parts have similar statistics.
153153
ode_sol = solve(ode_prob, Tsit5(); saveat = 1.0, abstol = 1e-10, reltol = 1e-10)

0 commit comments

Comments
 (0)