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

small fix in sir tau leap simulation

parent c1d2be9c
No related branches found
No related tags found
No related merge requests found
@everywhere import Distributions: Poisson, rand
d=3
d=4
k=3
dict_var_SIR_tauleap = Dict(:S => 1, :I => 2, :R => 3)
dict_var_SIR_tauleap = Dict(:S => 1, :I => 2, :R => 3, :step => 4)
dict_p_SIR_tauleap = Dict(:ki => 1, :kr => 2, :tau => 3)
l_tr_SIR_tauleap = [:U]
p_SIR_tauleap = [0.0012, 0.05, 5.0]
x0_SIR_tauleap = [95, 5, 0]
x0_SIR_tauleap = [95, 5, 0, 0]
t0_SIR_tauleap = 0.0
@everywhere function SIRTauleap_f!(xnplus1::Vector{Int}, l_t::Vector{Float64}, l_tr::Vector{Transition},
xn::Vector{Int}, tn::Float64, p::Vector{Float64})
......@@ -28,6 +28,7 @@ t0_SIR_tauleap = 0.0
for i = 1:3
@inbounds xnplus1[i] = xn[i]+ nbr_R1*nu_1[i] + nbr_R2*nu_2[i]
end
xnplus1[4] += 1
l_t[1] = tn + tau
l_tr[1] = :U
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