System Dynamics (NetLogo): Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 100: Line 100:
* [https://ccl.northwestern.edu/netlogo/docs/systemdynamics.html NetLogo System Dynamics Guide]
* [https://ccl.northwestern.edu/netlogo/docs/systemdynamics.html NetLogo System Dynamics Guide]


Further reading
* [http://www.scholarpedia.org/article/Predator-prey_model Predato-prey model] (ScholarPedia)
* [https://en.wikipedia.org/wiki/Population_dynamics Population dynamics] (Wikipedia)
* [https://en.wikipedia.org/wiki/Population_dynamics_of_fisheries Population dynamics of fisheries]
* [https://en.wikipedia.org/wiki/Lotka-Volterra_equation Lotka-Volterra equation]
* [https://en.wikipedia.org/wiki/Competitive_Lotka-Volterra_equations Competitive Lotka-Volterra equations]
* [https://en.wikipedia.org/wiki/Nicholson-Bailey_model Nicholson-Bailey model]
== Bibliography ==


[[category: Simulation environments]]
[[category: Simulation environments]]

Revision as of 15:40, 13 March 2019

Introduction

This page will describe some elements of NetLogo's system dynamics module.

Draft

Modeling elements

Like other system dynamics environments, NetLogo diagrams describing the structure of model, includes stocks (levels), in/out flows, and constants and/or variables. More precisely, there four kinds of elements, stocks, variables, flows and links. According to the NetLogo System Dynamics Guide manual:

  • A Stock is a collection of stuff, an aggregate. For example, a Stock can represent a population of sheep, the water in a lake, or the number of widgets in a factory.
  • A Flow brings things into, or out of a Stock. Flows look like pipes with a faucet because the faucet controls how much stuff passes through the pipe.
  • A Variable is a value used in the diagram. It can be an equation that depends on other Variables, or it can be a constant.
  • A Link makes a value from one part of the diagram available to another. A link transmits a number from a Variable or a Stock into a Stock or a Flow.

Predation examples

A simple species model

According to Kumar Venkat Predator-Prey Dynamics and Wildlife Management: A System Dynamics Model, a simple two-species system is described by the Lotka-Volerra model:

dN/dt = r * N - s * P * N 
dP/dt = f * s * P * N – q * P 

“N is the prey population (number of individuals or total biomass), P is the predator population, r is the fractional birth rate of the prey population, s is the search efficiency (or attack rate) of the predator, f is the food conversion efficiency of the predator (i.e., how good the predator is at turning food into offspring), and q is the fractional death rate of the predator.”

The system works in the following way as shown in the wolf-sheep model [1] found in the NetLogo library.

N (prey, e.g. sheep) have a natural birth rate which will increase their numbers. Sheep death are caused by wolves eating them. P (predators) population will increase if its food, i.e. the N (the sheep) population, increases. This is implemented with a delay, i.e. eaten sheep is converted into offspring. After a while, the sheep population will decrease which in turn will decrease the predator population, i.e. they will stop producing offspring.

The following NetLogo simulation diagram shows the interdependencies

Two species predation model

The "equations" used in the flows are the following:

  • sheep-births: sheep-birth-rate * sheep
  • sheep-death: sheep * predation-rate * wolves
  • wolf-birth: wolves * predator-efficiency * predation-rate * sheep
  • wolf-death: wolves * wolf-death-rate

Constants are:

  • sheep-birth-rate = 0.4
  • predation-rate = 0.003 (also called attach rate)
  • predator-efficiency = 0.8
  • wolf-death-rate = 0.15
Two species predation model after 357 cycles. Initial values: sheep=100, wolves=30

See also the slightly different model discussed in System Dynamics (FreeStyler) article, i.e. we had cats and mice.

Adding an area

(under construction ! Daniel K. Schneider (talk))

Adding an area can modify the dynamics. In a larger area, sheep can fairly easily find food everywhere but wolves may have a harder time finding sheep. In a small area with the same population it is the other way round. Adding an area requires a redesign of certain interactions.

  • Areas could be defined by a multiple of 10'000m2 (hectares).
  • Sheep density is sheep / area, e.g. 100 sheep in 1km2 makes 1 sheep per hectare
  • The predation-rate (kill rate) is now influenced by the sheep density.

Below we present a model partly inspired by Modeling Exercises by J.G Whelan. The model is on page 32 and the equations are on page 37. However, since we didn't find table functions in NetLogo, we had to modify the system.


  • wolves (t) = wolves (t - dt) + (wolf-births - Wolves-deaths) * dt
  • wolves-births = wolves * wolves-birth_fraction
  • wolves-deaths = wolves * wolves-death_rate
  • wolves-birth_fraction = .25
  • Sheep(t) = Sheep(t - dt) + (Sheep_births - Sheep_deaths) * dt
  • Sheep_births = Sheep * Sheep_birth_fraction
  • Sheep_deaths = Wolves * Sheep_kills_per_predator
  • Sheep_birth_fraction = 1.25
  • Sheep_density = Sheep/area
  • area = 1000
  • wolves-death_fraction =
  • sheep_kills_per_predator =

Three species model

The above Lotka-Volterra model assumes that food (grass) is unlimited. Kumar Venkat, in Predator-Prey Dynamics and Wildlife Management: A System Dynamics Model, defined a third species, i.e. vegetation, in the following way: “V is the vegetation population, k is the fractional regeneration (birth) rate of the vegetation, m is the search efficiency (attack rate) of the prey, and t is the food conversion efficiency of the prey. Also, x is the rate at which seeds are dispersed (“imported” via dispersion) into the area of interest from external sources and y is the probability that an “imported” seed will successfully contribute to the vegetation biomass in the area.”

dV/dt = k * V + x * y – m * V * N 

The model also requires a modification of the sheep equation, i.e. sheep growth also depends on food. More precisely sheep growth is food conversion efficiency t * search efficiency m * amount of grass V * amount of sheep N, minus kills by wolves (s * P * N)

dN/dt = t * m * V * N - s * P * N 

The predator equation remains the same

dP/dt = f * s * P * N – q * P


Parameters:

  • sheep-search-efficiency (m) = 0.02
  • prey-food-conversion-efficiency (t) = 0.005
  • fractional-regeneration-rate (k) = 0.25
  • seed-dispersion-rate (x) = 300
  • seed-survival-probability (y) = 0.25

Links

Further reading

Bibliography

  1. Wilensky, U. (2005). NetLogo Wolf Sheep Predation (System Dynamics) model. http://ccl.northwestern.edu/netlogo/models/WolfSheepPredation(SystemDynamics). Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.