Skip to content

Example 2: Multi species model

Bui Thi Mai Anh edited this page Apr 23, 2021 · 19 revisions

A mosquito-borne disease with three host species

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:

The system of ODEs of SI multi-species model

The SIR model with three species written in Kendrick language

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.

Stochastic dynamics of infectious individuals from three host species resulting from using Gillespie's direct method

Custom sidebar of the Kendrick Wiki

Basic-SIR

SIR---Metapopulation

Clone this wiki locally