Mosquito Transmitted Disease
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
breed [people person] breed [mosquitoes mosquito] people-own [energy infection kids IT] mosquitoes-own [menergy minfection mids MIT] globals [number-died] to setup clear-all ask patches [ set pcolor green ] set-default-shape people "person" set number-died 0 create-people initial-number-of-people [ set color blue set size 2 set kids 0 set label-color blue - 2 set energy random-float 50 setxy random-xcor random-ycor ] set-default-shape mosquitoes "bug" create-mosquitoes initial-number-potentials [ set color black set size 1 set menergy random-float 50 setxy random-xcor random-ycor ] create-mosquitoes initial-number-vectors [ set minfection 1 set color red set size 1 set menergy random-float 50 setxy random-xcor random-ycor ] reset-ticks end to go ask people [ reproduce-people move-people catch-mosquitoes death-people color-infection ] ask mosquitoes [ reproduce-mosquitoes move-mosquitoes catch-people death-mosquitoes color-minfection ] add-mosq kill-mosq if count people < 1 [ stop] if ticks >= 2000 [ stop] tick end to move-people rt random 50 lt random 50 if infection = 0 [ set energy energy + random-float 3] if infection = 1 [ set energy energy + random-float 1 if IT > 0 [set IT IT - 1] if IT = 0 [set color blue set infection 0] ] fd people-movement / 50 set energy energy - random-float 1.5 end to move-mosquitoes rt random 50 lt random 50 set menergy menergy - random-float 1 if minfection = 1 [set MIT MIT - 1] fd (temperature / 5) end to catch-people let prey one-of people-here if prey != nobody [set menergy menergy + random-float 50] if minfection = 1 [ if prey != nobody [ ask prey [ set infection 1 set IT 10] ] ] end to catch-mosquitoes let mosq one-of mosquitoes-here if infection = 1 [ if mosq != nobody [ ask mosq [ set minfection 1 set MIT 5] ] ] end to reproduce-people if count people < 100 [ if energy >= 199 [ set kids random number-children hatch kids [rt random-float 360 fd 1 set energy random-float 5 set color blue] set energy random-float 50 ] ] end to reproduce-mosquitoes if count mosquitoes < 500 [ if menergy >= 199 [ ;;set mids 10 hatch 20 [rt random-float 360 fd 1 set menergy random-float 5 set color black] die ] ] end to death-people ask people [ if energy < 0 [ set number-died (number-died + 1) die] ] end to death-mosquitoes ask mosquitoes [ if menergy < 0 [die]] end to color-infection if infection = 1 [ set color red ] end to color-minfection if minfection = 1 [ set color red ] end to add-mosq let monte random-float 1 if monte <= vector-migration [ create-mosquitoes 1 [ set menergy random-float 5 let mm random-float 1 ifelse mm <= 0.99 [ set minfection 1 set color red][ set minfection 0 set color blue] ] ] end to kill-mosq if count people with [color = red] / count people >= control-population [ ask mosquitoes [die] ] end
There is only one version of this model, created almost 2 years ago by Nich Martin.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Mosquito Transmitted Disease.png | preview | Preview for 'Mosquito Transmitted Disease' | almost 2 years ago, by Nich Martin | Download |
This model does not have any ancestors.
This model does not have any descendants.