Infectious Disease Outbreak-Variants

Infectious Disease Outbreak-Variants preview image

1 collaborator

Screen_shot_2018-02-02_at_12.53.50_pm lin xiang (Author)

Tags

covid-19, epidemiology, seir, variants 

Tagged by lin xiang over 2 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.2.2 • Viewed 206 times • Downloaded 13 times • Run 0 times
Download the 'Infectious Disease Outbreak-Variants' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This model simulates the spread of two different variants in a human population during an epidemic based on a revised SEIR model, i.e., in this model the infectious (I) are fully isolated at home or in hospitals so that they do not transmit the disease. This model allows students to label an individual person in the population and examine the chance at which the person is infected and follow the person through the epidemic.

HOW IT WORKS

The model starts with a human population consisting of susceptible (green color)people. Users may add carriers infected by one of two variants (Variant A (VA) or Variant B (VB)) into the population and observe the spread. The carriers (orange color or brown color) may pass the disease to one of the susceptible people nearby (within a radius of 1.5) at the defined transmission rates. The carrier may become sick (i.e., infectious, represented by red color for variant A and magenta color for variant B) after the defined incubation periods. The sick people will be isolated, so they do not infect others. The sick people will remain ill for the defined illness periods. By the end of the illness periods, the infectious die (disappear from the model) at the defined mortalities or recover and become immune to the disease (blue color for variant A and light blue color for variant B).

Buttons, Sliders, and Switches:

  • The population size slider is self-explanatory. So are the buttons of Set up/Reset, Run/Pause, and Run a day.

  • The Transmission-rate slider determines how likely a susceptible person is infected when exposed to the disease.

  • The Mortality slider determines how likely the infected people die on the 15th day.

  • The "Incubation-period" defines the number of days between a person is infected and becomes sick.

  • The "Illness-period" defines the number of days between a person becomes to show symptoms to recover.

  • The * add a Carrier* button adds a carrier into the population.

  • The Select to watch a person button allows you to focus on an individual person. You may compare how often the person gets infected in different situations.

  • The Stop watching button allows you to stop watching the person.

HOW TO USE IT

  1. First, choose the factors, such as population size, transmission rate, etc.

  2. Click on Set up/Reset, then Run/Pause. The model is set to stop when there are no infectious people.

  3. Observe the infection changes in the population in the plot and monitor.

  4. Use Run one day to run the model in a controlled way and collect day-by-day data.

THINGS TO TRY

There are so many things you can try in this model. Here are only very a few quick ideas:

  • How do the numbers of daily cases differ for variant A and variant B when their transmission rates differ?

  • How do the deaths differ for variant A and variant B when their mortality rates differ?

RELATED MODELS

Find this model series at http://3dsciencemodeling.com

  • Infectious Disease Outbreak-Basic Phenomenon
  • Infectious Disease Outbreak-Transmission and mortality
  • Infectious Disease Outbreak-Population Comparison
  • Infectious Disease Outbreak-HealthCare, Isolation and Quarantine
  • Infectious Disease Outbreak-Social distancing
  • Infectious Disease Outbreak-Vaccination
  • Infectious Disease Outbreak-SEIR model

CREDITS AND REFERENCES

Dr. Lin Xiang (lin.xiang@uky.edu) created this model at the University of Kentucky in 2021. If you mention this model in a publication, we ask that you include the citations below.

Xiang, L. (2021). Infectious Disease Outbreak-variants. Department of STEM Education, University of Kentucky, Lexington, KY.

CC BY-NC-SA 4.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

;;
;; This model is developed by Dr. Lin Xiang at the University of Kentucky. Contact: lin.xiang@uky.edu
;;
;; If you see this page rather than a "download" button when downloading the model, click the "download" icon
;; in your browser to download this model file.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


turtles-own [ days-after-exposure  days-of-sick labeled]
Patches-own [ ]
Globals [ watching  max-daily-cases-a max-daily-cases-b death-a death-b]

to setup
  ca
  setup-turtles

   set watching false
  set death-a 0
  set death-b 0
  plot-levels
  reset-ticks
end 

to setup-turtles
  create-turtles population-size
  [set color 68
    set size 1.25
    set labeled 0
    set shape "person"
    setxy random-xcor random-ycor
  ]
end 

to go

  if ticks >= days [stop]
  move
  transmission-A
  transmission-B
  incubation-A
  incubation-B
  sickness-A
  sickness-B
  find-max-daily-cases-A
  find-max-daily-cases-B
  plot-levels
  tick
end 

to move
  ask turtles with [shape = "person"]
  [right random 360 forward mobility]
end 

to add-a-carrier-A
  ask one-of turtles                     ;choose a random person
  [set color orange                      ;set the color as orange (variant-A carrier color)
  ]
end 

to add-a-carrier-B
  ask one-of turtles                     ;choose a random person
  [set color brown                      ;set the color as brown (variant-B carrier  color)
  ]
