Flatten the Curve -- COVID-19
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
Is isolation a good approach to limit COVID-19 impact on society?
HOW IT WORKS
Every day (tick) agents randomly interact with their peers and thus (randomly) might get infected. Probability of interaction and getting infected in the case of interaction can be changed to model different social/viral behaviour.
HOW TO USE IT
Set up number of persons in your model and number of links between them and click on "Set up new Network" button.
Set isolation slider to desired isolation level (how much one is trying to avoid contact with others) and click "Set up new Simulation" button. Once it is done, one sick person will be placed among healthy ones. Click "Run Simulation" and observe how everyone gets sick. After simulation completes, change isolation level, click again on "Set up new Simulation" followed by "Run".
THINGS TO NOTICE
Try to keep an eye on maximum number on infected persons needing hospitalization at any moment. Max req. hosp. indicates maximum persons requiring hospitalization simultaneously.
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
turtles-own [ infected? infected-on sick? hospital? immune? ] breed [people a-person] globals [ pen-color exp-risk exp-interaction max-sick-proportion max-hospitalization max-hospital-occupation ] to setup ca create-people number-of-people [ setxy random-xcor random-ycor set infected? false set sick? false set immune? false set color blue set shape "person" ] repeat count people * avg-relationships-per-person [ ask one-of people [ create-link-with min-one-of other people with [not member? self [link-neighbors] of myself] [distance myself] ] ] set exp-interaction 0 end to setup-experiment reset-ticks set max-sick-proportion 0 set max-hospitalization 0 set max-hospital-occupation 0 if exp-interaction != probability-of-interaction [ set pen-color 12 + (6 * probability-of-interaction) / 100 ] ask people [ set infected? false set immune? false set sick? false set hospital? false set infected-on 0 set color blue ] set-current-plot "Infected" create-temporary-plot-pen (word "Interaction: " probability-of-interaction) set-plot-pen-color pen-color plot-pen-down set exp-interaction probability-of-interaction ask one-of people [ set infected? true set color 45 set infected-on ticks ] end to go if not any? turtles with [sick?] and not any? turtles with [infected?] [ plot-pen-up plotxy 1 0 stop ] ask people with [(infected? or sick?) and not hospital?] [ ask my-links with [random 100 < probability-of-interaction] [ if random 100 < probability-of-infection [ ask other-end [ if not infected? and not immune? and not sick? [ set infected? true set infected-on ticks set color 45 ] ] ] ] ] let current-infection count people with [infected? or sick?] / number-of-people let cur-hospital-occupation count people with [hospital?] let cur-require-hospitalization floor ((count people with [sick?] * require-hospitalization-pcnt) / 100) set max-sick-proportion max (list max-sick-proportion current-infection ) set max-hospitalization max (list max-hospitalization cur-require-hospitalization ) set max-hospital-occupation max (list max-hospital-occupation cur-hospital-occupation) ; At the end of incubation period, person turns sick ask people with [infected? and (ticks - infected-on) > incubation-period] [ set infected? false set sick? true set color red ] ; Recovery gives infinite immunity ask people with [sick? and (ticks - infected-on) > (recovery-time + incubation-period)] [ set sick? false set immune? true set hospital? false set color gray ] ; Only some sick persons require hospitalization let cur-to-hospital 0 if (cur-require-hospitalization - cur-hospital-occupation) > 0 [ set cur-to-hospital cur-require-hospitalization - cur-hospital-occupation ] ask n-of cur-to-hospital people with [sick?] [ if cur-hospital-occupation < hospital-beds [ set hospital? true set color lime set cur-hospital-occupation cur-hospital-occupation + 1 ] ] plotxy ticks current-infection tick end
There are 8 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Flatten the Curve -- COVID-19.png | preview | Preview for 'Flatten the Curve -- COVID-19' | over 5 years ago, by Arthur Hjorth | Download |
This model does not have any ancestors.
This model does not have any descendants.
Guglielmo Celata
Unreadable in NetLogo 6.1.1 (Question)
If I download this, unzip it and open it with NetLogo 6.1.1, it says it can't be opened. Also the .nlogo file contains only gibberish (^@^@^@^@^@). I am interested in the model, is there something wrong I am doing?
Posted over 5 years ago
Māris Nartišs
This web site needs some love
Yes, download option seems to give corrupted file. Also Info page complains about encoding (WTF?). A workaround — Click on „Run in NetLogo Web“, activate it, then on upper-right corner will be an export: NetLogo button. It will give you a .netlogo file that works (tested with 6.1.1).
Posted over 5 years ago
Guglielmo Celata
Solved
Great, thanks, so, this is a general issue of the modelingcommons.org web app, then.
Posted over 5 years ago
Arthur Hjorth
Love your additions, Māris
Thanks for improving the model! Guglielmo, I will write the NetLogo team and tell them there are problems with downloads. Hopefully it will be fixed soon.
Posted over 5 years ago
Māris Nartišs
Download issue is gone
I added a new slightly updated version (now includes tracking patients in a hospital) and the problem with model downloading is gone.
Posted over 5 years ago
Guglielmo Celata
Can I make and distribute an Italian translation?
I would like to distribute this model in Italy, specially for schools. Do you agree?
Posted over 5 years ago
Māris Nartišs
This is just a model!
Yes, please do so! Keep in mind — I am a geographer and not an epidemiologist, thus it might be quite wrong. Otherwise — spread the word! More people see this, more they will understand how important is to stay at home.
Posted over 5 years ago
Guglielmo Celata
Italian model available
I've just uploaded the translated model.
Posted over 5 years ago