Predator - prey - people (in Czech)
Model was written in NetLogo 5.0.2
•
Viewed 639 times
•
Downloaded 46 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
Click to Run Model
breed [jeleni jelen] breed [vlci vlk] breed [lide clovek] turtles-own [energie] lide-own [zemedelec zasoby] patches-own [odpocet ochrana] to setup clear-all ask patches [ set pcolor green ] ask patches [ set odpocet random doba-rustu-rostlin set pcolor one-of [66 37] set ochrana false ] ask one-of patches [ if chranene-uzemi > 0 [set ochrana true] ] repeat (chranene-uzemi / 100 * count patches - 1) [ ask one-of patches with [ochrana] [ if-else any? neighbors with [not ochrana] [ask one-of neighbors with [not ochrana] [set ochrana true]] [ask one-of patches with [not ochrana] [set ochrana true]] ] ] ask patches with [ochrana] [set pcolor pcolor - 3] set-default-shape jeleni "jelen" create-jeleni poc-pocet-jelenu [ set color 32 set size 2 set label-color blue - 2 set energie random (2 * zisk-energie-z-rostliny) setxy random-xcor random-ycor ] set-default-shape vlci "vlk" create-vlci poc-pocet-vlku [ set color 4 set size 2 set energie random (2 * zisk-energie-z-jelena) setxy random-xcor random-ycor ] set-default-shape lide "person" create-lide poc-pocet-lidi [ set color 14 set size 2 set energie random (2 * zisk-energie-z-jelena) setxy random-xcor random-ycor set zemedelec false ] ask n-of (podil-zemedelcu / 100 * count lide) lide [ set zemedelec true set color 62 ] reset-ticks end to krokuj [kroky] repeat kroky [ go ] end to go if not any? turtles [ stop ] ask lide with [zemedelec] [ pohyb-lide-sklizen set energie energie - 1 jist-rostliny-lide reprodukovat-lidi smrt-hladem ] ask lide with [not zemedelec] [ pohyb-lide-lov set energie energie - 1 chytat-korist reprodukovat-lidi smrt-hladem ] ask jeleni [ pohyb set energie energie - 1 ; jeleni pohybem ztraceji energii jist-rostliny reprodukovat-jeleny smrt-hladem ] ask vlci [ pohyb set energie energie - 1 ; vlci pohybem ztraceji energii chytat-jeleny reprodukovat-vlky smrt-hladem ] ask patches [ rust-rostlin ] tick end to pohyb rt random 50 lt random 50 fd 1 end to pohyb-lide-sklizen ifelse any? neighbors with [count lide-here = 0 and (pcolor = 66)] [ face one-of neighbors with [count lide-here = 0 and (pcolor = 66)] ] [ rt random 50 lt random 50 ] fd 1 end to pohyb-lide-lov ifelse any? jeleni with [distance myself <= 1 and not [ochrana] of patch-here ] [ face one-of jeleni with [distance myself <= 1 and not [ochrana] of patch-here ] ] [ ifelse any? vlci with [distance myself <= 1 and not [ochrana] of patch-here ] [ face one-of vlci with [distance myself <= 1 and not [ochrana] of patch-here ] ] [ rt random 50 lt random 50 ] ] fd 1 end to jist-rostliny if (pcolor = 66 or pcolor = 63) [ set pcolor ifelse-value ochrana [34] [37] set energie energie + zisk-energie-z-rostliny ] end to jist-rostliny-lide if (pcolor = 66) [ set pcolor 37 set energie energie + zisk-energie-z-rostliny ] end to reprodukovat-jeleny if random-float 100 < jeleni-reprodukce [ set energie (energie / 2) hatch 1 [ rt random-float 360 fd 1 ] ] end to reprodukovat-vlky if random-float 100 < vlci-reprodukce [ set energie (energie / 2) hatch 1 [ rt random-float 360 fd 1 ] ] end to reprodukovat-lidi if random-float 100 < lidska-reprodukce [ set energie (energie / 2) hatch 1 [ if-else random-float 100 <= podil-zemedelcu [ set zemedelec true set color 62 ] [ set zemedelec false set color 14 ] rt random-float 360 fd 1 ] ] end to chytat-jeleny let korist one-of jeleni in-radius 0.5 if korist != nobody [ ask korist [ die ] set energie energie + zisk-energie-z-jelena ] end to chytat-korist let korist one-of (turtle-set jeleni vlci) with [distance myself <= 0.5 and [not ochrana] of patch-here] if korist != nobody [ let zisk-energie ifelse-value ([breed] of korist = "jelen") [zisk-energie-z-jelena] [zisk-energie-z-vlka] ask korist [ die ] set energie energie + zisk-energie ] end to smrt-hladem if energie < 0 [ die ] end to rust-rostlin if (pcolor = 37 or pcolor = 34) [ ifelse odpocet <= 0 [ set pcolor ifelse-value ochrana [63] [66] set odpocet doba-rustu-rostlin ] [ set odpocet odpocet - 1 ] ] end
There is only one version of this model, created over 11 years ago by Viktor Vojtko.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Predator - prey - people (in Czech).png | preview | Preview for 'Predator - prey - people (in Czech)' | over 11 years ago, by Viktor Vojtko | Download |
This model does not have any ancestors.
This model does not have any descendants.
Viktor Vojtko
Model description in English
The model shows impact of people (hunters, gatherers/farmers) on a classical predator - prey ecosystem. It is possible to set protected land proportion.
Posted over 11 years ago