cv19gm.models package

Submodules

cv19gm.models.RBM_seir module

cv19gm.models.seir module

SEIR Model

class cv19gm.models.seir.SEIR(config=None, verbose=False, **kwargs)[source]

Bases: object

SEIR model object: Construction:

SEIR(self, config = None)

analytics()[source]

Perform simulation analytics after running it. It calculates peaks, prevalence, and will include R(t).

df_build()[source]

Builds a dataframe with the simulation results

integrate(t0=0, T=None, h=0.01, method='LSODA')[source]
run(t0=0, T=None, h=0.01, method='LSODA')[source]

_summary_

Parameters:
  • t0 (int, optional) – _description_. Defaults to 0.

  • T (_type_, optional) – _description_. Defaults to None.

  • h (float, optional) – _description_. Defaults to 0.01.

  • method (str, optional) – _description_. Defaults to ‘LSODA’.

set_equations()[source]

Sets Diferential Equations

set_initial_values()[source]
solve(t0=0, T=None, h=0.01, method='LSODA')[source]

Solves ODEs using scipy.integrate :param t0: Initial time. Defaults to 0. :type t0: int, optional :param T: Endtime. Defaults to time given when building the object :type T: [type], optional :param h: Time step. Defaults to 0.01. :type h: float, optional

solver_equations(t, y)[source]

cv19gm.models.seir_meta module

SEIR Meta-populations Model

class cv19gm.models.seir_meta.SEIRMETA(config=None, verbose=False, Phi=None, Phi_T=None, seed=None, method=0, **kwargs)[source]

Bases: object


SEIRMETA model object: Construction:

SEIRMETA(self, config = None)

global_results_build()[source]

Agregated results data frame

params_df_build()[source]

Builds a dataframe with the simulation parameters over time

results_build()[source]

Params shouldn’t be int! Builds a dataframe with the simulation results and parameters Output structure: ‘t’,’S’,’E’,’E_d’,’I’,’I_d’,’R’,’R_d’,’beta’,’tE_I’,’tI_R’,’rR_S’,’node’

0, … 1, …

run(t0=0, T=None, h=0.01)[source]
set_equations()[source]

Sets Diferential Equations

set_initial_values()[source]
solve(t0=0, T=None, h=0.01, method='LSODA')[source]

Solves ODEs using scipy.integrate :param t0: Initial time. Defaults to 0. :type t0: int, optional :param T: Endtime. Defaults to time given when building the object :type T: [type], optional :param h: Time step. Defaults to 0.01. :type h: float, optional

solver_equations(t, y)[source]

cv19gm.models.seir_nb module

cv19gm.models.seirhvd module

SEIRHVD Model TODO: Stop vaccinating when there’s no people left to vaccinate (or raise an error) TODO: Improve underreport calculation

class cv19gm.models.seirhvd.SEIRHVD(config=None, verbose=False, **kwargs)[source]

Bases: object

SEIRHVD model object: Construction:

SEIRHVD(self, config = None)

analytics()[source]
df_build()[source]
run(t0=0, T=None, h=0.01, method='LSODA')[source]
set_equations()[source]

# ————————— # # Diferential Ecuations # # ————————— # Variables: S: Susceptibles Sv: Vaccinated Susceptibles E: Exposed I_m: Asymptomatic + mild + severe infected I_cr: Critical Infected I_v Vaccinated Infected Phi: Integrated external flux S_f: Susceptible external Flux

set_initial_values()[source]
solve(t0=0, T=None, h=0.01, method='LSODA')[source]
solver_equations(t, y)[source]
underreport()[source]

Calculates the detected cases using the underreport factor

cv19gm.models.seirtq module

SEIRTQ Model

class cv19gm.models.seirtq.SEIRTQ(config=None, verbose=False, **kwargs)[source]

Bases: object

SEIRTQ model object: Construction:

SEIRTQ(self, config = None)

analytics()[source]

Perform simulation analytics after running it. It calculates peaks, prevalence, and will include R(t).

df_build()[source]

Builds a dataframe with the simulation results

model_equations(t, y)[source]
run(t0=0, T=None, h=0.01)[source]
set_equations()[source]

Sets Diferential Equations

set_initial_values()[source]
solve(t0=0, T=None, h=0.01, method='LSODA')[source]

Solves ODEs using scipy.integrate :param t0: Initial time. Defaults to 0. :type t0: int, optional :param T: Endtime. Defaults to time given when building the object :type T: [type], optional :param h: Time step. Defaults to 0.01. :type h: float, optional

cv19gm.models.seirtqm module

cv19gm.models.sir module

SIR Model

class cv19gm.models.sir.SIR(config=None, verbose=False, **kwargs)[source]

Bases: object

SIR model object: Construction:

SIR(self, config = None)

analytics()[source]

Perform simulation analytics after running it. It calculates peaks, prevalence, and will include R(t).

df_build()[source]

Builds a dataframe with the simulation results

run(t0=0, T=None, h=0.01, method='LSODA')[source]
set_equations()[source]

Sets Diferential Equations

set_initial_values()[source]
solve(t0=0, T=None, h=0.01, method='LSODA')[source]

Solves ODEs using scipy.integrate :param t0: Initial time. Defaults to 0. :type t0: int, optional :param T: Endtime. Defaults to time given when building the object :type T: [type], optional :param h: Time step. Defaults to 0.01. :type h: float, optional

solver_equations(t, y)[source]

Module contents