Load the ilmtools package...
In [1]:
include("ilmtools.jl")
Out[1]:
Generate a population from a bi-variate uniform distribution...
In [2]:
pop_db1 = create_pop_db_univariates(1000, Uniform(0,25), Uniform(0,25))
Out[2]:
Generate the initial infection and propagate infection through population (SIR model) in continuous time with parameters $\alpha=2, \beta=6, \gamma=5$
In [3]:
evdb = infect_recover_loop(pop_db1, "continuous", "SIR", 2, 6, 5)
Out[3]:
Visualize infection (susceptible, infected, and recovered) through time
In [4]:
evseries = state_timeseries(evdb)
plot(evseries, x="time", y="S", Geom.line)
Out[4]:
In [5]:
plot(evseries, x="time", y="I", Geom.line)
Out[5]:
In [6]:
plot(evseries, x="time", y="R", Geom.line)
Out[6]:
Spatial plots with a time window of 0.1 (or watch a youtube demo https://www.youtube.com/watch?v=bD0Q2xLPpvo)
In [7]:
state_animation(0.1, evdb, pop_db1)
Out[7]:
In [8]: