Uso de Barbijos
Model was written in NetLogo 6.1.1
•
Viewed 348 times
•
Downloaded 34 times
•
Run 0 times
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
turtles-own [ contagio? barbijo?] to setup ca ;;abreviatura de clear-all crt cantortu ;; abreviatura de create-turtles ask turtles [set shape "person" setxy random-xcor random-ycor ifelse random-float 100 < infectiousness [set contagio? true ] [set contagio? false ] ifelse random-float 100 < usodebarbijo [set barbijo? true ] [set barbijo? false ] colorean ] reset-ticks end to go ask turtles[ secontagian colorean move] if count turtles with [contagio? = true] = cantortu [stop] tick end to move set heading random 360 fd 1 end to secontagian ask other turtles-here with [ contagio?] [ ;tiene mi vecino barbijo? ifelse barbijo? [ ask myself [ ;tengo yo barbijo? ifelse barbijo? [if precision ( random-float 1.0 ) 3 < 0.001 [set contagio? true] ] [if precision ( random-float 1.0 ) 2 < 0.4 [set contagio? true] ] colorean ] ] [ask myself [ ;tengo yo barbijo? ifelse barbijo? [if precision ( random-float 1.0 ) 2 < 0.4 [set contagio? true] ] [if precision ( random-float 1.0 ) 2 < 0.9 [set contagio? true] ] colorean ] ] ] ;;with [(contagio? = true) AND (barbijo? = false)] end to colorean ifelse contagio? [set color red] [set color blue] end
There are 3 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Uso de Barbijos.png | preview | barbijo2 | over 4 years ago, by Diego Díaz Córdova | Download |
This model does not have any ancestors.
This model does not have any descendants.