# _tacoma.EdgeActivityModel¶

class _tacoma.EdgeActivityModel

Base class for the simulation of a simple edge activity model. Pass this to tacoma.api.gillespie_epidemics() or tacoma.api.markov_epidemics().

__init__(self: _tacoma.EdgeActivityModel, N: int, rho: float, omega: float, t0: float=0.0, use_rejection_sampling_of_non_neighbor: bool=True, save_temporal_network: bool=False, seed: int=0, verbose: bool=False) → None
Parameters: N (int) – Number of nodes in the temporal network. rho (float) – Demanded network density. omega (float) – rate with which edges are switched on and off, respectively, $$\omega^{-1}=(\omega^-)^{-1} + (\omega^+)^{-1}$$. t0 (float, default = 0.0) – initial time use_rejection_sampling_of_non_neighbor (bool, default: True) – If this is True, the edges to be turned on are sampled by drawing random edges until one is found which is turned off. If False, there’s a more sophisticated but probably slower method (use this option for dense networks). save_temporal_network (bool, default: False) – If this is True, the changes are saved in an instance of _tacoma.edge_changes() (in the attribute edge_changes. seed (int, default = 0) – Seed for RNG initialization. If this is 0, the seed will be initialized randomly. However, the generator will be rewritten in tacoma.api.gillespie_SIS_EdgeActivityModel() anyway. verbose (bool, default = False) – Be talkative.

Methods

__init__(self, N, rho, omega, t0, …)
param N: Number of nodes in the temporal network.
get_current_edgelist(self) Get an edge list of the current network state.
set_initial_configuration(self, arg0, arg1) Reset the state of the network to a certain graph (list of set of int)
set_initial_edgelist(self, arg0, arg1, int]]) Reset the state of the network to a certain edgelist (list of tuple of int)

Attributes

 N Number of nodes. edge_changes An instance of _tacoma.edge_changes with the saved temporal network (only if save_temporal_network is True).