Epidemics module

This module provides functions related to the simulation and measurement of epidemics.

class tacoma.epidemics.SIR_weighted(N, weighted_edge_tuples, infection_rate, recovery_rate, number_of_initially_infected)[source]

Bases: object

evaluate_rates()[source]
force_of_infection_on_node = []
infected = []
infection_event()[source]
node_status = []
rates
recovery_event()[source]
simulation(tmax)[source]
class tacoma.epidemics.SIS_weighted(N, weighted_edge_tuples, infection_rate, recovery_rate, number_of_initially_infected)[source]

Bases: object

evaluate_rates()[source]
force_of_infection_on_node = []
infected = []
infection_event()[source]
node_status = []
rates
recovery_event()[source]
simulation(tmax)[source]
tacoma.epidemics.get_SIS_critical_infection_rate(tn, recovery_rate, method='Powell', arpackmaxiter=10000, arpacktol=1e-09)[source]
tacoma.epidemics.get_SIS_critical_recovery_rate(tn, infection_rate, method='Powell', arpackmaxiter=10000, arpacktol=1e-09)[source]
tacoma.epidemics.get_SIS_max_eigenvalue(tn, infection_rate, recovery_rate, maxiter=10000, tol=1e-09)[source]
tacoma.epidemics.simulate_and_measure_i_inf(temporal_network_or_model, epidemic_object, t_equilibrate, is_static=False, verbose=False)[source]

Get the equilibrium ratio of infected.

Parameters:
Returns:

  • i_inf (float) – Temporal average over the ratio of infected after equilibration.
  • i_inf_std (float) – RMSE of the ratio of infected.
  • R0 (float) – As measured after equilibration

tacoma.epidemics.simulate_quasi_stationary_SIS_on_model(model, qs_sis, verbose=False)[source]
tacoma.epidemics.simulate_quasi_stationary_SIS_on_static_network(network, qs_sis, verbose=False)[source]