A demonstration of carrying capacity and predation (predation is initially off, see knob on lower right).
This program shows the interaction between growth rates, carrying capacity, and predator efficiency.
Model details are supplied below.

Source code: CarryingCapacityPredator CarryingCapacityPredator button radio_button slider switch_button

Built with Processing

IBEST
and the Computer Science Department, University of Idaho.
For additional information contact: www2.cs.uidaho.edu/~tsoule

The equation underlying the prey dynamics is:
Pi+1 = Pi + Pi*R*(1 - Pi/K) - E*Pi*Pri
The equation determining the predator dynamics is:
Pri+1 = Pri + G*E*Pri*Pi - M*Pri
where:
Pi is the prey population size in the ith iteration
Pri is the preditor population size in the ith iteration ,br/> R is the growth rate of the prey species
G is the growth rate of the predator species
K is the carrying capacity of the environment
E is the efficiency of predation
M is the mortality rate amoung predators
Note that most of these parameters are adjustable.

In addition, in this model, if the Resources knob is set to degrade, then the carrying capacity (i.e. the environmental resources) degrade/decline if the population exceeds the carrying capacity. This reflects overgrazing, using up resources, etc.

Setting the Stochasticity slider to a non-zero value introduces a random factor to the growth equation.