This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial_15-implementing_using_one_compartment [2020/02/19 18:10] ecoloco |
tutorial_15-implementing_using_one_compartment [2023/04/03 17:34] dmytroh |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== 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 |
- | < | + | |
- | <table xmlns="http://www.w3.org/1999/xhtml" style=" | + | ====Option 1==== |
- | < | + | {{rabbitfoxmodel3.png? |
- | | + | |
- | | + | Equations for Transfers: |
- | | + | * //AnimalBirth[Rabbits]=Animals·a// |
- | </tr> | + | |
- | <tr> | + | |
- | | + | |
- | | + | |
- | | + | **Initial Conditions** for compartment: |
- | </tr> | + | |
- | <tr> | + | |
- | < | + | |
- | | + | Values for parameter Initial population: |
- | | + | |
- | </tr> | + | * // |
- | </table> | + | |
- | </HTML> | + | |
+ | ====Option 2==== | ||
+ | Create only one compartment with name Animals. Create parameters | ||
+ | |||
+ | {{rabbitfoxmodel4.png}} | ||
+ | |||
+ | **Initial Conditions** for compartment: | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | **dy/dt** for compartment: | ||
+ | * Rabbits: // | ||
+ | * Foxes: // | ||
- | //'' | ||
Line 30: | Line 42: | ||
**Solution to the excersise** | **Solution to the excersise** | ||
- | + | * {{lotka-volterra.eco}} | |
- | * {{tutorial: | + | * old one {{tutorial: |