Wolf Sheep Predation (docked)

Wolf Sheep Predation (docked) preview image

1 collaborator

Uri_dolphin3 Uri Wilensky (Author)

Tags

system dynamics 

Tagged by Reuven M. Lerner almost 11 years ago

Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 873 times • Downloaded 75 times • Run 2 times
Download the 'Wolf Sheep Predation (docked)' modelDownload this modelEmbed this model

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


WHAT IS IT?

This model explores the relationship between two different models of predator-prey ecosystems: an agent-based model and a aggregate model. Each of the models can be run separately, or docked side-by-side for comparison.

In the agent model, wolves and sheep wander 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.

The aggregate model is a System Dynamics model of the relationship between populations our wolves and sheep. It is based on a version of the famous Lotka-Volterra model of interactions between two species in an ecosystem.

HOW TO USE IT

  1. Adjust the slider parameters (see below), or use the default settings.
  2. Press the SETUP-COMPARISON button.
  3. Press the COMPARE button to begin the simulation.
  4. View the POPULATIONS and AGENT-POPULATIONS plots to watch the populations fluctuate over time

Parameters shared between agent and aggregate models:

  • INITIAL-NUMBER-SHEEP: The initial size of sheep population
  • INITIAL-NUMBER-WOLVES: The initial size of wolf population
  • SHEEP-REPRODUCE: The probability of a sheep reproducing at each time step

Parameters for agent model:

  • SHEEP-MAX-INITIAL-ENERGY: At setup time, sheep are given an energy between 1 and this value
  • WOLF-GAIN-FROM-FOOD: The amount of energy wolves get for every sheep eaten
  • WOLF-REPRODUCE: The probability of a wolf reproducing at each time step

Parameters for aggregate model:

  • WOLVES-DEATH-RATE: The rate at which wolves die.
  • PREDATION-RATE: The rate at which wolves eat sheep.
  • PREDATOR-EFFICIENCY: The efficiency of the wolves in extracting energy to reproduce from the prey they eat.

THINGS TO NOTICE

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?

Notice that under stable settings, the populations tend to fluctuate at a predictable pace. Can you find any parameters that will speed this up or slow it down?

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 the System Dynamics Modeler to create the aggregate model.

RELATED MODELS

Look at the Wolf Sheep Predation model for an example of an agent model which can produce a stable model of predator-prey ecosystems.

CREDITS AND REFERENCES

  • Lotka, A.J. (1956) Elements of Mathematical Biology. New York: Dover.
  • 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.

HOW TO CITE

If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:

  • Wilensky, U. (2005). NetLogo Wolf Sheep Predation (docked) model. http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation(docked). Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.

COPYRIGHT AND LICENSE

Copyright 2005 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

Comments and Questions

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

Click to Run Model

;; Sheep and wolves are both breeds of turtle.
breed [sheep a-sheep]  ;; sheep is its own plural, so we use "a-sheep" as the singular.
breed [wolves wolf]
turtles-own [energy]       ;; both wolves and sheep have energy

to setup
  clear-all
  ask patches [ set pcolor green ]
  set-default-shape sheep "sheep"
  create-sheep initial-number-sheep  ;; create the sheep, then initialize their variables
  [
    set color white
    set size 1.5  ;; easier to see
    set label-color blue - 2
    set energy 1 + random sheep-max-initial-energy
    setxy random-xcor random-ycor
  ]
  set-default-shape wolves "wolf"
  create-wolves initial-number-wolves  ;; create the wolves, then initialize their variables
  [
    set color black
    set size 1.5  ;; easier to see
    set energy random (2 * wolf-gain-from-food)
    setxy random-xcor random-ycor
  ]
  display-labels
  reset-ticks
end 

to go
  if not any? turtles [ stop ]
  ask sheep [
    move
    death
    reproduce-sheep
  ]
  ask wolves [
    move
    set energy energy - 1  ;; wolves lose energy as they move
    catch-sheep
    death
    reproduce-wolves
  ]
end 

to move  ;; turtle procedure
  rt random 50
  lt random 50
  fd 1
end 

to reproduce-sheep  ;; sheep procedure
  if random-float 100 < sheep-reproduce [  ;; throw "dice" to see if you will reproduce
    set energy (energy / 2)                ;; divide energy between parent and offspring
    hatch 1 [ rt random-float 360 fd 1 ]   ;; hatch an offspring and move it forward 1 step
  ]
end 

to reproduce-wolves  ;; wolf procedure
  if random-float 100 < wolf-reproduce [  ;; throw "dice" to see if you will reproduce
    set energy (energy / 2)               ;; divide energy between parent and offspring
    hatch 1 [ rt random-float 360 fd 1 ]  ;; hatch an offspring and move it forward 1 step
  ]
end 

to catch-sheep  ;; wolf procedure
  let prey one-of sheep-here                    ;; grab a random sheep
  if prey != nobody                             ;; did we get one?  if so,
    [ ask prey [ die ]                          ;; kill it
      set energy energy + wolf-gain-from-food ] ;; get energy from eating
end 

to death  ;; turtle procedure
  ;; when energy dips below zero, die
  if energy < 0 [ die ]
end 

to display-labels
  ask turtles [ set label "" ]
  if show-energy? [
    ask wolves [ set label round energy ]
  ]
end 

to setup-aggregate
  set-current-plot "populations"
  clear-plot
  ;; call procedure generated by aggregate modeler
  system-dynamics-setup
  system-dynamics-do-plot
end 

to step-aggregate
  ;; each agent tick is DT=1
  repeat ( 1 / dt ) [ system-dynamics-go ]
end 

to compare
  go
  step-aggregate
  set-current-plot "populations"
  system-dynamics-do-plot
  update-plots
  display-labels
end 


; Copyright 2005 Uri Wilensky.
; See Info tab for full copyright and license.

There are 10 versions of this model.

Uploaded by When Description Download
Uri Wilensky almost 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky over 11 years ago Updated version tag Download this version
Uri Wilensky over 11 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky over 12 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky almost 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky almost 14 years ago Wolf Sheep Predation (docked) Download this version

Attached files

File Type Description Last updated
Wolf Sheep Predation (docked).png preview Preview for 'Wolf Sheep Predation (docked)' about 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.