EpiNetSim is an epidemiological network-based ABM toy model written in Julia.
After cloning this repository and navigating into the folder on your terminal, you can run the toy model with the following command:
julia src/main/julia/run_locally.jl
You can change the input variables in run_locally.jl as needed:
- seeds: number of times to run model.
- iterations: number of time steps (e.g. days) to simulate.
- base_susceptibilities: probability that a susceptible agent will be infected by an infectious agent given contact. Multiple values may be provided in array.
- recovery rate: probality an agent will switch from the disease state "Infectious" to the disease state "Recovered". For instance, a value of 0.2 means it will take an average of 5 days for an individual to recover.
- network_structures: network structure connecting agents, options include ["regular", "random", "smallworld", "smallworldreg", "preferential"]
- local_global_scenarios: the risk reduction stategy that agents will apply. Options include ["base","global","local1","local2","local1_and_2","global_local1","global_local1_and_2"]
- mean_degree: mean degree of network
- days_until_showing_symtoms: length of "Presymptomatic" state, in which agent can transmit disease but it is not detectable in the context of risk reduction strategies. If set to 0, "Presymptomatic" State is excluded.
- output_folder: custom folder name for storing output files. If missing, a folder will be generated with timestamp as name.
For large parameter combinations, it may make sense to run the toy model on a computing cluster. run_on_cluster.jl is one example of a run script for this purpose. On SLURM-based cluster, the following exemplary shell script can begin the simulation:
#!/bin/sh
#SBATCH -N 1
#SBATCH -t 01:30:00
module load julia
OUTPUT_FOLDER_NAME=sensitivity_rec_0.5
mkdir $OUTPUT_FOLDER_NAME
for prob in `seq 0.1 0.05 .3`; do
julia run_on_cluster.jl $prob 0 $OUTPUT_FOLDER_NAME &
julia run_on_cluster.jl $prob 1 $OUTPUT_FOLDER_NAME &
julia run_on_cluster.jl $prob 2 $OUTPUT_FOLDER_NAME &
done
wait