end 

to transmission-A
  ask turtles with [color = orange]                                              ;Hi, carriers
  [let susceptible-person one-of other turtles in-radius 1.5 with [color = 68]   ;Are there any susceptible people near you (within a radius of 1.5)?
    if susceptible-person != nobody                                              ;If there is at least one
    [ask susceptible-person                                                      ;ask the suscetiple person
      [ if random 100 < VA-transmission-rate                                        ;at the defined transmission rate
        [set color orange]                                                       ;to become a carrier (orange color)
      ]
    ]
  ]
end 

to transmission-B
  ask turtles with [color = brown]                                              ;Hi, carriers
  [let susceptible-person one-of other turtles in-radius 1.5 with [color = 68]   ;Are there any susceptible people near you (within a radius of 1.5)?
    if susceptible-person != nobody                                              ;If there is at least one
    [ask susceptible-person                                                      ;ask the suscetiple person
      [ if random 100 < VB-transmission-rate                                        ;at the defined transmission rate
        [set color brown]                                                       ;to become a carrier (orange color)
      ]
    ]
  ]
end 

to incubation-A
  ask turtles with [color = orange]                    ;Hi carriers
   [ifelse days-after-exposure < VA-incubation-period     ;If the number of days after you get infected is smaller than the defined incubation period
    [set days-after-exposure days-after-exposure + 1]  ;increase the number of days after exposure by 1
    [set color red set shape "house" ]                   ;otherwise, become infectious (red color)
   ]
end 

to incubation-B
  ask turtles with [color = brown]                    ;Hi carriers
   [ifelse days-after-exposure < VB-incubation-period     ;If the number of days after you get infected is smaller than the defined incubation period
    [set days-after-exposure days-after-exposure + 1]  ;increase the number of days after exposure by 1
      [set color magenta set shape "house"          ]         ;otherwise, become infectious (red color)
   ]
end 

to sickness-A
  ask turtles with [color = red]          ;Hi sick people,
  [ifelse days-of-sick <= VA-illness-period             ;if you have not been sick for 15 days
    [set days-of-sick days-of-sick + 1]   ;remain sick and increase the number of sick days by 1
    [ifelse random 100 < VA-mortality        ;otherwise, at the define mortality rate
      [set death-a death-a + 1 die]                               ;die
      [set color blue set shape "person"] ;or recover
    ]
   ]
end 

to sickness-B
  ask turtles with [color = magenta]          ;Hi sick people,
  [ifelse days-of-sick <= VB-illness-period             ;if you have not been sick for 15 days
    [set days-of-sick days-of-sick + 1]   ;remain sick and increase the number of sick days by 1
    [ifelse random 100 < VB-mortality        ;otherwise, at the define mortality rate
      [set death-b death-b + 1 die]                               ;die
      [set color sky set shape "person"] ;or recover
    ]
   ]
end 

to find-max-daily-cases-A
  if count turtles with [color = red ] > max-daily-cases-a        ;Count the infectious.If it is greater than the current record of max daily cases
  [set max-daily-cases-a count turtles with [color = red ]]       ;update the max daily case
end 

to find-max-daily-cases-B
  if count turtles with [color = magenta ] > max-daily-cases-b        ;Count the infectious.If it is greater than the current record of max daily cases
  [set max-daily-cases-b count turtles with [color = magenta ]]       ;update the max daily case
end 

to watch-an-infected-person
  watch one-of turtles with [color = red]
end 

to label-a-person

  if any? turtles = false [user-message "Nobody is here." stop]


  if mouse-inside? [
    if mouse-down? [
      let labeled-person min-one-of turtles [distancexy mouse-xcor mouse-ycor]
      if labeled-person != nobody [
        ask labeled-person [set label "me" set labeled 1]      ;label the 1st selected person as me
        watch labeled-person]
  ]]


 if count turtles with [labeled = 1] >= 1 [stop]   ;disable the button when one person is labelled.
end 

to unselect

  ask turtles
  [set labeled 0
    set label ""]
  rp
end 

to plot-levels ;; this creates creates the bar graph
    set-current-plot "Max daily cases and deaths"
    clear-plot
    plot-pen-down
    set-current-plot-pen "VA max-daily-cases"
    plotxy 1 max-daily-cases-a
    set-current-plot-pen "VB max-daily-cases"
    plotxy 2 max-daily-cases-b
    set-current-plot-pen "VA Deaths"
    plotxy 4 death-a
    set-current-plot-pen "VB Deaths"
    plotxy 5 death-b
end 

There are 3 versions of this model.

Uploaded by When Description Download
lin xiang about 2 years ago minor updates Download this version
lin xiang about 2 years ago Add the time control Download this version
lin xiang over 2 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Infectious Disease Outbreak-Variants.png preview Preview for 'Infectious Disease Outbreak-Variants' over 2 years ago, by lin xiang Download

This model does not have any ancestors.

This model does not have any descendants.