This is an old revision of the document!
When implementing the Lotka-Volterra model using one Compartment block (one for both the predator and prey), the compartment needs to be vectorized. I.e. the rabbit and fox species needs to be added as modelled materials or created as indexes from Index-list. Then either one can use the same approach as in the two Compartment solution, using Source/Sink and Transfer blocks as means to model the dynamic behaviour or just explicitly define the differential equation inside the Compartment.
Equations for Transfers:
Initial Conditions for compartment:
Values for parameter Initial population:
Create only one compartment with name Animals. Create parameters
Parameter | Unit | Value | Description |
---|---|---|---|
a | 1/year | 0.04 | the natural growth rate of rabbits in the absence of predation |
c | 1/year | 0.2 | the natural death rate of foxes in the absence of food (rabbits) |
b | 1/(year F) | 5.0E-4 | the death rate per encounter of rabbits due to predation |
e | F/R | 0.1 | the efficiency of turning predated rabbits into foxes |
Initial Conditions for compartment:
dy/dt for compartment:
Solution to the excersise
Previous
References