Jebel Sahaba Model 3 - equal resource distribution 3 group scenario
Model was written in NetLogo 6.1.1
•
Viewed 104 times
•
Downloaded 11 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
globals [ max-people max-arrows max-dots ] breed [ people person ] breed [ arrows arrow ] breed [ dots dot] turtles-own [ energy ] patches-own [countdown] to setup clear-all ask patches [ set pcolor green ] create-people initial-number-people [ set shape "person" set color black set size 1.5 set energy random (2 * people-gain-from-food) setxy random-xcor random-ycor ] create-arrows initial-number-arrows [ set shape "arrow" set color red set size 1.5 set energy random (2 * arrows-gain-from-food) setxy random-xcor random-ycor ] create-dots initial-number-dots [ set shape "dot" set color blue set size 1.5 set energy random (2 * arrows-gain-from-food) setxy random-xcor random-ycor ] reset-ticks end to go if not any? turtles [ stop ] if ticks >= 500 [stop] ask people [ move set energy energy - 1 eat-grass eat-arrows eat-dots death reproduce-people ] ask arrows [ move set energy energy - 1 eat-grass eat-people eat-dots death reproduce-arrows ] ask dots [ move set energy energy - 1 eat-grass eat-people eat-arrows death reproduce-dots ] ask patches [ grow-grass ] tick end to move rt random 50 left random 50 fd 1 end to eat-grass if pcolor = green [ set pcolor brown set energy energy + people-gain-from-food set energy energy + arrows-gain-from-food set energy energy + dots-gain-from-food ] ifelse show-energy? [ set label energy ] [set label "" ] end to reproduce-people ; if random-float 100 < people-reproduce [ set energy (energy / 2) hatch 1 [ rt random-float 360 fd 1 ] ] end to reproduce-arrows if random-float 100 < arrows-reproduce [ set energy (energy / 2) hatch 1 [ rt random-float 360 fd 1 ] ] end to reproduce-dots if random-float 100 < dots-reproduce [ set energy (energy / 2) hatch 1 [ rt random-float 360 fd 1 ] ] end to eat-people let prey one-of people-here if prey != nobody [ ask prey [ die ] set energy energy + arrows-gain-from-food + dots-gain-from-food ] end to eat-arrows let prey one-of arrows-here if prey != nobody [ ask prey [ die ] set energy energy + people-gain-from-food + dots-gain-from-food ] end to eat-dots let prey one-of dots-here if prey != nobody [ ask prey [ die ] set energy energy + people-gain-from-food + arrows-gain-from-food ] end to death if energy <= 0 [ die ] stop move show-turtle set color grey end to grow-grass if pcolor = brown [ ifelse countdown <= 0 [ set pcolor green set countdown grass-regrowth-time ] [ set countdown countdown - 1 ] ] end
There is only one version of this model, created over 3 years ago by Durr-e-Maknoon Tariq.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Jebel Sahaba Model 3 - equal resource distribution 3 group scenario.png | preview | Preview for 'Jebel Sahaba Model 3 - equal resource distribution 3 group scenario' | over 3 years ago, by Durr-e-Maknoon Tariq | Download |
This model does not have any ancestors.
This model does not have any descendants.