@@ -30,8 +30,8 @@ N = 40_000
3030sol1 = solve (EnsembleProblem (jump_iipprob),SimpleTauLeaping ();dt= 1.0 ,trajectories = N)
3131sol2 = solve (EnsembleProblem (jump_iipprob),TauLeaping ();dt= 1.0 ,adaptive= false ,save_everystep= false ,trajectories = N)
3232
33- mean1 = mean ([sol1[i][end ,end ] for i in 1 : N])
34- mean2 = mean ([sol2[i][end ,end ] for i in 1 : N])
33+ mean1 = mean ([sol1. u [i][end ,end ] for i in 1 : N])
34+ mean2 = mean ([sol2. u [i][end ,end ] for i in 1 : N])
3535@test mean1 ≈ mean2 rtol= 1e-2
3636
3737f (du,u,p,t) = (du .= 0 )
@@ -42,11 +42,11 @@ jumpdiff_iipprob = JumpProblem(iip_sdeprob,Direct(),rj)
4242@time sol = solve (jumpdiff_iipprob,ImplicitEM ();dt= 1.0 ,adaptive= false )
4343
4444sol = solve (EnsembleProblem (jumpdiff_iipprob),EM ();dt= 1.0 ,trajectories = N)
45- meanX = mean ([sol[i][end ,end ] for i in 1 : N])
45+ meanX = mean ([sol. u [i][end ,end ] for i in 1 : N])
4646@test mean1 ≈ meanX rtol= 1e-2
4747
4848sol = solve (EnsembleProblem (jumpdiff_iipprob),ImplicitEM ();dt= 1.0 ,trajectories = N)
49- meanX = mean ([sol[i][end ,end ] for i in 1 : N])
49+ meanX = mean ([sol. u [i][end ,end ] for i in 1 : N])
5050@test mean1 ≈ meanX rtol= 1e-2
5151
5252iip_prob = DiscreteProblem ([999 ,1 ,0 ],(0.0 ,250.0 ))
@@ -68,7 +68,7 @@ jump_prob = JumpProblem(prob,Direct(),rj)
6868sol = solve (jump_prob,TauLeaping (),reltol= 5e-2 )
6969
7070sol2 = solve (EnsembleProblem (jump_prob),TauLeaping ();dt= 1.0 ,adaptive= false ,save_everystep= false ,trajectories = N)
71- mean2 = mean ([sol2[i][end ,end ] for i in 1 : N])
71+ mean2 = mean ([sol2. u [i][end ,end ] for i in 1 : N])
7272@test mean1 ≈ mean2 rtol= 1e-2
7373
7474foop (u,p,t) = [0.0 ,0.0 ,0.0 ]
@@ -79,9 +79,9 @@ jumpdiff_prob = JumpProblem(oop_sdeprob,Direct(),rj)
7979@time sol = solve (jumpdiff_prob,ImplicitEM ();dt= 1.0 )
8080
8181sol = solve (EnsembleProblem (jumpdiff_prob),EM ();dt= 1.0 ,trajectories = 10_000 )
82- meanX = mean ([sol[i][end ,end ] for i in 1 : 10_000 ])
82+ meanX = mean ([sol. u [i][end ,end ] for i in 1 : 10_000 ])
8383@test mean1 ≈ meanX rtol= 1e-2
8484
8585sol = solve (EnsembleProblem (jumpdiff_prob),ImplicitEM ();dt= 1.0 ,trajectories = 1_000 )
86- meanX = mean ([sol[i][end ,end ] for i in 1 : 1_000 ])
86+ meanX = mean ([sol. u [i][end ,end ] for i in 1 : 1_000 ])
8787@test mean1 ≈ meanX rtol= 1e-1
0 commit comments