class _tacoma.QS_SIS

Base class for the simulation of an quasi-stationary SIS compartmental infection model on a temporal network. Pass this to tacoma.api.quasistationary_simulation() to simulate and retrieve the simulation results.

__init__(self: _tacoma.QS_SIS, N: int, t_simulation: float, infection_rate: float, recovery_rate: float, N_QS_samples: int, sampling_rate: float, number_of_initially_infected: int = 1, number_of_initially_vaccinated: int = 0, sample_network_state: bool = True, seed: int = 0, verbose: bool = False) → None
  • N (int) – Number of nodes in the temporal network.
  • t_simulation (float) – Maximum time for the simulation to run. Can possibly be greater than the maximum time of the temporal network in which case the temporal network is looped.
  • infection_rate (float) – Infection rate per \(SI\)-link (expected number of reaction events \(SI\rightarrow II\) for a single \(SI\)-link per dimension of time).
  • recovery_rate (float) – Recovery rate per infected (expected number of reaction events \(I\rightarrow S\) for a single infected node per dimension of time).
  • N_QS_samples (int) – Number of quasi-stationary configuration samples to be saved during the simulation.
  • sampling_rate (float) – Rate with which to sample for the quasi-stationary configuration collection.
  • number_of_initially_infected (int, default = 1) – Number of nodes which will be in the infected compartment at \(t = t_0\). Note that the default value 1 is not an ideal initial value as fluctuations may lead to a quick end of the simulation skewing the outcome. I generally recommend to use a number of the order of \(N/2\).
  • number_of_initially_vaccinated (int, default = 0) – Number of nodes which will be in the recovered compartment at \(t = t_0\).
  • sample_network_state (bool, default = True) – Do not only sample the node stati but also the current network structure.
  • seed (int, default = 0) – Seed for RNG initialization. If this is 0, the seed will be initialized randomly.
  • verbose (bool, default = False) – Be talkative.


__init__(self, N, t_simulation, …)
param N:Number of nodes in the temporal network.
ended_in_absorbing_state(self) Return whether or not the simulation ended in an absorbing state.
get_infection_observables(self) Returns \(\left\langle I \right\rangle\) and
get_random_configuration(self) Get a random configuration from the quasi-stationary
set_initial_configuration(self, arg0, arg1) Set a time and node statii.


configurations Sampled collection.
last_active_time The last time the model was active.
t_simulation .