SI: Susceptible-Infected (no recovery)
SIS: Susceptible-Infected-Susceptible (no immunity)
SIR: Susceptible-Infected-Recovered (recovered individuals are immune)
Input probability of infection > 1 or < 0 will be considered as 0 or 1, respectively.
Recovery time is only applicable for the SIS and SIR models. Initial number of recovered people can only be specified for the SIR model.
Animation begins to slow down in environments with > 400 individuals.
About: This project was created predominantly using JavaScript, along with a little jQuery and the Raphael.js framework for graphics. It features a nifty sorting-based algorithm for efficient collision recognition. A link to the source code will be provided shortly.
Have questions? Ideas for improvements? Found a bug? Get in touch here.
Usage: I'd suggest starting by messing around with initial counts of susceptible and infected people, and with probability of infection. Check out the different models and experiment with various birth and death rates. Find a combination of parameters that will result in a dynamic equilibrium! There are many many possibilities. Finally, note how very small differences in parameters such as recovery time or probability of infection can mean the difference between an infection rapidly proliferating or dying out.
As it stands, starting position and speed for each individual are based on simple random number generation. Of course, contact patterns in real environments are much more complicated than that. Future iterations may feature movement based on actual social contact theory. For example, individuals could be clustered into families with whom they'd have frequent contact. Alternately, each individual could maintain a particular set of other individuals with whom they make regular contact at specified rates.
It will also be necessary to standardize time in future iterations. This was tough to do in the first iteration because performance constraints in high-volume environments cause time to "slow down", meaning animation is more choppy. Once time is standardized, useful parameters like contact rate can be reported and the relationship between contact rate and environment density can be examined.