MS Virus
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
What if a virus replicated linearly?
HOW IT WORKS
Choose the number of people to start and run model - which adds 1 new infection per tick (day).
HOW TO USE IT
Use the slider to set the number of students in the class. Reset the model and then run. Adjust the speed of the ticks (days) using the tick slider at the top of the model. While getting used to model #2, you may wish to have that slider set to a "slower" value.
THINGS TO NOTICE
What type of function does the plot show? What about the number of infections per day?
THINGS TO TRY
Change the number of students in the room. How does the plot change?
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 [ infected day-became-ill] globals [ number-infected infected-set number-to-be-infected] to go count-infected-turtles if number-infected >= Number-Of-Students [ stop ] infect-students tick end to count-infected-turtles set number-infected count turtles with [ infected = true ] end to infect-students set number-to-be-infected 0 if Model = "default" [ set Model 1 ] if Model = 1 [ set Daily-Infection-Rate 1 repeat Daily-Infection-Rate [ if number-infected < Number-Of-Students[ ask one-of turtles with [ infected = false ][ set infected true set shape "face sad" set color red set ycor ycor * -1 set day-became-ill ticks count-infected-turtles ] ] ] ] if Model = 2 [ ;; make this one exponential if Daily-Infection-Rate = 1 [set Daily-Infection-Rate 1.1] set number-to-be-infected ( number-infected * (Daily-Infection-Rate ^ ticks) ) set number-to-be-infected (number-to-be-infected - number-infected ) print number-to-be-infected repeat number-to-be-infected [ if number-infected < Number-Of-Students[ ask one-of turtles with [ infected = false ][ set infected true set shape "face sad" set color red set ycor ycor * -1 count-infected-turtles ] ] ] ] if Model = 3 [ set Daily-Infection-Rate 2 set number-to-be-infected (ticks ^ Daily-Infection-Rate ) set number-to-be-infected (number-to-be-infected - number-infected ) repeat number-to-be-infected[ if number-infected < Number-Of-Students[ ask one-of turtles with [ infected = false ][ set infected true set shape "face sad" set color red set ycor ycor * -1 count-infected-turtles ] ] ] ] end to reset clear-all setup-patches setup-turtles reset-ticks end to setup-turtles create-turtles Number-Of-Students ask turtles [ setxy random-xcor random max-pycor] ask turtles [ if ycor = 0 [ set ycor ycor + 1 ] ] ask turtles [ set shape "face happy" ] ask turtles [ set color green ] ask turtles [ set infected false ] ask turtles [ set size 1] ask turtle 1 [ set color red ] ask turtle 1 [ set infected true ] ask turtle 1 [ set shape "face sad" ] ask turtle 1 [ set day-became-ill 0 ] let negYcor [ycor] of turtle 1 ask turtle 1 [ set ycor ycor * -1 ] count-infected-turtles end to setup-patches ask patches [ if pycor = 0 [set pcolor grey ] ] ask patches [ if pycor > 0 [set pcolor green + 4 ] ] ask patches [ if pycor < 0 [set pcolor red + 4 ] ] end
There is only one version of this model, created over 4 years ago by Katherine Bolger.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.