📄 ---brokenrabbits.nlogo
字号:
56999102grass?grass?01-1000SLIDER10670318103grass-regrowth-timegrass-regrowth-time01003011NILBUTTON8107743setupsetupNIL1TOBSERVERBUTTON901015743gogoT1TOBSERVERPLOT8301317498populationstimepop.0.0100.00.0100.0truetruePENS"sheep" 1.0 0 -16776961 true"wolves" 1.0 0 -65536 true"grass / 4" 1.0 0 -11352576 trueMONITOR87243158292sheepcount sheep31MONITOR162243244292wolvescount wolves31MONITOR248243324292grass / 4count patches with [ pcolor = green ] / 401TEXTBOX8112148131Sheep settingsTEXTBOX186112299130Wolf settingsTEXTBOX95016168Grass settingsMONITOR524383292time-ticksticks01SWITCH1671030343show-energy?show-energy?11-1000SLIDER13512219545initial-number-rabbitsinitial-number-rabbits0100711NILSLIDER13558223591rabbit-gain-from-foodrabbit-gain-from-food01005011NILSLIDER16597190630rabbit-reproducerabbit-reproduce01005011NILSLIDER23643229676wolf-gain-from-rabbitwolf-gain-from-rabbit01005011NIL@#$#@#$#@WHAT IS IT? -----------This model explores the stability of predator-prey ecosystems. (The construction of this model is described in two papers by Wilensky & Reisman referenced below.) Such systems are called unstable when they tend to result in extinction for one or more species involved. In contrast, systems are stable when they tend to maintain themselves over time, despite fluctuations in population sizes. There are two main variations to this model.In the first variation, wolves and sheep wonder randomly around the landscape, while the wolves look for sheep to prey on. Each step costs the wolves energy, and they must eat sheep in order to replenish their energy - when they run out of energy they die. To allow the population to continue, each wolf or sheep has a fixed probability of reproducing at each time step. This variation produces interesting population dynamics, but is ultimately unstable.The second variation includes grass (green) in addition to wolves and sheep. The behavior of the wolves is identical to the first variation, however this time the sheep must eat grass in order to maintain their energy - when they run out of energy they die. Once grass is eaten it will only regrow after a fixed amount of time. This variation is more complex than the first, but it is generally stable.HOW TO USE IT -------------1. Set the GRASS? switch to TRUE to include grass in the model, or to FALSE to only include wolves (red) and sheep (white).2. Adjust the slider parameters (see below), or use the default settings.3. Press the SETUP button.4. Press the GO button to begin the simulation.5. View the POPULATIONS plot to watch the populations fluctuate over time6. View the count-sheep/count-wolves monitors to view current population sizesParameters:INITIAL-NUMBER-SHEEP: The initial size of sheep population INITIAL-NUMBER-WOLVES: The initial size of wolf populationSHEEP-GAIN-FROM-FOOD: The amount of energy sheep get for every grass patch eatenWOLF-GAIN-FROM-FOOD: The amount of energy wolves get for every sheep eatenSHEEP-REPRODUCE: The probability of a sheep reproducing at each time stepWOLF-REPRODUCE: The probability of a wolf reproducing at each time stepGRASS?: Whether or not to include grass in the modelGRASS-REGROWTH-TIME: How long it takes for grass to regrow once it is eatenSHOW-ENERGY?: Whether or not to show the energy of each animal in the Graphics WindowNotes:- one unit of energy is deducted for every step a wolf takes- when grass is included, one unit of energy is deducted for every step a sheep takesTHINGS TO NOTICE ----------------When grass is not included, watch as the sheep and wolf populations fluctuate. Notice that increases and decreases in the sizes of each population are related. In what way are they related? What eventually happens?Once grass is added, notice the green line added to the population plot representing fluctuations in the amount of grass. How do the sizes of the three populations appear to relate now? What is the explanation for this?Why do you suppose that some variations of the model might be stable while others are not?THINGS TO TRY------------- Try adjusting the parameters under various settings. How sensitive is the stability of the model to the particular parameters?Can you find any parameters that generate a stable ecosystem that includes only wolves and sheep? Try setting GRASS? to TRUE, but setting INITIAL-NUMBER-WOLVES to 0. This gives a stable ecosystem with only sheep and grass. Why might this be stable while the variation with only sheep and wolves is not?Notice that under stable settings, the populations tend to fluctuation at a predictable pace. Can you find any parameters that will speed this up or slow it down?Try changing the reproduction rules -- for example, what would happen if reproduction depended on energy rather than being determined by a fixed probability?EXTENDING THE MODEL-------------------There are a number ways to alter the model so that it will be stable with only wolves and sheep (no grass). Some will require new elements to be coded in or existing behaviors to be changed. Can you develop such a version?NETLOGO FEATURES----------------Note the use of breeds to model two different kinds of "turtles": wolves and sheep. Note the use of patches to model grass.Note use of the RANDOM-ONE-OF agentset command to select a sheep to be eaten by a wolf.RELATED MODELS---------------Look at Rabbit Grass Weeds for another model of interacting populations with different rules. CREDITS AND REFERENCES----------------------Wilensky, U. & Reisman, K. (1999). Connected Science: Learning Biology through Constructing and Testing Computational Theories -- an Embodied Modeling Approach. International Journal of Complex Systems, M. 234, pp. 1 - 12. (This model is a slightly extended version of the model described in the paper.)Wilensky, U. & Reisman, K. (in press). Thinking like a Wolf, a Sheep or a Firefly: Learning Biology through Constructing and Testing Computational Theories -- an Embodied Modeling Approach. Cognition & Instruction.To refer to this model in academic publications, please use: Wilensky, U. (1998). NetLogo Wolf Sheep Predation model. http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.@#$#@#$#@defaulttrue0Polygon -7566196 true true 150 5 40 250 150 205 260 250sheepfalse15Rectangle -1 true true 90 75 270 225Circle -1 true true 15 75 150Rectangle -16777216 true false 81 225 134 286Rectangle -16777216 true false 180 225 238 285Circle -16777216 true false 1 88 92wolffalse0Rectangle -7566196 true true 15 105 105 165Rectangle -7566196 true true 45 90 105 105Polygon -7566196 true true 60 90 83 44 104 90Polygon -16777216 true false 67 90 82 59 97 89Rectangle -1 true false 48 93 59 105Rectangle -16777216 true false 51 96 55 101Rectangle -16777216 true false 0 121 15 135Rectangle -16777216 true false 15 136 60 151Polygon -1 true false 15 136 23 149 31 136Polygon -1 true false 30 151 37 136 43 151Rectangle -7566196 true true 105 120 263 195Rectangle -7566196 true true 108 195 259 201Rectangle -7566196 true true 114 201 252 210Rectangle -7566196 true true 120 210 243 214Rectangle -7566196 true true 115 114 255 120Rectangle -7566196 true true 128 108 248 114Rectangle -7566196 true true 150 105 225 108Rectangle -7566196 true true 132 214 155 270Rectangle -7566196 true true 110 260 132 270Rectangle -7566196 true true 210 214 232 270Rectangle -7566196 true true 189 260 210 270Line -7566196 true 263 127 281 155Line -7566196 true 281 155 281 192bunnytrue0Line -256 false 68 33 25 47Line -256 false 25 47 78 152Line -256 false 116 140 67 33Line -256 false 165 127 165 124Line -256 false 175 98 192 78Line -256 false 162 133 207 18Line -256 false 194 20 263 51Line -256 false 261 53 214 153Circle -256 true false 60 106 174@#$#@#$#@NetLogo 1.2@#$#@#$#@@#$#@#$#@@#$#@#$#@
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -