-
Notifications
You must be signed in to change notification settings - Fork 14
Home
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, which is integrated in the platform Pharo/Moose – an open source platform for software development and data analysis. In fact, Kendrick is developed by using a set of available tools of Moose such as: PetitParser, Graph-ET. 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:
model := KEModel new.
model atCompartment: #S putNumberOfIndividuals: 1e5 - 1.
model atCompartment: #I putNumberOfIndividuals: 1.
model atCompartment: #R putNumberOfIndividuals: 0.
model atParameter: #beta put: 0.0052.
model atParameter: #gamma put: 365 / 7.
model addEquation: (PPODEParser parse: 'S:t=-beta*S*I').
model addEquation: (PPODEParser parse: 'I:t=beta*S*I-gamma*I').
model addEquation: (PPODEParser parse: 'R:t=gamma*I').
model runDeterministSimulationFrom: 0.0 to: 1.0 withStep: 0.0001.
model plot: { #S . #I . #R }