Herd Immunity

Herd Immunity preview image

1 collaborator

Default-person Sean K (Author)

Tags

bio 312 

"model was created for our bio class"

Tagged by Sean K over 9 years ago

biol312 

Tagged by Steven Brewer over 9 years ago

disease 

Tagged by Sean K over 9 years ago

herd immunity 

Tagged by Sean K over 9 years ago

transmission 

Tagged by Sean K over 9 years ago

writing in bio 

Tagged by Sean K over 9 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.2.0 • Viewed 916 times • Downloaded 62 times • Run 0 times
Download the 'Herd Immunity' modelDownload this modelEmbed this model

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


Info tab cannot be displayed because of an encoding error

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model






;; *******************************************************Disclaimer: Please Read*******************************************************
;; Parts of this models were derived from and inspired by other models and we would like to give credit to those who created them. 
;;     
;;     Virus model:
;;       Wilensky, U. (1998). NetLogo Virus model. http://ccl.northwestern.edu/netlogo/models/Virus. 
;;          Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, 
;;          Northwestern University, Evanston, IL3
;;
;;     AIDS model:
;;       Wilensky, U. (1997). NetLogo AIDS model. http://ccl.northwestern.edu/netlogo/models/AIDS. 
;;          Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, 
;;          Northwestern University, Evanston, IL
;;
;;     Wolf Sheep Predication:
;;       Wilensky, U. (1997). NetLogo Wolf Sheep Predation model. http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation.
;;          Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, 
;;          Northwestern University, Evanston, IL
;;
;; This model is designed to represent herd immunity in a population of varying vaccination levels.
;;*******************************************************Disclaimer: Please Read*******************************************************





;; Version 2.7



turtles-own
[infected
  healthy-vaccinated
  healthy-unvaccinated
  healthy-previously-infected
  infected-count ;; how many days the turtles have been infected
  infected-period ]


breed[unvaccinated-people]
breed[vaccinated-people]
breed[vectors-for-infection]
breed[previously-infected-people-healthy] ;; incoperate this one somehow, will not be in intial set up as it cannot occur with out recovery

globals
[carrying-capacity]

to setup
  clear-all
  setup-turtles-vaccinated
  setup-turtles-healty-unvaccinated
  set-up-initial-vectors-for-transmission
  setup-constants
  reset-ticks
end 

to setup-turtles-vaccinated
  set-default-shape vaccinated-people "person"
  create-vaccinated-people ((population-size - Initial-infected) * (vaccination-levels / 100))
  [setxy random-xcor random-ycor
   set size 2]
  ask Vaccinated-people [be-healthy-Vac.]
end 

to setup-turtles-healty-unvaccinated
  set-default-shape unvaccinated-people "person"
  create-unvaccinated-people ((population-size - Initial-infected) * ((100 - vaccination-levels) / 100))
  [setxy random-xcor random-ycor
  set size 2]
  ask unvaccinated-people [be-healty-unvaccinated]
end 

to set-up-initial-vectors-for-transmission
  set-default-shape vectors-for-infection "person"
  create-vectors-for-infection initial-infected
  [setxy random-xcor random-ycor
   set size 2]
  ask vectors-for-infection [be-infected]
end 

to be-infected
  set infected true
  set healthy-vaccinated false
  set healthy-unvaccinated false
  set color red
end 

to be-Healthy-Vac.
  set infected false
  set healthy-vaccinated true
  set healthy-unvaccinated false
  set color green
end  

to be-healty-unvaccinated
  set infected false
  set healthy-vaccinated false
  set healthy-unvaccinated true
  set color grey
end 

to setup-constants
  set carrying-capacity population-size
end 


To go
  tick
  move
  infect
  durration-of-infection
  ask turtles
  [if infected [recover-or-die]]
end 

to move
  ask turtles
  [rt random 179
  lt random 179
  fd People-Movement]
end 

to durration-of-infection
  ask turtles
  [if infected
  [set infected-count (infected-count + .225)]]
end 

to infect ;; this peice of code comes from the virus model cite Author later*****
 ask turtles with [infected]
    [ ask other turtles-here with [healthy-unvaccinated]
        [ if (random-float 100) < infectiousness
            [be-infected ] ] ]
end 

To recover-or-die
  if infected-count > duration-of-infectious-period                    
    [ ifelse random-float 100 < chance-of-recovery   
      [ be-now-healthy-previously-infected ]
      [ die ] ]
end 

to be-now-healthy-previously-infected
     set infected false
     set healthy-vaccinated false
     set healthy-unvaccinated false
     set healthy-previously-infected true
     set color yellow
end 

There is only one version of this model, created over 9 years ago by Sean K.

Attached files

File Type Description Last updated
Herd Immunity.png preview Preview Pic. over 9 years ago, by Sean K Download

This model does not have any ancestors.

This model does not have any descendants.