Effects of testing and social distancing on the spread of infectious diseases ("Flattening the Curve")

Effects of testing and social distancing on the spread of infectious diseases ("Flattening the Curve") preview image

1 collaborator

Default-person Shikhara Bhat (Author)

Tags

disease 

Tagged by Shikhara Bhat over 5 years ago

humans carry disease 

Tagged by Shikhara Bhat over 5 years ago

infectious disease model 

Tagged by Shikhara Bhat over 5 years ago

sir 

Tagged by Shikhara Bhat over 5 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 6.0.2 • Viewed 807 times • Downloaded 54 times • Run 0 times
Download the 'Effects of testing and social distancing on the spread of infectious diseases ("Flattening the Curve")' 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 is a model to describe the effect of social distancing (SD) and testing on the spread of an infectious disease, using the SIRS model for spread of infectious diseases.

HOW IT WORKS

At the beginning of the model, a certain number of people in the population (controlled by the parameter NUMBER _ SICK) are INFECTED (shown in red), and the rest are SUSCEPTIBLE to infection (shown in green). This infection spreads according to the rules described below. The model stops once either everybody is infected, or nobody is infected (i.e the infection has 'died out')

Infection (the SIRS model)

A SUSCEPTIBLE person can acquire the disease from an INFECTED with probability TRANSMISSIBILITY, if they are within MAX _ INF _ RADIUS of that person.

All INFECTED have the potential to recover from the disease after time INFECTION _ PERIOD has passed. Once this time has passed, an INFECTED individual becomes a RECOVERED individual (shown in blue) with probability RECOVERY _ RATE.

RECOVERED individuals cannot acquire the infection. Every RECOVERED individual has the potential to lose their immunity, and become SUSCEPTIBLE again, with probability SUSCEPTIBILITY.

Social Distancing

If SD? is turned ON, individuals move away from their location if there are any other individuals within a distance of MIN _ SD _ RADIUS from them, and do not move otherwise. If SD? is turned OFF, all individuals move randomly.

Testing

A random sample (of size NUM _ TO _ TEST) of the population is tested for the disease at regular intervals (A test is conducted once every TEST _ FREQ ticks). If an individual is found to be infected, they are removed from the population (This represents quarantine).

HOW TO USE IT

Set a random SEED, to make sure that the runs both begin with the same initial positions and statuses of the agents. Press SETUP to set the model with the initial conditions you have chosen (on the sliders), and press GO to run the model. Press CLEAR PLOT to clear the plot of all graphs, if the view gets too cluttered

THINGS TO NOTICE

Social distancing 'flattens the curve'. In the real world, this means that the rate of infection is lower, greatly decreasing the burden on healthcare professionals and medical institutions, and thus lowering overall death rates. This is why social distancing is so important in the event of an epidemic/pandemic. Additionally, effective testing (either large number of individuals being tested at each step, or more tests being conducted in the same amount of time) can also flatten the curve.

THINGS TO TRY

Change the ratio of MIN _ SD _ RADIUS to MIN _ INF _ RADIUS to see how this affects the effectiveness of social distancing. In real world terms, this could be seen as a measure of HOW MUCH distance (not necessarily simply physical) you need to maintain for social distancing to be effective.

EXTENDING THE MODEL

Suppose quarantined individuals aren't permanently removed but are instead 're-inserted' into the population has healthy individuals once the infection period has passed. How does this affect dynamics? Suppose individuals in the population can reproduce and die of old age (or die due to the disease itself). How is the model affected by this?

RELATED MODELS

the AIDS model (in the Biology section of the standard NetLogo models).

CREDITS AND REFERENCES

SIR model: Kermack, W; McKendrick, A (1991). "Contributions to the mathematical theory of epidemics—I". Bulletin of Mathematical Biology. 53 (1–2): 33–55. doi:10.1007/BF02464423

Comments and Questions

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

Click to Run Model

breed [infecteds infected]
breed [susceptibles susceptible]
breed [recovereds recovered]

infecteds-own [
  clock
  tested?
]
turtles-own [neighbours]

to setup
  clear-turtles
  clear-ticks
  random-seed seed ;To make sure runs have same initial conditions
  create-turtles number
  [setxy random-xcor random-ycor
    set size 1
    ifelse (who < number_sick)
    [set breed infecteds
    set clock 0
    set tested? False]
    [set breed susceptibles]
    recolor
  ]
  reset-ticks
end 

to recolor
  if (breed = susceptibles) [
    set color green
  ]
  if (breed = infecteds) [
    ifelse (tested? = True)
    [set color yellow]
    [set color red]
  ]
  if (breed = recovereds) [
    set color blue
  ]
end 

to move [dist]
  ifelse(SD?)
  [set neighbours other turtles in-radius ((SD_radius))
    if (count(neighbours) >= 1) ;Move only if you have neighbours
     [facexy (mean [xcor] of neighbours)
             (mean [ycor] of neighbours)
      rt 180  ; Turn away from the mean x and y co_ordinates of your neighbours
      fd dist
     ]
  ]
  [rt random-float 360  ;Turn to a random direction
   fd dist]
end 

to get_infected ;S _> I
  let sick_neighbours infecteds in-radius max_inf_radius
  if (breed = susceptibles and count sick_neighbours  >= 1)
   [if ((random-float 1) <  (1 - ((1 - transmissibility)^(count(sick_neighbours)))))
    [set breed infecteds
      set clock 0
      set tested? False]
      ]
end 

to recover ;I _> R
  if (clock >= infection_period and (random-float 1 < recovery_rate))
    [set breed recovereds]
end 

to lose_immunity ;R _> S
  if (random-float 1 < susceptibility)
  [set breed susceptibles]
end 

to advance_clock ;For recovery of infected people
  set clock (clock + 1)
end 

to runtest
  if (breed = infecteds)
  [die]
end 

to test;
  ifelse (num_to_test <= count(turtles))
    [let testsubjects n-of num_to_test turtles
    ask (testsubjects) [runtest]]
    [ask (turtles) [runtest]]
end 

to go
  ask (recovereds) [lose_immunity]
  ask (susceptibles) [get_infected]
  ask (infecteds) [advance_clock]
  ask (infecteds) [recover]
  ask (turtles) [move 1]
  ask (turtles) [recolor]
  if (ticks mod test_freq = 0)
      [test]
  tick
  if (count(infecteds) = 0 or count(infecteds) = count(turtles)) ;Stop if nobody is infected, or everybody is infected
  [stop]
end 

There are 2 versions of this model.

Uploaded by When Description Download
Shikhara Bhat over 5 years ago Slightly modified the 'model info' section Download this version
Shikhara Bhat over 5 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Effects of testing and social distancing on the spread of infectious diseases ("Flattening the Curve").png preview Preview for 'Effects of testing and social distancing on the spread of infectious diseases ("Flattening the Curve")' over 5 years ago, by Shikhara Bhat Download

This model does not have any ancestors.

This model does not have any descendants.