Child of COVID_19 Spread
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
ACKNOWLEDGMENT
Based on the model anamaria berea built http://modelingcommons.org/browse/one_model/6227#model_tabs_browse_nlw, we simplify and change the model, trying to emulate the spread od COVID_19 but with a quarentine situation
WHAT IS IT?
This model simulates the transmission and perpetuation of a virus in a human population. This version includes alternative visualizations of the model.
Ecological biologists have suggested a number of factors which may influence the survival of a directly transmitted virus within a population. (Yorke, et al. "Seasonality and the requirements for perpetuation and eradication of viruses in populations." Journal of Epidemiology, volume 109, pages 103-123)
This COVID19 model adapts the standard Virus Spread model to the COVID19 pandemic.
We add a situation that we are experiencing all over the world that is quarentine; people stay at home avoiding contact and in fact the chance to get sick
HOW IT WORKS
The model is initialized with any number of people between 1 and 1089, of which only 1 is infected. 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). People may die of infection or old age. When the population dips below the environment's "carrying capacity" (set at 1089 in this model) healthy people may produce healthy (but susceptible) offspring.
Some of these factors are summarized below with an explanation of how each one is treated in this model.
If you turn on call-for-quarentine then the system tell a number of turtles to stay at home (the patch where the turtle is) and can not move.
The density of the population
Population density affects how often infected, immune and susceptible individuals come into contact with each other. You can change the size of the initial population through the NUMBER-PEOPLE slider. There are 1089 maximum people to "match" for the 1089 existing patches, but several people can exist on one patch.
Agents are initialized with different ages: blue is for children under 10, green for agents beweetn 10 and 60 and yellow for agents above 60.
Population turnover
As individuals die, some who die will be infected, some will be susceptible and some will be immune. All the new individuals who are born, replacing those who die, will be susceptible. People may die from the virus, the chances of which are determined by the slider CHANCE-RECOVER, or they may die of old age. The CHANCE-RECOVER has different values depending on the age group.
In this model, people die of old age at the age of 80 years. Reproduction rate is constant in this model and approximated to worldwide reproduction rate. Each turn, if the carrying capacity hasn't been reached, every healthy individual has a 1% chance to reproduce.
Degree of immunity
If a person has been infected and recovered, how immune are they to the virus? We often assume that immunity lasts a lifetime and is assured, but in some cases immunity wears off in time and immunity might not be absolutely secure. In this model, immunity is secure, but it only lasts for a month. There is still ongoing research regarding the immunity from COVID_19.
Infectiousness (or transmissibility)
How easily does the virus spread? Some viruses with which we are familiar spread very easily. Some viruses spread from the smallest contact every time. Others (the HIV virus, which is responsible for AIDS, for example) require significant contact, perhaps many times, before the virus is transmitted. In this model, infectiousness is determined by the INFECTIOUSNESS slider and is currently adjusted to the COVID_19 R0 data, between 1.4 and 4.8
Duration of infectiousness
How long is a person infected before they either recover or die? This length of time is essentially the virus's window of opportunity for transmission to new hosts. In this model, duration of infectiousness is determined by the DURATION slider. For COVID_19, the duration is between 2 and 8 weeks.
Quarentine
If this switch is turned on, then the turtles stay at home. The percentage of turtles that remains at home is controlled by accepted-quarentine slider. You can try differents scenarios with differents percentages; if you set accepted-quarentine at 100% then no one turtle get infected.
Hard-coded parameters
Four important parameters of this model are set as constants in the code (See setup-constants
procedure). They can be exposed as sliders if desired. The turtles’ lifespan is set to 80 years, the carrying capacity of the world is set to 1089, the duration of immunity is set to 4 weeks, and the birth-rate is set to a 3.4 in 100 chance of reproducing per tick when the number of people is less than the carrying capacity.
HOW TO USE IT
Each "tick" represents a day in the time scale of this model.
The INFECTIOUSNESS slider determines how great the chance is that virus transmission will occur when an infected person and susceptible person occupy the same patch. For instance, when the slider is set to 50, the virus will spread roughly once every two chance encounters.
The DURATION slider determines the number of weeks before an infected person either dies or recovers.
The CHANCE-RECOVER slider controls the likelihood that an infection will end in recovery/immunity. When this slider is set at zero, for instance, the infection is always deadly. This slider is inactivated for COVID_19 and set to different values depending on the age group.
The WEATHER slider controls the climate and the rate of transmission of the virus based on the climate (hot/cold, humid/dry).
The MOVEMENT slider controls the speed of agents during a time tick. The purpose is to track the spread of the virus when agents are more or less restricted in their movement per day.
The SETUP button resets the graphics and plots and randomly distributes NUMBER-PEOPLE in the view. All but 1 of the people are set to be green susceptible people and 1 red infected people (of randomly distributed ages). The GO button starts the simulation and the plotting function.
The TURTLE-SHAPE chooser controls whether the people are visualized as person shapes or as circles.
When the SHOW-AGE? switch is on, each agent's age in years is displayed as its label.
When the WATCH-A-PERSON? switch is on, a single person at random, the subject, is selected for watching. The subject leaves a trail when it moves, green when the subject is healthy and red when it is sick. An inspector window is opened for that person. When the subject becomes infected, a link is created between the subject and the person who infected him. If one of those people dies, the link disappears. If the subject dies, a new subject is selected.
Three output monitors show the percent of the population that is infected, the percent that is immune, and the number of years that have passed. The plot shows (in their respective colors) the number of susceptible, infected, and immune people. It also shows the number of individuals in the total population in blue.
CALL-FOR-QUARENTINE switch turns on or off the quarentine situation for all the turtles
ACCEPTED-QUARENTINE slider sets the percentage of turtles that accept the quarentine and remains at home
THINGS TO NOTICE
The factors controlled by the three sliders interact to influence how likely the virus is to thrive in this population. Notice that in all cases, these factors must create a balance in which an adequate number of potential hosts remain available to the virus and in which the virus can adequately access those hosts.
Often there will initially be an explosion of infection since no one in the population is immune. This approximates the initial "outbreak" of a viral infection in a population, one that often has devastating consequences for the humans concerned. Soon, however, the virus becomes less common as the population dynamics change. What ultimately happens to the virus is determined by the factors controlled by the sliders.
Notice that viruses that are too successful at first (infecting almost everyone) may not survive in the long term. Since everyone infected generally dies or becomes immune as a result, the potential number of hosts is often limited. The exception to the above is when the DURATION slider is set so high that population turnover (reproduction) can keep up and provide new hosts.
THINGS TO TRY
Think about how different slider values might approximate the dynamics of real-life viruses. The famous Ebola virus in central Africa has a very short duration, a very high infectiousness value, and an extremely low recovery rate. For all the fear this virus has raised, how successful is it? Set the sliders appropriately and watch what happens.
The HIV virus, which causes AIDS, has an extremely long duration, an extremely low recovery rate, but an extremely low infectiousness value. How does a virus with these slider values fare in this model?
EXTENDING THE MODEL
Add additional sliders controlling the carrying capacity of the world (how many people can be in the world at one time), the average lifespan of the people and their birth-rate.
Build a similar model simulating viral infection of a non-human host with very different reproductive rates, lifespans, and population densities.
Add a slider controlling how long immunity lasts. You could also make immunity imperfect, so that immune turtles still have a small chance of getting infected. This chance could get higher over time.
VISUALIZATION
The alternative visualization of the model comes from guidelines presented in Kornhauser, D., Wilensky, U., & Rand, W. (2009). http://ccl.northwestern.edu/papers/2009/Kornhauser,Wilensky&Rand_DesignGuidelinesABMViz.pdf.
The SHOW-AGE? visualization enables the user to track individual agents' lifespans.
The WATCH-A-PERSON visualization enables the user to focus on one subject and to see the "micro-level" interactions, to view which agent infects the subject. You can observe the green trail of a healthy individual, which becomes red when the person gets infected. Additionally, you can see the individual who transmitted the virus linked to the subject by a line.
RELATED MODELS
- HIV
- Virus
- Virus on a Network
CREDITS AND REFERENCES
This model shows alternate visualizations of the Virus model. It uses visualization techniques as recommended in the paper:
Kornhauser, D., Wilensky, U., & Rand, W. (2009). Design guidelines for agent based model visualization. Journal of Artificial Societies and Social Simulation, JASSS, 12(2), 1.
HOW TO CITE
If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.
For the model itself:
- Wilensky, U. (1998). NetLogo Virus - Alternative Visualization model. http://ccl.northwestern.edu/netlogo/models/Virus-AlternativeVisualization. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
Please cite the NetLogo software as:
- Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
COPYRIGHT AND LICENSE
Copyright 1998 Uri Wilensky.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.
This model was created as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227.
Comments and Questions
turtles-own [ sick? ;; if true, the turtle is infectious remaining-immunity ;; how many weeks of immunity the turtle has left sick-time ;; how long, in days, the turtle has been infectious age ;; how many weeks old the turtle is quarentine? ;; if true the turtle is in quarentine ] globals [ %infected ;; what % of the population is infectious %immune ;; what % of the population is immune lifespan ;; the lifespan of a turtle chance-reproduce ;; the probability of a turtle generating an offspring each tick chance-recover ;; the probability of recovery at each tick carrying-capacity ;; the number of turtles that can be in the world at one time immunity-duration ;; how many weeks immunity lasts number-dead ] ;; how many turtles die ;; The setup is divided into four procedures to setup clear-all setup-constants setup-turtles update-global-variables update-display reset-ticks end ;; We create a variable number of turtles of which 1 are infectious, ;; and distribute them randomly to setup-turtles create-turtles number-people [ setxy random-xcor random-ycor set age random lifespan set sick-time 0 set remaining-immunity 0 set size .7 ;; easier to see get-healthy set quarentine? false ] ask n-of ((accepted-quarentine * number-people) / 100) turtles [set quarentine? call-for-quarentine] ask n-of 1 turtles [ get-sick pen-down ] end to get-sick ;; turtle procedure set sick? true pen-down set remaining-immunity 0 end to get-healthy ;; turtle procedure set sick? false set remaining-immunity 0 set sick-time 0 end to become-immune ;; turtle procedure set sick? false set sick-time 0 set remaining-immunity immunity-duration ask my-links [ die ] ;; remove link to turtle who infected us, if there was one end ;; This sets up basic constants of the model. to setup-constants set lifespan 80 * 52 * 7 ;; 80 times 52 weeks times 7 days = 50 years = 2600 weeks old = 18200 days set carrying-capacity 1089 set chance-reproduce 0.34 ;; birth rate per 1000 people per week set immunity-duration 4 * 7 ;; 4 weeks for immunity duration if Weather = "Hot-Humid" [set infectiousness .9 * infectiousness] if Weather = "Hot-Dry" [set infectiousness .95 * infectiousness] if Weather = "Cold-Dry" [set infectiousness .97 * infectiousness] if Weather = "Cold-Humid" [set infectiousness infectiousness] end to go ask turtles [ get-older if not quarentine? [move] if sick? [ recover-or-die ] ifelse sick? [ infect ] [ reproduce ] ] update-global-variables update-display tick if ticks = 100 [stop] ;; here ask for call-for-quarentine ;; if quarentine colour patch with red and inmovilize turtle if call-for-quarentine [ ask turtles with [quarentine? = true] [ ask patch pxcor pycor [set pcolor red] ] ] end to update-global-variables if count turtles > 0 [ set %infected (count turtles with [ sick? ] / count turtles) * 100 set %immune (count turtles with [ immune? ] / count turtles) * 100 ] end to update-display ask turtles [ if shape != turtle-shape [ set shape turtle-shape ] set label ifelse-value show-age? [ floor (age / 364) ] [ "" ] set color ifelse-value sick? [ red ] [ ifelse-value immune? [ grey ] [ green ] ] ;; not showing colour by age ;if age < 10 * 52 * 7 [set color blue] ;if age > 60 * 52 * 7 [set color yellow] ] stop-inspecting-dead-agents if watch-a-person? and subject = nobody [ watch one-of turtles with [ not hidden? ] clear-drawing ask subject [ pen-down ] inspect subject ] if not watch-a-person? and subject != nobody [ stop-inspecting subject ask subject [ pen-up ask my-links [ die ] ] clear-drawing reset-perspective ] ask patches [ if Weather = "Hot-Humid" [set pcolor 68] if Weather = "Hot-Dry" [set pcolor 48] if Weather = "Cold-Dry" [set pcolor 38] if Weather = "Cold-Humid" [set pcolor 108] ] end ;;Turtle counting variables are advanced. to get-older ;; turtle procedure ;; Turtles die of old age once their age exceeds the ;; lifespan (set at 80 years in this model). set age age + 1 if age > lifespan [ die ] if age > 60 * 52 * 7 [ set chance-recover .93] if age < 60 * 52 * 7 [ set chance-recover .97] if immune? [ set remaining-immunity remaining-immunity - 1 ] if sick? [ set sick-time sick-time + 1 ] end ;; Turtles move about at random. to move ;; turtle procedure rt random 100 lt random 100 fd movement end ;; If a turtle is sick, it infects other turtles on the same patch. ;; Immune turtles don't get sick. to infect ;; turtle procedure ask other turtles-here with [ not sick? and not immune? and not quarentine?] [ if random-float 100 < infectiousness [ get-sick if self = subject ;; if its the watched turtle getting sick [ create-link-with myself ;; create a link with the one that infected it [ set color red set thickness .3 ] ] ] ] end ;; Once the turtle has been sick long enough, it ;; either recovers (and becomes immune) or it dies. to recover-or-die ;; turtle procedure if age > 60 * 52 * 7 [ set chance-recover .93] if age < 60 * 52 * 7 [ set chance-recover .97] if sick-time > duration ;; If the turtle has survived past the virus' duration, then [ ifelse random-float 100 < chance-recover ;; either recover or die [ become-immune ] [ set number-dead number-dead + 1 die ]] end ;; If there are less turtles than the carrying-capacity ;; then turtles can reproduce. to reproduce if count turtles < carrying-capacity and random-float 100 < chance-reproduce [ hatch 1 [ set age 1 lt 45 fd 1 pen-up ;; in case we're hatched from the watched turtle get-healthy ] ] end to-report immune? report remaining-immunity > 0 end to startup setup-constants ;; so that carrying-capacity can be used as upper bound of number-people slider end ; Copyright 1998 Uri Wilensky. ; See Info tab for full copyright and license.
There is only one version of this model, created over 5 years ago by Facundo Parra.
Attached files
No files