Masks will definitely return in the winter

An assignment using agent-based modelling in NetLogo from my graduate studies showing the effectiveness of masks in the COVID-19 era as a complimentary tool to vaccinations.
Introduction
A very interesting application of agent-based modelling arises in the modelling of the COVID-19 pandemic. Several models exist built in NetLogo showing the spread of the virus using some adaptation of the SIR model. One of the models is the COVID-19 US masks model by Dale Brearcliffe1, which simulates the spread of the coronavirus in the United States. The model allows the user to also assign different types of masks to a percentage of the population. Running the model with different parameters, we can see the clear effect that masks have in containing the pandemic. But we can take this analysis a step further.
Taking vaccination into account
I have adjusted the original model to take into account and the vaccination of the population. My goal was to make 3D plots plotting the total number of affected people as a function of the vaccinated population (in percentage) and the percentage of the population using different masks, in order to see if we can compensate for vaccinated populations below the herd immunity threshold by using masks. Using NetLogo’s Behavior Space function, I run several experiments which will be explained below.
Code modification
To model the vaccination, the turtles in the model are assigned two extra variables:
turtles-own [
...
unvaccinated? ;;Is the turtle vaccinated or not? {True, False}
vaccine-efficacy ;; How effective is the vaccine
]
The turtles are then initialized to be all unvaccinated. During the setup process, we can input the total vaccination population we would like to simulate percent-vaccinated
and assign a vaccine efficacy to be used.
ask n-of (percent-vaccinated * population) turtles [
set unvaccinated? false
set vaccine-efficacy 0.85
set color 128
]
Finally, we modify the infect-others
sequence to include a last check to see if the vaccine work and will thus stop the susceptible turtle from being infected.
to infect-others
let a-turtle-egress mask-egress
;;Are there other agents nearby?
ask other turtles-here with [susceptible? and unvaccinated?] [
;;Can the other agent get the virus?
;;Random uniform distribution
if random-float 100 < infectiousness [
;;Did the agent's mask block the virus? (Egress)
;;Random uniform distribution
if random-float 1 >= a-turtle-egress [
;;Did the other's mask block the virus? (Ingress)
;;Random uniform distribution
if random-float 1 >= mask-ingress [
;; Will the vaccine work?
if random-float 1 >= vaccine-efficacy [
set exposed? true
set susceptible? false
set color 95
set time-to-sick random (last exposed-period - first exposed-period + 1)
+ first exposed-period
]
]
]
]
]
end
Simulation properties for data
Three experiments were performed in NetLogo’s behavior space, each one using a different type of mask.
- Medical masks
- From 0% to 100% of the total population using masks with a step of 10%.
- For each one of the above steps, loop the vaccinated population from 0% to 100% with a step of 5%.
- N95 masks
- From 0% to 100% of the total population using masks with a step of 10%.
- For each one of the above steps, loop the vaccinated population from 0% to 100% with a step of 5%.
- Homemade masks
- From 0% to 100% of the total population using masks with a step of 10%.
- For each one of the above steps, loop the vaccinated population from 0% to 100% with a step of 5%.
If you add up all of the above, we have 2310 experiment runs for each type of masks and a total of 6930 runs to be analyzed. The data is then exported to .csv
and analyzed further in MATLAB.
Main results
N95 Masks
Let’s provide some typical values from the plot above.
- For 40% vaccinated population against COVID-19, we require 70% of the total population using N95 masks to stop the pandemic.
- For 60% vaccinated population against COVID-19, we require 50% of the total population using N95 masks to stop the pandemic.
Medical Masks
- For 40% vaccinated population against COVID-19, we require 80% of the total population using surgical masks to stop the pandemic.
- For 60% vaccinated population against COVID-19, we require 60% of the total population using surgical masks to stop the pandemic.
Homemade Masks
- For 40% vaccinated population against COVID-19, we require 90% of the total population using surgical masks to stop the pandemic.
- For 60% vaccinated population against COVID-19, we require 70% of the total population using surgical masks to stop the pandemic.
Do observe from the figure that the pandemic cannot be contained if nobody is vaccinated and everyone is using homemade masks!
Conclusions
From all of the above, we can understand the importance of masks as a secondary tool to counteract low percentages for the total vaccinated population which are below the limit to achieve herd immunity. In practice, the results mean that countries who fail to achieve the vaccination percentages required for herd immunity, will have to use masks (and possibly other measures) to contain the spread of the pandemic.
You can read my full report containing further information and statistical analysis here (in Greek). MATLAB and NetLogo source code as well as the .csv
files used can be found here.