kendrick icon indicating copy to clipboard operation
kendrick copied to clipboard

Parameters/compartments initializations with sexpr

Open SergeStinckwich opened this issue 3 years ago • 0 comments

Parameters and compartments should be initialized with sexpr (https://en.wikipedia.org/wiki/S-expression). In order to illustrate, that, we take the example of a population splitted in 4 status: S, E, I, R. There is 2 species: humans, birds.

rho: 1.0

initialize rho with the same value regarding the species. If you have rho that is homogeneous:

rho_species: #(1.0 1.0)

If we splitted the compartments in 5 zones: 1, 2, 3, 4, and 5.

rho_zone: #(0.03 0.1 0.1 0.1 0.1)

initialize all the zone with the same value for the same species.

or equivalent:

rho_species_zone: #((0.03 0.1)(0.03 0.1)(0.03 0.1)(0.03 0.1)(0.03 0.1))

If you want to have homogeneity for some rho in some zone:

rho_species_zone: #((0.03 0.1) 0.3 (0.03 0.1)(0.03 0.1) 0.2)

If you want to initialize rho values only in zone 1

rho_species_1: #(0.03 0.1)

If we want to setup rho values in the compartment humans, subcompartment 1:

rho_humans_1: 0.1

We can also inverse species and zone:

rho_zone_species: #((0.03 0.3 0.03 0.03 0.2) (0.1 0.3 0.1 0.1 0.2))

The same can be done for compartments initialization:

S_humans: 2500
S_birds: 25000

is equivalent to:

S_species: #(2500 25000)

A population compartment representing the entire population can be used:

population: 1000

is equivalent to:

population: #(1000 1000 1000 1000)

if the population is splitted in S, E, I and R.

population_S: 1000

is equivalent to

S: 1000

SergeStinckwich avatar Nov 23 '20 03:11 SergeStinckwich