Load the ilmtools package...
In [1]:
include("ilmtools.jl")
Out[1]:
Generate a population with a bivariate uniform spatial distribution (over a 25 by 25 unit area)
In [2]:
pop_db1 = create_pop_db_univariates(625, Uniform(0,25), Uniform(0,25))
Out[2]:
Generate the initial infection and propagate infection through population (SI model) in continuous time with parameters $\alpha=2$ and $\beta=6$
In [3]:
evdb = infect_recover_loop(pop_db1, "continuous", "SI", 2, 6, Inf)
Out[3]:
Visualize infection (susceptible and infected) 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]:
Spatial plots with a time window of 0.1 (youtube link: https://www.youtube.com/watch?v=QWcTAEdglGU)
In [6]:
state_animation(0.1, evdb, pop_db1)
Out[6]: