SEIR-Model-Vaccination-Seasonal

No preview image

4 collaborators

Default-person Anna Mummert (Author)
Roger Estep (Team member)
Robert Hughes (Team member)
Jessica Shiltz (Team member)

Tags

disease control 

Tagged by Anna Mummert over 9 years ago

gamma distribution 

Tagged by Anna Mummert over 9 years ago

infectious disease model 

Tagged by Anna Mummert over 9 years ago

seasonal vaccination* 

Tagged by Anna Mummert over 9 years ago

seir modelg 

Tagged by Anna Mummert over 9 years ago

Visible to everyone | Changeable by the author
Model was written in NetLogo 5.0.4 • Viewed 4999 times • Downloaded 284 times • Run 0 times
Download the 'SEIR-Model-Vaccination-Seasonal' 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 susceptible-exposed-infectious-recovered (SEIR) model for seasonal influenza, incorporating the disease control strategy of vaccination. The model uses gamma-distributions to determine the lengths of the incubation (latency) and infectious periods for each individual.

Susceptible individuals are white, exposed individuals are yellow, infectious individuals are red, and recovered individuals are green. Non-vaccinated individuals have people shape; vaccinated individuals have kite (default) shape. Vaccinated individuals who have seroconverted are cyan.

HOW IT WORKS

Prior to the start of the simulation, a single individual is infectious; all others are susceptible. Individuals move randomly in the world and turn around at the world's edge.

Vaccines are available before any individuals are infected. Once each day, there is a chance that a susceptible (and later exposed) individual will take the vaccination. Each vaccination has a chance of being effective. Individuals who are not already exposed and who were given an effective vaccine will seroconvert after a gamma-distributed time. Individuals who seroconvert gain permanent immunity; those who do not may become infected.

After some time one individual becomes exposed.

When a susceptible individual comes into contact with an infectious individual there is a probability (chance) that the susceptible individual will become infected. If a susceptible individual becomes infected, the individual moves into the exposed class. After a gamma-distributed time, an exposed individual moves into the infectious class. Infectious individuals are able to infect others. After a gamma-distributed time, an infectious individual recovers and moves into the recovered class. Recovered individuals gain permanent immunity.

The model simulation ends when no individuals are infected (exposed or infectious).

HOW TO USE IT

The INITIAL-POPULATION slider sets the number of individuals; units = individuals.

The TICKS-PER-DAY slider sets the number of computational ticks that correspond to one day; units = ticks / day.

The TRANSMISSION-CHANCE slider sets the probability that contact between an infectious individual and a susceptible individual will result in the susceptible individual becoming infected; units = percent.

The AVERAGE-INCUBATION-PERIOD slider sets the mean value of the incubation period, which is used in calculating the gamma-distribution for the time in the exposed class; units = days.

The INCUBATION-STANDARD-DEVIATION slider sets the standard deviation of incubation length, which is used in calculating the gamma-distribution for the time in the exposed class; units = days.

The AVERAGE-INFECTIOUS-PERIOD slider sets the mean value of the infectious period, which is used in calculating the gamma-distribution for the time in the infectious class; units = days.

The INFECTIOUS-STANDARD-DEVIATION slider sets the standard deviation of time the individual is infectious, which is used in calculating the gamma-distribution for the time in the infectious class; units = days.

The AVERAGE-SEROCONVERSION-PERIOD slider sets the mean value of the seroconversion period of individuals for whom the vaccine is efficacious, which is used in calculating the gamma-distribution for the time until seroconversion; units = days.

The SEROCONVERSION-STANDARD-DEVIATION slider sets the standard deviation of seroconversion length, which is used in calculating the gamma-distribution for the time until seroconversion; units = days.

The DAILY-VACCINATION-CHANCE slider sets the probability that a susceptible or exposed individual takes a vaccination; units = percent / day.

The VACCINE-EFFICACY slider sets the efficacy of the vaccine; units = percent.

The DAY-OF-FIRST-INFECTION slider sets the time when the first exposed individual appears in the world; units = days.

THINGS TO NOTICE

Setting the DAILY-VACCINATION-CHANCE or the VACCINE-EFFICACY to 0 percent per day or percent, respectively, results in a model identical to the Base Model for seasonal influenza. In the Seasonal Vaccination model the outbreak occurs starting at time DAY-OF-FIRST-INFECTION instead of day 0.

Increasing the DAILY-VACCINATION-CHANCE, the VACCINE-EFFICACY, or the DAY-OF-FIRST INFECTION slightly increases the chance that the disease will die out quickly before causing an outbreak in the population. Decreasing the AVERAGE-SEROCONVERSION-PERIOD has the same effect.

When increasing the DAILY-VACCINATION-CHANCE, the VACCINE-EFFICACY, or the DAY-OF-FIRST INFECTION, if an outbreak occurs, the length of the outbreak will increase, the attack rate will decrease, and the maximum number infected at one time will decrease. Similar results hold for decreasing the AVERAGE-SEROCONVERSION-PERIOD.

RELATED MODELS

NetLogo Models Library: epiDEM Basic epiDEM Travel and Control AIDS Disease Solo

Seasonal influenza model: Base Model

The following models for pandemic influenza and control strategies are modifications of the Base Seasonal Model.

Pandemic influenza models: Waning Immunity Periodic Transmission Chance Two Weakly-Interacting Subpopulations

The pandemic influenza models will result in two peaks in the number of infectious individuals with appropriate parameter selection.

Control strategies for seasonal influenza:
Quarantine Isolation Antivirals Seasonal Vaccination (this model) Pandemic Vaccination

The models incorporating control strategies demonstrate the effect of different control strategies on the attack rate during an outbreak of seasonal influenza.

CREDITS AND REFERENCES

Authors: Roger Estep, Robert Hughes, and Jessica Shiltz, supervised by Dr. Anna Mummert. Work was completed as part of the Marshall University NSF-UBM grant.
Marshall University, Huntington, WV, USA. Summer 2013 -- Fall 2014.

Comments and Questions

Case Study "Modeling Seasonal Influenza"

This model is part of a suite of infectious disease models, including SEIR-Model-Base-Seasonal, SEIR-Model-Vaccination-Seasonal, SEIR-Model-Antivirals, SEIR-Model-Isolation, and SEIR-Model-Periodic-Transmission. These five models are part of the case study "Modeling Seasonal Influenza", 2016, by Marcia Harrison-Pitaniello, Jessica Shiltz, Rober Hughes, Roger Estep, and Anna Mummert published by the National Center for Case Study Teaching in Science (http://sciencecases.lib.buffalo.edu/cs/).

Posted over 9 years ago

Click to Run Model

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

globals 
[ 
  maximum-infectious           ;; The maximum number of infectious individuals at one simulation tick.  
  tick-at-maximum-infectious   ;; The (first) tick when the maximum number of infectious individuals is realized.  
  number-infectious-vector     ;; Vector of the number of infectious individuals at each simulation tick.  
  
  incubation-alpha             ;; Alpha parameter for the gamma distribution used in calculating incubation-time.
  incubation-lambda            ;; Lambda parameter for the gamma distribution used in calculating incubation-time.
  infectious-alpha             ;; Alpha parameter for the gamma distribution used in calculating infectious-time.
  infectious-lambda            ;; Lambda parameter for the gamma distribution used in calculating infectious-time.
  seroconversion-alpha         ;; Alpha parameter for the gamma distribution used in calculating seroconversion-time.
  seroconversion-lambda        ;; Lambda parameter for the gamma distribution used in calculating seroconversion-time.  
  
  number-vaccinated
  
  infection-possible
]

turtles-own
[ 
  susceptible?                 ;; If true, the individual is a member of the susceptible class.  
  exposed?                     ;; If true, the individual is a member of the exposed (incubation) class.
  infectious?                  ;; If true, the individual is a member of the infectious class.
  recovered?                   ;; If true, the individual is a member of the recovered class.
  vaccination?                 ;; If true, the individual has received the vaccine.  
  seroconverted?               ;; If true, the individual has received the vaccine and has seroconverted.  
  
  incubation-length            ;; How long the individual has been in the exposed class, increasing by 1 each tick. This is compared against the incubation-time, selected from a gamma-distribution.
  incubation-time              ;; The randomly chosen gamma-distribution value for how long the individual will be in the exposed class.
  infectious-length            ;; How long the individual has been in the infectious class, increasing by 1 each tick. This is compared against the infectious-time, selected from a gamma-distribution.
  infectious-time              ;; The randomly chosen gamma-distribution value for how long the individual will be in the infectious class.
  seroconversion-length        ;; How long since the individual was given the vaccine, increasing by 1 each tick.  This is compared against the seroconversion-time, selected from a gamma-distribution.  
  seroconversion-time          ;; The randomly chosen gamma-distribution value for how long it will take the individual to seroconvert.
  
  total-contacts               ;; A count of all contacts of the individual.
]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Setup Procedures ;;;;

to setup
  clear-all
  setup-gamma-distributions
  setup-population
  reset-ticks 
end 

to setup-gamma-distributions            ;; The calculation from mean and standard deviation (in days) to the alpha and lambda parameters required for the gamma-distributions (in ticks).  
  set incubation-alpha (average-incubation-period * ticks-per-day)^ 2 / (incubation-standard-deviation * ticks-per-day)^ 2    
  set incubation-lambda (average-incubation-period * ticks-per-day) / (incubation-standard-deviation * ticks-per-day)^ 2      
  set infectious-alpha (average-infectious-period * ticks-per-day)^ 2 / (infectious-standard-deviation * ticks-per-day)^ 2    
  set infectious-lambda (average-infectious-period * ticks-per-day) / (infectious-standard-deviation * ticks-per-day)^ 2   
  set seroconversion-alpha (average-seroconversion-period * ticks-per-day)^ 2 / (seroconversion-standard-deviation * ticks-per-day)^ 2    
  set seroconversion-lambda (average-seroconversion-period * ticks-per-day) / (seroconversion-standard-deviation * ticks-per-day)^ 2      
end 

to setup-population
  create-turtles initial-population   
  [
    setxy random-xcor random-ycor       ;; All individuals are placed on random patches in the world.
    
    set susceptible? true               ;; All individuals are set as susceptible.
    set exposed? false      
    set infectious? false       
    set recovered? false   
    set vaccination? false      
    set seroconverted? false  
     
    set shape "person"
    
    set total-contacts 0
    
   set number-infectious-vector [ 1 ]   ;; The number-infectious-vector vector is initiallized.  
   set number-vaccinated 0
   set infection-possible true
   assign-color
  ]
end 

to assign-color
  if susceptible?
    [ set color white ]
  if exposed?
    [ set color yellow ]
  if infectious?           
    [ set color red ]      
  if recovered?            
    [ set color lime ]
  if seroconverted?
    [ set color cyan ]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Go Procedure ;;;;

to go
  if not infection-possible                                                                                 ;; The simulation ends when no individuals are infected (exposed or infectious).  
    [ stop ]                                                                                 
  
  ask turtles                                                                        
    [ move ]
  
  if ticks / ( ticks-per-day ) = day-of-first-infection                                                     ;; After a given delay, one susceptible individual becomes infectious.  
      [ first-infection ] 
    
  ask turtles with [ infectious? ]                                                                          ;; Infectious individuals might expose susceptible and not seroconverted neighbors.  If infectious individuals have been infectious for infectious-time ticks, they will recover. 
    [ expose-neighbors 
      chance-of-recovery ] 
    
  if ticks / ( ticks-per-day ) mod 1 = 0                                                                    ;; Once each day, some susceptible and exposed individuals are given the vaccine.  
    [ ask turtles with [ ( susceptible? or exposed? ) and not seroconverted? ]
      [ chance-of-receiving-vaccine ] 
    ]
      
  ask turtles with [ vaccination? and susceptible? and not seroconverted? ]                                 ;; If vaccinated and susceptible individuals were given an effective vaccine and have been in the exposed class for seroconversion-time ticks, they will seroconvert. 
    [ chance-of-seroconverting ]
     
  ask turtles with [ exposed? ]                                                                             ;; If exposed individuals have been in the exposed class for incubation-time ticks, they will become infectious.
    [ chance-of-becoming-infectious ]  
     
  ask turtles 
    [ assign-color 
      count-contacts ]

  if all? turtles [ susceptible? or recovered? ] and ticks / ticks-per-day > day-of-first-infection         ;; The simulation ends when no individuals are infected (exposed or infectious).  
    [ set infection-possible false ]  

  compute-maximum-infectious  
  
  tick
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Nested Functions ;;;;

to move                                                                                    ;; Individuals turn a random angle between -40 and 40 degrees then step forward 1 unit.  
  right (random 80) - 40
  forward 1
  if not can-move? 1 [ right 180 ]                                                         ;; If an individual is at the world's boundary, it turns around.
end 

to count-contacts                                                                          ;; Contacts are defined as other individuals within a 1 unit radius.  
  set total-contacts total-contacts + count other turtles in-radius 1
end 

to first-infection
  ifelse any? turtles with [ susceptible? and not seroconverted? ]   
    [ 
      ask one-of turtles with [ susceptible? and not seroconverted? ]
      [ 
          set susceptible? false  
          set exposed? true                                                                   
          set incubation-time random-gamma incubation-alpha incubation-lambda              ;; A newly exposed individual selects an incubation-time from the gamma-distribution and its incubation-lenth is set to 0.          
          set incubation-length 0                                                          
        ]   
    ]
   [ set infection-possible false ]
end 

to expose-neighbors
  ask other turtles in-radius 1 with [ susceptible? and not seroconverted? ]               ;; Susceptible individuals who come into contact with an infectious individual will become infected with probability transmission-chance.
    [ 
      if random-float 100 < transmission-chance                                            
        [ 
          set susceptible? false  
          set exposed? true                                                                   
          set incubation-time random-gamma incubation-alpha incubation-lambda              ;; A newly exposed individual selects an incubation-time from the gamma-distribution and its incubation-lenth is set to 0.          
          set incubation-length 0                                                          
        ]             
    ]                                                              
end       

to chance-of-becoming-infectious                                                           ;; When an infected individual has been in the exposed class longer than its incubation-time, it will become infectious.  
  set incubation-length incubation-length + 1
  if incubation-length > incubation-time                                     
  [                                                                          
    set exposed? false
    set infectious? true                                                      
    set infectious-time random-gamma infectious-alpha infectious-lambda                    ;; A newly infectious individual selects an infectious-time from the gamma-distribution and its infection-length is set to 0.
    set infectious-length 0                                                 
  ]
end 

to chance-of-recovery                                                                      ;; When an infectious individual has been in the infectious class longer than its infection-time, it will recover.
  set infectious-length infectious-length + 1
  if infectious-length > infectious-time                                     
  [                                                                          
    set infectious? false
    set recovered? true
  ]
end 

to chance-of-receiving-vaccine                                                             ;; Once each day, each susceptible and exposed individual has a chance of receiving the vaccine.  Some vaccinations will be effective.                                                      
  if random-float 100 < daily-vaccination-chance    
    [
      set number-vaccinated number-vaccinated + 1           
      set vaccination? true                                        
      set shape "default"                                
      ifelse random-float 100 < vaccine-efficacy                     
      [
        set seroconversion-time random-gamma seroconversion-alpha seroconversion-lambda    ;; The vaccine is effective and a newly vaccinated individual selects a seroconversion-time from the gamma-distribution and its seroconversion-length is set to 0.
        set seroconversion-length 0 
      ]
      [
        set seroconversion-time 1000000                                                    ;; The vaccine is not effective and a newly vaccinated individual has a seroconversion-time much longer than the length of an outbreak.  
        set seroconversion-length 0 
      ]
    ]
end     

to chance-of-seroconverting                                                                ;; When a susceptible and vaccinated individual has been vaccinated longer than its seroconversion-time, it will seroconvert.  
 set seroconversion-length seroconversion-length + 1
   if seroconversion-length > seroconversion-time                                     
   [                                                                                  
     set seroconverted? true
   ]
end   

to compute-maximum-infectious                                                              ;; A vector of the number of infectious individuals at each tick is stored.  The maximum and time of the maximum are computed.  
  set number-infectious-vector lput count turtles with [infectious?] number-infectious-vector
  set maximum-infectious max number-infectious-vector
  set tick-at-maximum-infectious position maximum-infectious number-infectious-vector   
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

There is only one version of this model, created over 10 years ago by Anna Mummert.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.