Skip to content

Ebola SEI1I2RD

Ebola SEI(R)I(D)RD model with separate infectious strata for recovering and dying cases, used to estimate importation risk

EbolaSEI1I2RDModel(config)

Bases: Model

Ebola SEI1I2RD importation-risk model (DRC -> EU/EEA).

Faithful translation of the deterministic ODE core of the source Monte-Carlo model. Exposed individuals progress to one of two infectious strata: those who will recover (IR) and those who will die (ID), with the branching governed by the case-fatality probability p_death:

dS  = -beta * S * (IR+ID) / N
dE  =  beta * S * (IR+ID) / N - sigma * E
dIR =  (1-p_death) * sigma * E - gamma * IR
dID =  p_death * sigma * E - mu * ID
dR  =  gamma * IR
dD  =  mu * ID

The Monte-Carlo parameter sampling and eigenvalue-based initial-condition seeding from the source are not reproduced here (the framework supplies initial state and uncertainty handling). The S->E infection edge and the IR->R / ID->D recovery/death edges are standard schema edges; the branching E->IR / E->ID flows are applied manually because they share sigma and split on p_death.

Source code in compartment/models/ebola_importation_model/model.py
def __init__(self, config):
    super().__init__(config)
    # Native-unit parameters; access defensively with source-mean fallbacks.
    self.incubation_period = getattr(self, "incubation_period", 10.0)
    self.p_death = getattr(self, "p_death", 0.43)

get_initial_population(admin_zones, compartment_list, **kwargs) classmethod

Seed each zone's infected percentage into IR/ID split by p_death.

The framework default seeds a compartment literally named "I", which this model does not have. The initial infectious are divided between the recovering (IR) and dying (ID) strata using the case-fatality probability's schema default (0.43), matching the model's E-outflow branching.

Source code in compartment/models/ebola_importation_model/model.py
@classmethod
def get_initial_population(cls, admin_zones, compartment_list, **kwargs):
    """Seed each zone's infected percentage into IR/ID split by p_death.

    The framework default seeds a compartment literally named "I", which
    this model does not have. The initial infectious are divided between
    the recovering (IR) and dying (ID) strata using the case-fatality
    probability's schema default (0.43), matching the model's E-outflow
    branching.
    """
    import numpy as onp

    p_death = 0.43  # schema default for p_death
    col = {v: i for i, v in enumerate(compartment_list)}
    pop = onp.zeros((len(admin_zones), len(compartment_list)))
    for z, zone in enumerate(admin_zones):
        N = float(zone["population"])
        inf_pct = max(float(zone.get("infected_population", 0.0) or 0.0), 0.0)
        infected = N * inf_pct / 100.0
        pop[z, col["S"]] = max(N - infected, 0.0)
        pop[z, col["IR"]] = infected * (1.0 - p_death)
        pop[z, col["ID"]] = infected * p_death
    return pop