
People move randomly about the world in one of three states: healthy but susceptible to infection (green), sick and infectious (red), and healthy and immune (gray).

The model is initialized with 150 people, of which 10 are infected. " Journal of Epidemiology, volume 109, pages 103- 123) "Seasonality and the requirements for perpetuation and eradication of viruses in populations. This model simulates the transmission and perpetuation of a virus in a human population.Įcological biologists have suggested a number of factors which may influence the survival of a directly transmitted virus within a population. "healthy " 1.0 0 - 10899396 true " " "plot count turtles with " "immune " 1.0 0 - 7500403 true " " "plot count turtles with " "sick " 1.0 0 - 2674135 true " " "plot count turtles with " Setup-constants so that carrying-capacity can be used as upper bound of number-people slider [ if random-float 100 duration If the turtle has survived past the virus' duration, then If a turtle is sick, it infects other turtles on the same patch.Īsk other turtles-here with lifespan (set at 50 years in this model). Turtles die of old age once their age exceeds the Set %immune (count turtles with / count turtles) * 100 ] Set lifespan 50 * 52 50 times 52 weeks = 50 years = 2600 weeks old This sets up basic constants of the model. set remaining-immunity immunity-duration We create a variable number of turtles of which 10 are infectious, The setup is divided into four procedures

Immunity-duration ] how many weeks immunity lasts %immune what % of the population is immuneĬhance-reproduce the probability of a turtle generating an offspring each tickĬarrying-capacity the number of turtles that can be in the world at one time [ %infected what % of the population is infectious Sick-time how long, in weeks, the turtle has been infectiousĪge ] how many weeks old the turtle is Remaining-immunity how many weeks of immunity the turtle has left [ sick? if true, the turtle is infectious
