Population Model - quasylab/sibilla GitHub Wiki

Sibilla provides a module that simplifies the specification of population models.

A Population Model consists of a set of agents belonging to a given set of species. A system evolves by means of reaction rules describing how the number of elements of the different species changes. Rules are applied with a rate, which is a positive real value, that depends on the number of agents in the different species. The stochastic process associated with a PM specification is a Continuous Time Markov Chain. Those models have been widely used to model different kinds of systems in different application domains ranging from ecology and epidemics to cyber-physical systems.

Each Population Model consists of a sequence of elements declaring:

Parameters

Parameters are real values that can be changed even after the model has been loaded. In the SEIR model, we have:

param lambdaMeet = 10.0;      /* Meeting rate */
param lambdaExposure = 1.00;  /* rate of Exposure */
param lambdaInfection = 2.00; /* rate of Infection */
param lambdaRecovery = 0.5;   /* rate of recovery */

where lambdaMeet is the meeting rate, lambdaExposure is the rate of exposure to the illness, lambdaInfection is the rate of getting the infection, and lambdaRecovery is the rate of recovery from the illness.

Constants

Constants are used to associate specific values to names, and can not be changed when the model is loaded. In our example, for instance, we use startS and startI to indicate the initial number of agents susceptible and infected (99 and 1, respectively).

Species

In the SEIR model, we identify four species: S (Susceptibles), E (Exposed), I (Infected), and R (Recovered). Here, we just need to declare the species with the proper keyword and the name of it. Species will be initialised later.

Rules

Rules are used to describe the dynamics of the system. The simplest form we can declare a rule is described as follows:

rule <rulename> {
    <species>(|<species>)* -[ <exp> ]-> <species>(|<species>)*
}

where <rulename> is the name to identify the rule, <species> refers to one of the species previously declared, and <expr> is the expression used to compute the rule rate.

The expression rates are built by using standard mathematical operators (the full list is available in the corresponding grammar file) and two special characters: %X and #X. The first one is used to return the fraction of agents of species X, while the second symbol is to declare the number of agents of species X. In the infection rule, we can see these symbols used:

rule infection {
    S|I -[ #S*%I*lambdaMeet*probInfection ]-> I|I
}

System

System initialisation declarations are described in the following form:

system <name> = <species>(|<species>)*;

When multiple individuals of the same species X are in the system, the form X<n> can be used, where n is a numerical value.

In the example, the susceptibles S start with 99 individuals, using S <startS>, while we have one infected I is just one individual, with I <startI>.


Examples

In this section, we can find different examples that show how Population Model specifications work.

The available case studies are:

  • SEIR: a model based on infections and transmission.
  • Repressilator: a network of three genes that repress between each other.
  • Predator-Prey: a scenario where prey have to run away from predators.

SEIR

We consider a classical epidemic example: the SEIR Model. The goal of the model is to represent the spread of an infectious disease. The model consists of four species (or compartments).

The species S stands for susceptible, E for exposed, I for infected and finally R for recovered.

In this model, a susceptible individual, when it meets an infected one, becomes exposed. Then it will become infected and at the end, after a certain rate, will recover from the illness.

The example is available at the following link

Repressilator

A Repressilator is a structure, artificial or natural, that regulates itself through a feedback loop with at least three genes. Each gene is tasked to repress one of the others, in a "rock-paper-scissors" mechanism.

The model has been initially described in "A synthetic oscillatory network of transcriptional regulators".

In our specification, six species are declared: three are different mRNA segments, while the other three are the proteins produced by each segment. To better represent transitions, a specific species, named "VOID", is used to define the rules related to degradation, translations and transcription of mRNA segments and proteins.

The example is available at the following link.

Predator-Prey

Typical predator-prey behaviour considers death and birth of both of the species, like Lotka-Volterra one. Our model focuses on the movement inside a grid of both.

In the considered model we have two kinds of populations: wolves (W) and sheep (S). Each of these elements is indexed with its position in the grid.

In the model, we have two kinds of rules: the first modelling agent movements, the latter describing their interaction (a wolf eats a sheep).

The rules for the movement describe the fact that sheep will try to go into less dangerous cells, which are the ones with a smaller number of wolves, while wolves will tend to move to cells with a larger number of sheep.

The example is available at the following link.

⚠️ **GitHub.com Fallback** ⚠️