218
218
end
219
219
220
220
u0 = [:X => 8 , :Y => 8 ]
221
- ps_int = (:p => 1 .0 , :k => 2.0 , :n1 => 3 , :n2 => 4 , :d => 0.1 )
222
- ps_dec = [:p => 1 .0 , :k => 2.0 , :n1 => 0.5 , :n2 => 2.5 , :d => 0.1 ]
221
+ ps_int = (:p => 2 .0 , :k => 0.01 , :n1 => 3 , :n2 => 4 , :d => 0.2 )
222
+ ps_dec = [:p => 2 .0 , :k => 0.01 , :n1 => 0.5 , :n2 => 2.5 , :d => 0.2 ]
223
223
tspan = (0.0 , 10.0 )
224
224
225
225
# Test ODE simulations with integer coefficients.
@@ -243,11 +243,13 @@ let
243
243
@test solve (sprob_dec, ImplicitEM (); seed) ≈ solve (sprob_dec_ref, ImplicitEM (); seed)
244
244
245
245
# Tests jump simulations with integer coefficients.
246
- dprob_int = DiscreteProblem (rs_int, u0, tspan , ps_int)
247
- dprob_int_ref = DiscreteProblem (rs_ref_int, u0, tspan , ps_int)
246
+ dprob_int = DiscreteProblem (rs_int, u0, ( 0.0 , 100000.0 ) , ps_int)
247
+ dprob_int_ref = DiscreteProblem (rs_ref_int, u0, ( 0.0 , 100000.0 ) , ps_int)
248
248
jprob_int = JumpProblem (rs_int, dprob_int, Direct (); rng)
249
249
jprob_int_ref = JumpProblem (rs_ref_int, dprob_int_ref, Direct (); rng)
250
- @test solve (jprob_int, SSAStepper (); seed) ≈ solve (jprob_int_ref, SSAStepper (); seed)
250
+ sol_int = solve (jprob_int, SSAStepper (); seed)
251
+ sol_int_ref = solve (jprob_int_ref, SSAStepper (); seed)
252
+ @test mean (sol_int[:Y ]) ≈ mean (sol_int_ref[:Y ]) atol = 1e-2 rtol = 1e-2
251
253
end
252
254
253
255
# Check that jump simulations (implemented with and without symbolic stoichiometries) yield simulations
0 commit comments