-
Notifications
You must be signed in to change notification settings - Fork 14
Example 2: Multi species model
Bui Thi Mai Anh edited this page Apr 23, 2021
·
19 revisions
The SIR model with demography of a mosquito-borne disease with three host species: the primary host (mosquito) and two unspecified species, reservoir1, reservoir2. The population is partitioned using two attributes: status and species leading to 3x3 compartments. The system of ODEs representing this model is:
In this script, we define directly the transitions of the model. There are 6 transitions.
KendrickModel SIR
attribute: #(status -> S I R);
parameters: #(beta lambda gamma mu);
lambda: #(beta*I);
transitions: #(
S -- lambda --> I.
I -- gamma --> R.
status -- mu --> Empty.
Empty -- mu --> S.
).
KendrickModel Species
attribute: #(species -> mosquito reservoir1 reservoir2).
Composition Mosquito
model: 'SIR';
model: 'Species'.
Scenario MosquitoPopulation
on: 'Mosquito';
S_species: #(9999 1000 2000);
I_species: #(1 0 0).
Scenario MosquitoParameters
on: 'Mosquito';
gamma: 52;
mu_species: #(12.17 0.05 0.05);
beta_species: #(
#(0 0.02 0.02)
#(0.02 0 0)
#(0.02 0 0)
).
Simulation MosquitoGillepsie gillespie
scenarios: #(MosquitoPopulation MosquitoParameters);
from: 0.0;
to: 0.5;
step: 0.0027.
Visualization MosquitoDiagramViz diagram
for: 'MosquitoGillepsie';
data: #(I sqrt);
xLabel: 'Time (days)';
exportToPng.