Skip to content
Yvan Guifo edited this page Apr 20, 2022 · 39 revisions

Kendrick is a Domain-Specific Language and Simulation Plaform for mathematical epidemiology modeling. The documentation herein will provide all the information necessary to understand how to use Kendrick in order to build, use and analyze epidemiological models. Kendrick is named following the person who has successfully used compartmental model in modelling the propagation of infectious diseases.

Kendrick is specifically an embedded language inside the host language Smalltalk (more precisely an open-source implementation of Smalltalk known as Pharo). In fact, Kendrick is developed by using a set of available tools of Pharo such as: PetitParser, Roassal, Scismalltalk, STON. Such tools help to build the own parser of Kendrick and to visualise the simulation results.

In order to facilitate the usages of domain experts in epidemiological modelling without programming, the textual DSL Kendrick allows to easily specify a compartmental model of epidemics and to simulate it through deterministic, stochastic or individual-based formalisms. The example below defines a measles model (a SEIR model) with Kendrick language. The model is then run with a deterministic simulator (using RungeKutta 4th method). The script following is used in the version 0.42 of Kendrick

KModel SEIR
	attribute: #(status -> S E I R);
	parameters: #(beta gamma mu sigma); 
	equations: #(
	   S:t=mu*N - beta*S*I - mu*S.
           E:t=beta*S*I - sigma*E - mu*E.
           I:t=sigma*E - gamma*I - mu*I.
           R:t=gamma*I - mu*R.
	).

Composition Measles
        model: 'SEIR'.

Scenario MeaslesParams
        on: 'Measles';
       
	S: 99999;
	I: 1;
	beta: 0.0000214;
	gamma: 0.143;
	mu: 0.0000351;
	sigma: 0.125.	
		
Simulation MeaslesRKSim rungeKutta
	scenarios: #(MeaslesParams);
	from: 0.0; 
	to: 150; 
	step: 1.
	
Visualization MeaslesDiagramViz diagram 
	for: 'MeaslesRKSim';
	xLabel: 'Time';
        open.

Custom sidebar of the Kendrick Wiki

Basic-SIR

SIR---Metapopulation

Clone this wiki locally