Simple SIR (static)
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
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 [sick? recovered? susceptible? sick-time ] globals [ %infected %recovered %susceptible ] to setup clear-all setup-turtles update-global-variables ;update-display reset-ticks end to setup-turtles create-turtles number-people [setxy random-xcor random-ycor set shape "person" set size 1.5 set sick-time 0 set sick? 0 set recovered? 0 set susceptible? 1 set color green] ask n-of 2 turtles [set sick? 1 set susceptible? 0 set color red] end to go ask turtles [ move age if sick? = 1 [recover] if sick? = 1 [infect] ] update-global-variables ;update-display tick end to update-global-variables if count turtles > 0 [set %infected (count turtles with [sick? = 1] / count turtles) * 100 set %recovered (count turtles with [recovered? = 1] / count turtles) * 100 set %susceptible (count turtles with [susceptible? = 1] / count turtles) * 100 ] end ;to update-display ;ask turtles ;[if shape != turtle-shape [set shape turtle-shape] ; ifelse sick? = 1 [set color red] [ifelse recovered? = 1 [set color grey][set color green]]] ;end to move rt random 100 lt random 100 fd 1 end to infect ask other turtles-here with [sick? = 0 and recovered? = 0] [if random-float 100 < infectiousness [set sick? 1 set susceptible? 0 set color red]] end to age ask turtles with [sick? = 1] [set sick-time sick-time + 1] end to recover if sick-time > (duration * 100) [if random-float 100 < 100 [set recovered? 1 set sick? 0 set susceptible? 0 set color grey] ] end
There is only one version of this model, created over 6 years ago by Georgia T.
This model does not have any ancestors.
This model does not have any descendants.