Age-Structured Disease Transmission Model with Interventions
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model was designed to study the spread of an infectious disease among different age groups. The model aims to track key health outcomes (healthy, infected, recovered and dead individuals) with distinct population groups (young ones, young adults, middle-aged adults, and seniors)
It also simulates interactions based on agent characteristics, contact rates and protective behaviours like vaccination and mask wearing.
HOW IT WORKS
The model operates by using agent-based rules.Each agent is assigned an age group, health status, susceptibility to infection and other variables such as vaccination status or mask wearing.
Agents move between pre-defined locations based on daily schedules and interact with other agents, leading to potential infections.
Agents transition between healthy, infected, symptomatic, recovered, or dead status based on their individual conditions and disease progression (e.g. incubation period, critical illness rate).
The transmission of the disease depends on factors such as contact rates amd the use of protective measures (masking).
HOW TO USE IT
To use the model, follow the following steps:
Set-up:
Click the "Set-up" button on the left to intialize the simulation. This prepares the population based on the settings you have configured using the sliders on the right.
Start the simulation
Click "go" to start the simulation. The model will begin running, and the number of healthy, infected, recovered, and dead agents will update in the boxes to the left.
Adjust the paramters
Use the sliders on the right to adjust the following parameters that influence the behaviour of the agents and disease spread:
Population proportions
Adjust the sliders for the proportion of each age group Susceptibility: Change how susceptible each age group is to the disease.
Contact rate
Modify the proportion of individuals that come in contact with each infected individual. A lower contact rate implies that less people come in contact with infected persons.
Masking and Vaccination rates
Control the percentage of each age group that wears masks and is vaccinated respectively.
Vaccination and Masking Effectiveness
Adjust the effectiveness of vaccines and masks in reducing susceptibility and transmission respectively.
Initial Infected
Set the number of initially infected agents.
Total-turtles
Set the total number of agents.
THINGS TO NOTICE
As simulation runs, observe:
-The impact of varying contact rates, vaccination rates and mask usage on the spread of infection.
-How different age groups are affected based on their susceptibility and the effectiveness of interventions like masking and vaccination.
THINGS TO TRY
Experiment intervention strategies
Try setting different vaccination rates and masking effectiveness for various age groups and see how it impacts the spread.
Simulate Different Social Scenarios
Increase or decrease the contact rates for specific age groups to model situations such as: school reopening (young ones) or return to work for (adults).
Explore Outbreaks Scenarios
Adjust the initial the initial number of infected individuals and experiment with different population proportions to simulate outbreaks conditions in different types of communities.
EXTENDING THE MODEL
To make the model more detailed, users could add more complex interactions, such as varying contact rates based on individual behaviours or introducing additional interventions (social distancing, hosptitals where patients come in contact with healthy health workers, elderly homes etc).
Further developments could aslo include environmental factors that affect transmission such as wind circulation, or integrating testing and isolation protocols.
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
The model utilizes several advanced NetLogo features, including agent-based movement, conditional decision making, and dynamic changes to agent states.
The "turtles-own" functions tracks variables specific to each agents, while "ask" commands dictate agent behaviour. The model employs randomness for assigning infection status and protective measures, which could be controlled via sliders.
RELATED MODELS
Similar models in the NetLogo library include epidemic spread that focus on the movement and interactions of agents. These models might help users explore different strategies to mitigate the spread of infectious diseases by comparing different types of interventions and population structures.
CREDITS AND REFERENCES
You could find similar models at: modelingcommons.org
Comments and Questions
;name agents breed [young_ones young_one] breed [young_adults young_adult] breed [middle_aged_adults middle_aged_adult] breed [seniors senior] ; variables that can be updated/changed as agents experience changes to themselves or the environment globals [ num-healthy num-infected num-recovered num-dead num-healthy-young-ones num-healthy-young-adults num-healthy-middle-aged-adults num-healthy-seniors num-infected-young-ones num-infected-young-adults num-infected-middle-aged-adults num-infected-seniors num-recovered-young-ones num-recovered-young-adults num-recovered-middle-aged-adults num-recovered-seniors num-dead-young-ones num-dead-young-adults num-dead-middle-aged-adults num-dead-seniors transmission-rate incubation-period symptomatic-period Log-data total-contact-rate contact-rate ] ; variable unique to each agents turtles-own [ healthy? infected? recovered? dead? susceptibility critical-illness-rate age-group days-infected days-since-symptoms daily-contacts vaccinated? wearing-mask? secondary-infections ; Note: variable to track secondary infections ] to setup clear-all ;assign values to relevant global variables set transmission-rate 0.0089 set incubation-period 122.4 set symptomatic-period 240 set Log-data [] set total-contact-rate 0 ; Note: let is used to create local variables that are used only within the current block of code. ; set number of agents as proportions of the total population let num-young-ones round (total-turtles * young-ones-proportion) let num-young-adults round (total-turtles * young-adults-proportion) let num-middle-aged-adults round (total-turtles * middle-aged-adults-proportion) let num-seniors round (total-turtles * seniors-proportion) ; create locations create-locations ; create agents, define name, set agent specific unique variables/properties create-turtles num-young-ones [ set breed young_ones set age-group "young ones" set-turtle-properties young-ones-susceptibility young-ones-vaccination-rate young-ones-masking-rate young-ones-contact-rate ] create-turtles num-young-adults [ set breed young_adults set age-group "young adults" set-turtle-properties young-adults-susceptibility young-adults-vaccination-rate young-adults-masking-rate young-adults-contact-rate ] create-turtles num-middle-aged-adults [ set breed middle_aged_adults set age-group "middle aged adults" set-turtle-properties middle-aged-adults-susceptibility middle-aged-adults-vaccination-rate middle-aged-adults-masking-rate middle-aged-adults-contact-rate ] create-turtles num-seniors [ set breed seniors set age-group "seniors" set-turtle-properties seniors-susceptibility seniors-vaccination-rate seniors-masking-rate seniors-contact-rate ] ;set number of intially infected repeat initial-infected [ ask one-of turtles with [not infected?] [ set infected? true set healthy? false set days-infected 0 set color red ] ] reset-ticks end ; assign the unique variables to agents (boolean, integer, float) to set-turtle-properties [initial-susceptibility vaccination-rate masking-rate initial-contact-rate] setxy random-xcor random-ycor set healthy? true set infected? false set recovered? false set dead? false set days-infected 0 set days-since-symptoms 0 set daily-contacts 0 set vaccinated? (random-float 1 < vaccination-rate) set wearing-mask? (random-float 1 < masking-rate) set susceptibility initial-susceptibility set contact-rate initial-contact-rate set secondary-infections 0 if vaccinated? [ set susceptibility susceptibility * (1 - vaccination-effectiveness) ; Adjust susceptibility based on vaccination effectiveness ] if age-group = "young ones" [ set critical-illness-rate 0.0004 set color yellow ] if age-group = "young adults" [ set critical-illness-rate 0.0029 set color blue ] if age-group = "middle aged adults" [ set critical-illness-rate 0.0039 set color green ] if age-group = "seniors" [ set critical-illness-rate 0.2 set color violet ] end to create-locations ask patches [ if random-float 1 < 0.1 [set pcolor blue] if random-float 1 < 0.05 [set pcolor yellow] if random-float 1 < 0.03 [set pcolor orange] if random-float 1 < 0.05 [set pcolor green] if random-float 1 < 0.04 [set pcolor magenta] if random-float 1 < 0.02 [set pcolor black] if random-float 1 < 0.03 [set pcolor white] ] end ; define movement pattern based on states and age group to move-to-location if infected? [ if days-infected >= incubation-period [ ifelse days-since-symptoms > 0 and days-since-symptoms <= symptomatic-period [ ifelse random 2 = 0 [ move-to one-of patches with [pcolor = magenta] ] [ move-to one-of patches with [pcolor = black] ] ] [ move-to one-of patches with [pcolor = magenta] ] ] ] if not infected? [ let current-hour ticks mod 24 let current-day (ticks / 24) mod 7 ifelse current-day < 5 [ if age-group = "young ones" [ if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 15 [move-to one-of patches with [pcolor = orange]] if current-hour >= 15.5 and current-hour < 17 [move-to one-of patches with [pcolor = green]] if current-hour >= 17 and current-hour < 18 [move-to one-of patches with [pcolor = orange]] if current-hour >= 18 and current-hour < 19 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19 and current-hour < 20 [move-to one-of patches with [pcolor = blue]] if current-hour >= 20 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] ] if age-group = "young adults" [ if current-hour >= 7 and current-hour < 8 [move-to one-of patches with [pcolor = green]] if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 17 [move-to one-of patches with [pcolor = yellow]] if current-hour >= 17.5 and current-hour < 18.5 [move-to one-of patches with [pcolor = green]] if current-hour >= 18.5 and current-hour < 19.5 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19.5 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] if current-hour >= 21 and current-hour < 22 [move-to one-of patches with [pcolor = blue]] ] if age-group = "middle aged adults" [ if current-hour >= 6 and current-hour < 7 [move-to one-of patches with [pcolor = green]] if current-hour >= 7 and current-hour < 8 [move-to one-of patches with [pcolor = blue]] if current-hour >= 8 and current-hour < 17 [move-to one-of patches with [pcolor = yellow]] if current-hour >= 17.5 and current-hour < 18.5 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18.5 and current-hour < 19.5 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19.5 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] if current-hour >= 21 and current-hour < 22 [move-to one-of patches with [pcolor = blue]] ] if age-group = "seniors" [ if current-hour >= 7 and current-hour < 8 [move-to one-of patches with [pcolor = green]] if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 12 [move-to one-of patches with [pcolor = yellow]] if current-hour >= 12 and current-hour < 13 [move-to one-of patches with [pcolor = blue]] if current-hour >= 13 and current-hour < 15 [move-to one-of patches with [pcolor = blue]] if current-hour >= 15 and current-hour < 17 [move-to one-of patches with [pcolor = blue]] if current-hour >= 17 and current-hour < 18 [move-to one-of patches with [pcolor = green]] if current-hour >= 18 and current-hour < 19 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] ] if age-group = "elderly" [ if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 11 [move-to one-of patches with [pcolor = green]] if current-hour >= 11 and current-hour < 13 [move-to one-of patches with [pcolor = blue]] if current-hour >= 13 and current-hour < 14 [move-to one-of patches with [pcolor = blue]] if current-hour >= 14 and current-hour < 16 [move-to one-of patches with [pcolor = white]] if current-hour >= 16 and current-hour < 18 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18 and current-hour < 19 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] ] ] [ if age-group = "young ones" [ if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 11 [move-to one-of patches with [pcolor = green]] if current-hour >= 11 and current-hour < 12 [move-to one-of patches with [pcolor = blue]] if current-hour >= 12 and current-hour < 13 [move-to one-of patches with [pcolor = blue]] if current-hour >= 13 and current-hour < 15 [move-to one-of patches with [pcolor = green]] if current-hour >= 15 and current-hour < 17 [move-to one-of patches with [pcolor = green]] if current-hour >= 17 and current-hour < 18 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18 and current-hour < 19 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19 and current-hour < 20 [move-to one-of patches with [pcolor = blue]] if current-hour >= 20 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] ] if age-group = "young adults" [ if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 11 [move-to one-of patches with [pcolor = green]] if current-hour >= 11 and current-hour < 13 [move-to one-of patches with [pcolor = blue]] if current-hour >= 13 and current-hour < 15 [move-to one-of patches with [pcolor = white]] if current-hour >= 15 and current-hour < 17 [move-to one-of patches with [pcolor = green]] if current-hour >= 17 and current-hour < 18 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18 and current-hour < 20 [move-to one-of patches with [pcolor = blue]] if current-hour >= 20 and current-hour < 22 [move-to one-of patches with [pcolor = white]] ] if age-group = "middle aged adults" [ if current-hour >= 7 and current-hour < 8 [move-to one-of patches with [pcolor = green]] if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 17 [move-to one-of patches with [pcolor = yellow]] if current-hour >= 17.5 and current-hour < 18.5 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18.5 and current-hour < 19.5 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19.5 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] if current-hour >= 21 and current-hour < 22 [move-to one-of patches with [pcolor = blue]] ] if age-group = "seniors" [ if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 11 [move-to one-of patches with [pcolor = green]] if current-hour >= 11 and current-hour < 13 [move-to one-of patches with [pcolor = blue]] if current-hour >= 13 and current-hour < 14 [move-to one-of patches with [pcolor = blue]] if current-hour >= 14 and current-hour < 16 [move-to one-of patches with [pcolor = white]] if current-hour >= 16 and current-hour < 18 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18 and current-hour < 19 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] ] if age-group = "elderly" [ if current-hour >= 8 and current-hour < 9 [move-to one-of patches with [pcolor = blue]] if current-hour >= 9 and current-hour < 11 [move-to one-of patches with [pcolor = green]] if current-hour >= 11 and current-hour < 13 [move-to one-of patches with [pcolor = blue]] if current-hour >= 13 and current-hour < 14 [move-to one-of patches with [pcolor = blue]] if current-hour >= 14 and current-hour < 16 [move-to one-of patches with [pcolor = white]] if current-hour >= 16 and current-hour < 18 [move-to one-of patches with [pcolor = blue]] if current-hour >= 18 and current-hour < 19 [move-to one-of patches with [pcolor = blue]] if current-hour >= 19 and current-hour < 21 [move-to one-of patches with [pcolor = blue]] ] ] ] setxy random-xcor random-ycor end ; define general movement pattern and behaviours to go ask turtles [ if not dead? [ move-to-location infect-others develop-symptoms recover-or-die ] ] update-counts if num-infected = 0 [ calculate-R0 stop ] log-contact-rates tick end to calculate-R0 let total-secondary-infections sum [secondary-infections] of turtles with [infected? or recovered? or dead?] let total-infected count turtles with [infected? or recovered? or dead?] if total-infected > 0 [ let R0 total-secondary-infections / total-infected print (word "R0: " R0) ] end ; define how infected agents spread the disease to infect-others if infected? [ ;define infectious period let infectious-start incubation-period - 24 let infectious-end incubation-period + symptomatic-period + 72 ;check if within infected period and define infection radius if days-infected >= infectious-start and days-infected <= infectious-end [ let infection-radius 1 ;if practicing-social-distancing? [ ; set infection-radius 0.2 ; ] ;define set number and "condition" of likely to be infected let nearby-turtles turtles in-radius infection-radius with [not dead? and not infected?] ask n-of (count nearby-turtles * contact-rate) nearby-turtles [ let adjusted-transmission-rate transmission-rate if wearing-mask? [ set adjusted-transmission-rate transmission-rate * (1 - masking-effectiveness) ] ; if radom-float < adjusted-transmission-rate * susceptibility, get infected. if random-float 1 < adjusted-transmission-rate * susceptibility [ set infected? true set healthy? false set days-infected 0 set color red ask myself [set secondary-infections secondary-infections + 1] ] ; keep track of conatacts set daily-contacts daily-contacts + 1 ask myself [set daily-contacts daily-contacts + 1] ] ] ] end ; define when infections should start, it will indicate when infected agents should isolate themselves to develop-symptoms if infected? [ if days-infected = incubation-period [ set days-since-symptoms 0 ] set days-since-symptoms days-since-symptoms + 1 ] end ; define conditions for recovery or death to recover-or-die if infected? [ set days-infected days-infected + 1 if days-infected > incubation-period [ set days-since-symptoms days-since-symptoms + 1 ] if days-since-symptoms >= symptomatic-period [ if random-float 1 < critical-illness-rate [ ifelse random-float 1 < 0.5 [ set dead? true set infected? false set healthy? false set recovered? false set color black ] [ set recovered? true set infected? false set healthy? false set dead? false set color gray ] ] ;fail safe to ensure that all agents that didnt die, did recover. if not dead? [ set recovered? true set infected? false set healthy? false set dead? false set color gray ] ] ;recover after the symptomatic period has passed if days-infected > incubation-period + symptomatic-period [ set recovered? true set infected? false set healthy? false set dead? false set color gray ] ] end ;update counts to update-counts set num-healthy count turtles with [healthy?] set num-infected count turtles with [infected?] set num-recovered count turtles with [recovered?] set num-dead count turtles with [dead?] set num-healthy-young-ones count young_ones with [healthy?] set num-healthy-young-adults count young_adults with [healthy?] set num-healthy-middle-aged-adults count middle_aged_adults with [healthy?] set num-healthy-seniors count seniors with [healthy?] set num-infected-young-ones count young_ones with [infected?] set num-infected-young-adults count young_adults with [infected?] set num-infected-middle-aged-adults count middle_aged_adults with [infected?] set num-infected-seniors count seniors with [infected?] set num-recovered-young-ones count young_ones with [recovered?] set num-recovered-young-adults count young_adults with [recovered?] set num-recovered-middle-aged-adults count middle_aged_adults with [recovered?] set num-recovered-seniors count seniors with [recovered?] set num-dead-young-ones count young_ones with [dead?] set num-dead-young-adults count young_adults with [dead?] set num-dead-middle-aged-adults count middle_aged_adults with [dead?] set num-dead-seniors count seniors with [dead?] ;optional, can be replaced with output from behaviour space set Log-data lput (list ticks num-healthy num-infected num-recovered num-dead num-healthy-young-ones num-healthy-young-adults num-healthy-middle-aged-adults num-healthy-seniors num-infected-young-ones num-infected-young-adults num-infected-middle-aged-adults num-infected-seniors num-recovered-young-ones num-recovered-young-adults num-recovered-middle-aged-adults num-recovered-seniors num-dead-young-ones num-dead-young-adults num-dead-middle-aged-adults num-dead-seniors) Log-data end to log-contact-rates let total-contacts sum [daily-contacts] of turtles set total-contact-rate total-contacts ask turtles [set daily-contacts 0] end
There is only one version of this model, created about 1 month ago by Chinemerem Okpara.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Age-Structured Disease Transmission Model with Interventions.png | preview | Preview for 'Age-Structured Disease Transmission Model with Interventions' | about 1 month ago, by Chinemerem Okpara | Download |
This model does not have any ancestors.
This model does not have any descendants.