aboutsummaryrefslogtreecommitdiffstats
path: root/examples/lotka_volterra/model.modelica
blob: 706ebc39033cca1f3fe9e2d6217738854791e5c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;