JSpatialEpidemic - A simulation framework to study the spatial aspect of an epidemic.
Copyright  2003 Pasquale Cariello, Raul Bagni & Roberto Berchi. 

JSpatialEpidemic implements a model described in "Bailey N.T.J., The mathematical Theory of Infectious Diseases and its application - II ed., Charles Griffin & Co. LTD, 1975, pp. 182-188" and also in "The simulation of sthocastic epidemic in two dimensions, Proc. 5th Berkeley Symp. Math, Stat. and Prob., 4, 237-257, Berkeley & Los Angeles Univ. California".

The simulation refer to a population of susceptibles located at the points of a square lattice bounded by the lines x=+-k and y=+-k (hence, the total population is n=(2k+1)^2), and the epidemic start is due to a single infected at the origin (point x=0, y=0).
An infected subject is not immediately infectious, on the contrary it become infectious only after a fixed period (the so called "latency time").
The chance of any susceptible to become infected is 1-(1-p)^r, where p is the infection rate by contact and r is the number of infectious in the Moore neighbourhood (eight nearest neighbours).
The infectious remain in this state only for the span of a tick, after it become immune.

The parameters of the simulation that the user can set at the beginning to differentiate the experiments are:
k: bound of the lattice
p: infection rate by contact 
lt: latency time
checkpoint: tick to stop simulation

The graphical output of the simulation are:
1) A bidimensional grid of 'probeable' agents differentiated by subpopulation (boundary of any given square centered on the origin, e.g. x=+-l=y where 1<=l<=k) and health state ( 0=susceptible; 1=infected; 2=infective; 3=immune).
2) A line graph showing the total number of individuals already infected (epidemic curve) and new cases of infection at every single step of the simulation;
3) A line graph showing new cases of infection for each of the k squares (only if k=5).

This code is free software. It is distributed under the GPL, see the
file LICENSE for details.

NOTE: This code was originally written for Swarm 2.1 but it works in 2.1.1 too.


