# Mosquito Transmitted Disease

Model was written in NetLogo 6.3.0
•
Viewed 28 times
•
Downloaded 2 times
•
Run 0 times

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

## Comments and Questions

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

Click to Run Model

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 6 months ago by Nich Martin.

## Attached files

File | Type | Description | Last updated | |
---|---|---|---|---|

Mosquito Transmitted Disease.png | preview | Preview for 'Mosquito Transmitted Disease' | 6 months ago, by Nich Martin | Download |

This model does not have any ancestors.

This model does not have any descendants.