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

Modification of sir_tauleap for new simulate functions + add of

simulation tests for sir_tauleap and poisson.
parent 169c93d2
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,10 @@ function SIR_tauleap_f!(xnplus1::Vector{Int}, l_t::Vector{Float64}, l_tr::Vector
a2 = p[2] * xn[2]
l_a = SVector(a1, a2)
asum = sum(l_a)
if asum == 0.0
copyto!(xnplus1, xn)
return nothing
end
# column-major order
nu_1 = SVector(-1, 1, 0)
nu_2 = SVector(0, -1, 1)
......
......@@ -14,5 +14,7 @@ if !isdir(str_dir_pics) mkdir(str_dir_pics) end
@test include("simulation/sim_er_row_buffer_bounded.jl")
@test include("simulation/sim_pm_er.jl")
@test include("simulation/sim_pm_sync_er.jl")
@test include("simulation/sim_sir_tauleap.jl")
@test include("simulation/sim_poisson.jl")
end
using MarkovProcesses
load_plots()
load_model("poisson")
σ = simulate(poisson)
MarkovProcesses.plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_poisson.png")
return true
using MarkovProcesses
load_plots()
load_model("SIR_tauleap")
σ = simulate(SIR_tauleap)
MarkovProcesses.plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_sir_tauleap.png")
return true
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