This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial_15-implementing_using_one_compartment [2020/02/19 18:01] ecoloco |
tutorial_15-implementing_using_one_compartment [2023/04/03 17:38] (current) dmytroh |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Tutorial 15-Implementing using one compartment ====== | + | ====== Tutorial 15 - Implementing using one compartment ====== |
===== 3/3 ===== | ===== 3/3 ===== | ||
- | When implementing the Lotka-Volterra model using one [[Compartment|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. 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. | + | When implementing the Lotka-Volterra model using one [[Compartment|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 |
- | |Ecosystem| | | | + | ====Option 1==== |
- | | | + | |
- | | | + | Create parameters according to table below: |
+ | |||
+ | ^Parameter | ||
+ | |a | ||
+ | |c | ||
+ | |b | ||
+ | |e |F/R | ||
+ | |Init_population | ||
+ | |||
+ | Values for parameter Initial population: | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | Create source, sink, compartments and transfer according to picture below: | ||
+ | {{rabbitfoxmodel3.png? | ||
+ | |||
+ | Equations for Transfers: | ||
+ | * // | ||
+ | * // | ||
+ | * // | ||
+ | * // | ||
+ | |||
+ | **Initial Conditions** for compartment: | ||
+ | * For // | ||
+ | * For // | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====Option 2==== | ||
+ | Create parameters according to table below: | ||
+ | |||
+ | ^Parameter | ||
+ | |a |1/ | ||
+ | |c |1/ | ||
+ | |b |1/(year F)|5.0E-4|the death rate per encounter of rabbits due to predation | ||
+ | |e |F/R | ||
+ | |||
+ | Create only one compartment with name // | ||
+ | |||
+ | {{rabbitfoxmodel4.png}} | ||
+ | |||
+ | **Initial Conditions** for compartment: | ||
+ | * For // | ||
+ | * For // | ||
+ | |||
+ | **dy/dt** for compartment: | ||
+ | * Rabbits: // | ||
+ | * Foxes: // | ||
- | //'' | ||
Line 15: | Line 62: | ||
**Solution to the excersise** | **Solution to the excersise** | ||
- | + | * {{lotka-volterra.eco}} | |
- | * {{tutorial: | + | * old one {{tutorial: |