The classic Lotka–Volterra model was originally proposed to explain variations in fish populations in the Mediterranean, but it has since been used to explain the dynamics of any predator-prey system in which certain assumptions are valid. Here, using SystemModeler, we explore the oscillations of the snowshoe hare and the lynx.

The Lotka–Volterra Model as a Component-Based Model

The Lotka–Volterra model in an intuitive component style created in Wolfram SystemModeler and Mathematica.
WSMCreateModel is a useful function in Mathematica that makes it possible to create Modelica models in SystemModeler. You can create standalone models, connectors, or models that extend from other models using this command. To illustrate the use of WSMCreateModel, the component "hare" in the predator-prey model was created in Mathematica.
At the top of the figure above is the Mathematica code that specifies the equations, initial equations, connectors, and parameters of the model. The output at the bottom represents the Modelica text view version of the created model.

Explore the Predator-Prey Interactions

Build Modelica models from within Mathematica

Use the WSMLink function WSMCreateModel to create Modelica models in SystemModeler from within Mathematica.