NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

Try It in NetLogo Web

## WHAT IS IT?

Inspired in the covid-19 (aka coronavirus) pandemia, this simplified model simulates the transmission of a virus in a human population. This model is an adaptation by Maite Lopez-Sanchez (Universitat de Barcelona) of the Virus model from the NetLogo library. Wilensky, U. (1998). http://ccl.northwestern.edu/netlogo/models/Virus. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

## HOW IT WORKS

The model is initialized with 200 people, 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. Upon setup, population is assigned a random age. Elders (those older than 60 years old) have a different risk to die from the disease.

Some of these factors are summarized below with an explanation of how each one is treated in this model.

### 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 INITIAL-NUMBER-PEOPLE slider.

### Population decrease

People may die from the virus, the chances of which are determined by the slider CHANCE-RECOVER. Elder people can have a different (usually lower) chance. This slider is CHANCE-RECOVER-ELDERS.

### 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 260 days.

### 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.Since covid-19 spreads quite easily 100% is the default value.

### 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.

### 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 90 years and the duration of immunity is set to 260 days.

## 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 days 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.

The CHANCE-RECOVER-ELDERS slider controls the likelihood that an infection of an elder (age > 60 years) will end in recovery/immunity. When this slider is set at zero, for instance, the infection is always deadly.

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. Furthermore, person-age distinguishes elders (shown with a walking stick) from the rest.

Three output monitors show the percent of the population that is infected, the percent that is immune, and the number of days that have passed. The plot shows (in their respective colors) the number of susceptible, infected, and immune people. It also shows the number of non-sick (healthy and immune) population in blue.

## THINGS TO NOTICE

The factors controlled by the five 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.

## THINGS TO TRY

Think about how different slider values might approximate the dynamics of different scenarios. 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?

For the covid-19, it tipically produces a single bell-shaped distribution.

## VISUALIZATION

The circle 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 circle visualization in this model is supposed to make it easier to see when agents interact because overlap is easier to see between circles than between the "people" shapes. In the circle visualization, the circles merge to create new compound shapes. Thus, it is easier to perceive new compound shapes in the circle visualization.
Does the circle visualization make it easier for you to see what is happening?

## RELATED MODELS

* Virus
* HIV
* Virus on a Network

## CREDITS AND REFERENCES

This model is an adaptation by Maite Lopez-Sanchez (Universitat de Barcelona) of the Virus model from the NetLogo library. Wilensky, U. (1998). http://ccl.northwestern.edu/netlogo/models/Virus. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

## HOW TO CITE

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.

(back to the NetLogo User Community Models)