Lotka–Volterra predator–prey model
This script calculates and plots a solution to the predator–prey model.
It uses a simple Euler method, values are stored in numpy arrays for memory efficiency.
Lotka–Volterra system is defined by two first order ODEs:
dx/dt = alpha.x - beta.x.y
dy/dt = -gamma*y + delta.x.y
- x is the prey population
- y is the predator population density
- alpha is the maximum prey per capita growth rate
- beta is the effect of the presence of predators on the prey death rate
- gamma is the predator’s per capita death rate
- delta is the effect of the presence of prey on the predator’s growth rate
The script imports numpy and matplotlib.