aboutsummaryrefslogtreecommitdiffstats
path: root/examples/lotka_volterra_predator_prey
diff options
context:
space:
mode:
Diffstat (limited to 'examples/lotka_volterra_predator_prey')
-rw-r--r--examples/lotka_volterra_predator_prey/examples.toml11
-rw-r--r--examples/lotka_volterra_predator_prey/model.modelica12
-rw-r--r--examples/lotka_volterra_predator_prey/page.md35
3 files changed, 58 insertions, 0 deletions
diff --git a/examples/lotka_volterra_predator_prey/examples.toml b/examples/lotka_volterra_predator_prey/examples.toml
new file mode 100644
index 0000000..0f5fb85
--- /dev/null
+++ b/examples/lotka_volterra_predator_prey/examples.toml
@@ -0,0 +1,11 @@
+
+[examples]
+
+ [examples.mathworld]
+ x = 10
+ y = 5
+ alpha = 1.5
+ beta = 1
+ gamma = 1
+ t = [0, 20]
+
diff --git a/examples/lotka_volterra_predator_prey/model.modelica b/examples/lotka_volterra_predator_prey/model.modelica
new file mode 100644
index 0000000..706ebc3
--- /dev/null
+++ b/examples/lotka_volterra_predator_prey/model.modelica
@@ -0,0 +1,12 @@
+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;
diff --git a/examples/lotka_volterra_predator_prey/page.md b/examples/lotka_volterra_predator_prey/page.md
new file mode 100644
index 0000000..1ae891d
--- /dev/null
+++ b/examples/lotka_volterra_predator_prey/page.md
@@ -0,0 +1,35 @@
+
+The Lotka–Volterra equations, also known as the predator–prey equations, are a
+pair of first-order, [non-linear](https://en.wikipedia.org/wiki/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.
+
+* [Mathworld](http://mathworld.wolfram.com/Lotka-VolterraEquations.html)
+* [Wikipedia](https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations)
+* [Population dynamics of fisheries](https://en.wikipedia.org/wiki/Population_dynamics_of_fisheries)