Basic Epidemic modeler using cellular automaton in Java
Pestilence uses a 2 dimensional lattice to simulate epidemic scenarios. Each cell's state is either Susceptible, Incubating, Infectious, Dead, or Immune. The lattice is updated by looping over each incubating and infectious cell. If the cell is infectious, and its timeInfected is equal to the incubation period of the Pathogen object, it moves on to the infectious state and its timeInfected reset. Otherwise, its timeInfected increments. If the cell is infectious, a random neighbour is chosen and has a probability of being infected (Susceptible -> Incubating), this proability is the R0 parameter of the Pathogen object. And its timeInfected incremented.
The Pathogen object stores data pertaining to the simulated Pathogen:
- immunity_gain: The probability that, upon reaching the end of their infectious period, an infectious cell will transfer to the Immune state
- R0: The probability that an infection is successfully transmitted (Susceptible -> Infected)
- fatality: The probability that, upon reaching the end of their infectious period, an infectious cell will transfer to the Dead state
- incubation: Time in frames/ iterations that a cell is Incubating
- infectious: Time in frames/ iterations that a cell is Infectious
parameters:
- R0 = 0.45
- fatality = 0.0
- incubation = 2
- infectious = 12
- immunity_gain = 0.75
- infection seed probability = 0.0005 (probability that a cell is initialized as infected at epoch 0)
parameters:
- R0 = 0.45
- fatality = 0.0
- incubation = 2
- infectious = 12
- immunity_gain = 1.0
- infection seed probability = 0.0005 (probability that a cell is initialized as infected at epoch 0)
parameters:
- R0 = 0.45
- fatality = 0.0
- incubation = 2
- infectious = 12
- immunity_gain = 0.0
- infection seed probability = 0.0005 (probability that a cell is initialized as infected at epoch 0)