Skip to content
Snippets Groups Projects
Commit ec105c9a authored by Bentriou Mahmoud's avatar Bentriou Mahmoud
Browse files

fix in sir tauleap model

parent c7e07a4d
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,8 @@ t0_SIR_tauleap = 0.0 ...@@ -23,8 +23,8 @@ t0_SIR_tauleap = 0.0
# column-major order # column-major order
nu_1 = (-1, 1, 0) nu_1 = (-1, 1, 0)
nu_2 = (0, -1, 1) nu_2 = (0, -1, 1)
nbr_R1 = rand(Poisson(a1*tau)) nbr_R1 = (a1 > 0.0) ? rand(Poisson(a1*tau)) : 0.0
nbr_R2 = rand(Poisson(a2*tau)) nbr_R2 = (a2 > 0.0) ? rand(Poisson(a2*tau)) : 0.0
for i = 1:3 for i = 1:3
@inbounds xnplus1[i] = xn[i]+ nbr_R1*nu_1[i] + nbr_R2*nu_2[i] @inbounds xnplus1[i] = xn[i]+ nbr_R1*nu_1[i] + nbr_R2*nu_2[i]
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment