Skip to main content
Advertisement

< Back to Article

Fast and exact stochastic simulations of epidemics on static and temporal networks

Fig 2

Epidemics on temporal networks.

Illustration of the temporal simulation algorithm. A link from node i to node j appears and disappears after node i has been infected at time Ti. Upon appearing at time t1, the link is “activated”, i.e., a time between infection and transmission is drawn from . Here, the condition ensures that the time lies in the future, i.e. after t1. However, before the simulation reaches time , the link disappears, , causing the algorithm to mask the link. Since the link is still masked when transmission is attempted at time , the attempt is blocked. The link is then unmasked so that when it reappears at time t2, it is re-activated, i.e. a time until transmission (again conditioned to lie in the future, i.e. after t2) is drawn. Further disappearances and reappearances of the link before time then do not cause further activations but merely change the state of the link. Once the simulation reaches time , the disease is then transmitted to node j since the link happens to be unmasked at that time. See S1 Algorithms for a detailed description of the algorithm.

Fig 2

doi: https://doi.org/10.1371/journal.pcbi.1013490.g002