ModelSEIRMixingQuarantine#
- class epiworldpy.epimodels.ModelSEIRMixingQuarantine(self: epiworldpy._core.epimodels.ModelSEIRMixingQuarantine, vname: str, n: SupportsInt | SupportsIndex, prevalence: SupportsFloat | SupportsIndex, transmission_rate: SupportsFloat | SupportsIndex, avg_incubation_days: SupportsFloat | SupportsIndex, recovery_rate: SupportsFloat | SupportsIndex, contact_matrix: collections.abc.Sequence[SupportsFloat | SupportsIndex], hospitalization_rate: SupportsFloat | SupportsIndex, hospitalization_period: SupportsFloat | SupportsIndex, days_undetected: SupportsFloat | SupportsIndex, quarantine_period: SupportsInt | SupportsIndex, quarantine_willingness: SupportsFloat | SupportsIndex, isolation_willingness: SupportsFloat | SupportsIndex, isolation_period: SupportsInt | SupportsIndex, contact_tracing_success_rate: SupportsFloat | SupportsIndex = 1.0, contact_tracing_days_prior: SupportsInt | SupportsIndex = 4)#
Bases:
ModelSEIR model with mixing, quarantine, isolation, hospitalization, and contact tracing.
Infected agents are isolated once detected, and the agents they were in contact with are traced and quarantined.
States:
Susceptible,Exposed,Infected,Isolated,Quarantined Susceptible,Quarantined Exposed,Isolated Recovered,Hospitalized,Recovered.Agents are split into groups with
Entityobjects (add them withadd_entity()before running), and contacts between groups followcontact_matrix. The model creates itsnagents itself.Create a SEIR model with mixing and quarantine.
- Parameters:
vname (str) – Name of the virus.
n (int) – Number of agents.
prevalence (float) – Initial proportion of agents with the virus.
transmission_rate (float) – Probability of transmission per contact, between 0 and 1.
avg_incubation_days (float) – Average number of days in the exposed state; greater than 0.
recovery_rate (float) – Daily probability of recovery, between 0 and 1.
contact_matrix (list of float) – Flattened
G x Gmatrix, whereGis the number of entities; entry(i, j)is the expected number of daily contacts an agent in groupihas with agents in groupj, so the row sums are the expected contacts per day of each group. The matrix is stored by columns: flatten a NumPy array withm.flatten(order="F").hospitalization_rate (float) – Daily probability that an infected agent is hospitalized.
hospitalization_period (float) – Average number of days in the hospital.
days_undetected (float) – Average number of days an infection goes undetected.
quarantine_period (int) – Number of days in quarantine. A negative value turns quarantine off.
quarantine_willingness (float) – Proportion of agents willing to quarantine.
isolation_willingness (float) – Proportion of agents willing to isolate.
isolation_period (int) – Number of days in isolation. A negative value turns isolation off.
contact_tracing_success_rate (float, default 1.0) – Probability that a contact is traced.
contact_tracing_days_prior (int, default 4) – Number of days before detection during which contacts are traced.