https://github.com/benmaier/temporalgillespiealgorithm

C++ code for implementations of the temporal Gillespie algorithm.

https://github.com/benmaier/temporalgillespiealgorithm

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

C++ code for implementations of the temporal Gillespie algorithm.

Basic Info
  • Host: GitHub
  • Owner: benmaier
  • License: mit
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 102 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of CLVestergaard/TemporalGillespieAlgorithm
Created over 8 years ago · Last pushed over 8 years ago

https://github.com/benmaier/TemporalGillespieAlgorithm/blob/master/

# TemporalGillespieAlgorithm
C++ code for implementations of the temporal Gillespie algorithm for simulation of epidemic processes on time-varying networks. The algorithm is described in the paper: C.L. Vestergaard & M. Gnois. "Temporal Gillespie algorithm: Fast simulation of contagion processes on time-varying networks". PLoS Computational Biology (2015) 11, e1004579 (http://arxiv.org/abs/1504.01298).

_Important note: The C++ code only works with time-step dt set to 1. Temporal network data recorded with dt different from one, should be normalized such that dt->1 and beta and mu should be renormalized accordingly, i.e. beta->beta\*dt and mu->mu\*dt._

The programs need the boost library installed (http://www.boost.org/). 
Compile with the -O2 option for optimal speed, e.g., using g++ the code may be compiled as:

g++ "input name" -o "output name" -O2 -I"path of boost"

All programs simulate independent realizations of the given contagion process on a temporal network given on the form: (t i j) with one triple per line and t,i, and j separated by tabs. ("\t"). 

The programs found here are:
- SIR-Poisson-homogeneous.cpp : Constant-rate (Poissonian) SIR process in a homogeneous population (i.e., same infection/recovery rates for all nodes).
- SIR-Poisson-heterogeneous.cpp : Constant-rate (Poissonian) SIR process in a heterogeneous population (i.e., infection/recovery rates may differ between nodes).
- SIR-Poisson-homogeneous-contactRemoval.cpp : Constant-rate (Poissonian) SIR process in a homogeneous population where obsolete contacts are removed from the contact data as they occur.
- SIR-nonMarkovian.cpp : Non-Markovian SIR process with Weibull distributed (https://en.wikipedia.org/wiki/Weibull_distribution) recovery times of individual nodes.
- SIS-Poisson-homogeneous.cpp : Constant-rate (Poissonian) SIS process in a homogeneous population (i.e., same infection/recovery rates for all nodes).
- SIS-Poisson-heterogeneous.cpp : Constant-rate (Poissonian) SIS process in a heterogeneous population (i.e., infection/recovery rates may differ between nodes).

Sample data are found in:
- sampleData.txt : Activity-driven network consisting of 100 nodes simulated for 20,000 time-steps.

Empirical data of face-to-face interactions collected by the SocioPatterns collaboration can be found at:
- http://www.sociopatterns.org/datasets/

The Pseudo-Random Number Generator (Mersenne Twister 19937) is initialized with the following seed: 9071982. It can be changed inline. Note however that simulations performed with randomly chosen different seeds are not guaranteed to be (pseudo)independent.

Owner

  • Name: Benjamin F. Maier
  • Login: benmaier
  • Kind: user
  • Location: Copenhagen
  • Company: Technical University of Denmark

Postdoc @suneman 's, generative art, electronic music. DTU Compute & SODAS.

GitHub Events

Total
Last Year