The PredatorPrey model shows the Lotka-Volterra model of predator-prey relationships, where the predators and prey live in a somewhat symbiotic fashion. Predators eat the prey, but when prey populations fall, so do predator populations.
The Lotka-Volterra model consists of a pair of equations for change in prey and predator populations (squirrels and hawks), where k is a proportionality constant based on the number of hawks and squirrels.
Δs = (ks * s(t - Δt) - khs * ht * s(t - Δt)) * Δt
Δh = (ksh * s(t - Δt) * h(t - Δt) - kh * h(t - Δt)) * Δt
The prey and predator populations are both represented by stocks. A prey birth fraction of 2 feeds the prey births flow, which contains the equation prey birth fraction * prey population (initially 100). Prey deaths is a function of the term prey death proportionality constant * predator population * prey population.
Predator population is controlled by the predator births flow. This flow contains the predator birth fraction, multiplied by the predator population (initially 15) and the prey population (remember, the predators don't thrive unless there are enough prey!). Predator deaths are controlled by the predator population * predator death proportionality constant (1.06).
Two graphs show predator versus prey populations over time and predator and prey populations graphed on the same axis.