Copyright: 2019, Gerrit Großmann, Group of Modeling and Simulation at Saarland University
Version: 0.1 (Please note that this is proof-of-concept code in a very early development stage.)
Official code for our paper Rejection-Based Simulation of Non-Markovian Agents on Complex Networks.
Install Julia following the instructions on https://julialang.org/downloads/platform.html. Install packages with
julia setup.jl
There is an off-the-shelf script (that also installs the required packages) to run the rejection- and baseline-code on all available graph-files:
python evaluation.py
Besides, you can run the Julia-code using:
julia sis_reject.jl 10 graph_10k_5p_Infected.txt sis_model_out.txt
where 10
is the time horizon and graph_10k_5p_Infected.txt
is the contact graph (including the initial labeling)
and sis_model_out.txt
is the name of the output file.
The corresponding rates and rate functions are part of the Julia code.
The network file contains containing a labeled graph specifying the initial state, each line having the form <Nodeid>;<Label>;<Neighbor1>,<Neighbor2>,...
0;I;31,29,94,13,83
1;S;66,15,73
2;S;29,61,26,80,16,83,30,62,3,93,27,87,68,18,79,6
3;I;83,2,29,4,28,61,46,21,9,49,41,68,16,74
4;S;82,28,12,83,3,62,66,68
...
Nodes start with id 0 and are sorted (rendering the first number somewhat redundant). Isolates (nodes withouth neighbors) are not supported (yet). There should be at least one node for each possible label.
.txt
file containing the trajectory.pdf
file with a visualization.txt
file with the runtime
TBA
TBA
TBA
TBA