# examples/LotkaVolterra

markdown - original modelica**display:**latex

*Predator-Prey equations describing population dynamics of two biological species*

Variable | Type | Description | Value (default) | Datatype |
---|---|---|---|---|

\(\alpha\) | parameter | \(\) | Real | |

\(\beta\) | parameter | \(\) | Real | |

\(\delta\) | parameter | \(\) | Real | |

\(\gamma\) | parameter | \(\) | Real | |

\(x\) | free | population of prey | \(\) | Real |

\(y\) | free | population of predator | \(\) | Real |

The Lotka–Volterra equations, also known as the predator–prey equations, are a pair of first-order, non-linear, differential equations frequently used to describe the dynamics of biological systems in which two species interact, one as a predator and the other as prey.

The Lotka–Volterra system of equations is an example of a Kolmogorov model, which is a more general framework that can model the dynamics of ecological systems with predator-prey interactions, competition, disease, and mutualism.

## Solutions to the equations

The equations have periodic solutions and do not have a simple expression in terms of the usual trigonometric functions, although they are quite tractable.

If none of the non-negative parameters α,β,γ,δ vanishes, three can be absorbed into the normalization of variables to leave but merely one behind: Since the first equation is homogeneous in x, and the second one in y, the parameters β/α and δ/γ, are absorbable in the normalizations of y and x, respectively, and γ into the normalization of t, so that only α/γ remains arbitrary. It is the only parameter affecting the nature of the solutions.

A linearization of the equations yields a solution similar to simple harmonic motion with the population of predators trailing that of prey by 90° in the cycle.

## References

Body text taken from Wikipedia.

## Modelica Code

model LotkaVolterra "Predator-Prey equations describing population dynamics of two biological species" parameter Real alpha; parameter Real beta; parameter Real delta; parameter Real gamma; Real x "population of prey"; Real y "population of predator"; equation der(x) = ((alpha * x) - ((beta * x) * y)); der(y) = (((delta * x) * y) - (gamma * y)); end LotkaVolterra;