COVID-19 Outbreak and Policies

COVID-19 Outbreak and Policies preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Iron_label_brush_2 CJ Castillo (Author)

Tags

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 986 times • Downloaded 27 times • Run 0 times
Download the 'COVID-19 Outbreak and Policies' modelDownload this modelEmbed this model

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


Comments and Questions

Good Model

The model is simple yet provides a nice insight into the dynamics of the disease. The code is simple and straightforward with sufficient description provided in the info tab. My minor comment is that you have modelled healthy people to avoid tested infected people. (1) In reality, how can a person know whether the other person is infected or not? (2) If the person is tested positive, he/she will be kept in isolation. Therefore, it is unlikely that a healthy person will meet a tested infected person. In my understanding so far, infection is happening during the period when the person begins to show symptoms (even minor) and before he gets tested and is put in isolation. Best,

Posted almost 4 years ago

Click to Run Model

breed[healthys healthy]
;;healthys-own [color shape]
breed[sicks sick]
sicks-own [recovery]
turtles-own [susceptibility job PPE speed] ;;Probability of contracting the disease

to setup
  clear-all
  reset-ticks
  create-healthys Population [
    setxy random-xcor random-ycor
    set susceptibility random-float 1
    set shape "person"
    set color green
    set breed healthys
    set job "Citizen"
    set heading random 360
    set speed 0.1
  ]
end 

to infect ;; creates an infection
 ;;create-sicks 1 [
 ;;   setxy random-xcor random-ycor
 ;;   set heading random 360
 ;;   set shape "person"
 ;;   set breed sicks
 ;;   set color yellow
 ;;   set job "citizen"
 ;;   set recovery random-float .5
 ;; ]
 ask one-of healthys [
    set breed sicks
    set color yellow
    set shape "person"
    set recovery random-float .5
    set speed 0.1
  ]
end 

to go
  ask turtles [
    let current-turtle self
    forward speed display
    if distance current-turtle < 1 + (count sicks) [
      set heading heading + (random-float 5 - random-float 5)]
  ]
  stay-away
  epidemic
  get-well
  quarantine
  mass-test
  lockdown
  tick
end 

to epidemic
  ask sicks [
    let current-sick self
    ask healthys with [distance current-sick < 1] [
      set breed sicks
      set color yellow
      set shape "person"
      set recovery random-float 1
      set speed 0.1
    ]
  ]
end 

to get-well
  ask sicks [
    set recovery recovery + (random-float .5) - (random-float .5)
    if recovery > .8 [
      set breed healthys
      set shape "person"
      set color green
      set speed 0.1
    ]
  ]
end 

to plot-agents
  plot count sicks
  plot count healthys
end 

to stay-away  ;;Ask healthy people to stay away from sicks who have been identified through mass-testing
  ask sicks with [color = red] [
    let current-sick self
    ask healthys with [distance current-sick < (count sicks with [color = red])] [
      set heading towards current-sick  ;; to move away, first the healthy faces the sick then makes 180 degree turn.
      set heading heading + 180
    ]
  ]
end 

to quarantine ;; Ask confirmed sick people to limit their movement.
ifelse Quarantine-sick?
  [ask sicks with [color = red] [set speed 0.00001]]
  [ask sicks with [color = yellow] [set speed 0.1]]
end 

to mass-test ;; Ask all sicks to disclose their sickness
  ifelse Mass-test?
  [ask sicks [set color red]]
  [ask sicks [set color yellow]]
end 

to lockdown
  ifelse Lockdown?
  [ask turtles [set speed 0]]
  [ask healthys [set speed 0.1]
    ask sicks with [color = red] [ifelse Quarantine-sick?
      [set speed 0.00001]
      [set speed 0.1]]
    ask sicks with [color = yellow] [set speed 0.1]
  ]
end 

There is only one version of this model, created almost 4 years ago by CJ Castillo.

Attached files

File Type Description Last updated
COVID-19 Outbreak and Policies.png preview Preview for 'COVID-19 Outbreak and Policies' almost 4 years ago, by CJ Castillo Download

This model does not have any ancestors.

This model does not have any descendants.