Table Of Contents

Previous topic

Python SIJR model

Next topic

API reference

This Page

Scripted SIJR model

The SIJR model is non-standard, and further explained in the Tutorial. Briefly it defines an extra super-infectious stage to the SIR model whereby any node in the J-state in addition to acting as a normal infecting node also creates a mean field over the whole population, ignoring network structure, and influencing the probability of infecting all susceptible nodes.

SIJR process definition

[NodeAttributes]
state = S,I,J,R

[NodeRules]
{state:S} -> {state:I} = (NN({state:I}) + NN({state:J})) * beta + MF({state:J})
{state:I} -> {state:R} = gamma
{state:J} -> {state:R} = gamma
{state:I} -> {state:J} = alpha


[MeanFieldStates]
{}

SIJR simulation configuration

 
# This is the simulation section.
[Simulation]
# Run the simulation this many iterations.
iterations = 500

# The time step taken each iteration.
dt = .1

# This is the name of the process object.
process_class = ScriptedProcess

# This is the name of the network generation function.
network_func = BA_networkx

# Network settings.
[NetworkParameters]
# Number of nodes.
n = 1000
# Number of edges to add in each iteration.
m = 2

# Defining the process parameter values.
# The contents of this section is dependent on
# the parameters of the process class as specified by
# the option process_class in the Simulation section.

[ProcessParameters]
file = SIJR_scripted_pdef.ini
# Infection rate.
beta = .9e-2
# Recovery rate
gamma = 0.04
# Rate of a node to become a super spreader.
alpha = 0.007

# The fraction of nodes, alternatively the number of nodes, that will be  assigned to each state initially.
# The state names must match those specified by the network process class.
[NodeStateDistribution]
# 95% S
{state:S} = 0.95
# 5% I
{state:I} = 0.05
{state:R} = 0
{state:J} = 0
# Result output settings.
[Output]

# Output directory:
output_dir = ../output/

# This is the base name of all files generated by the run.
base_name = test_SIRJ

# If unique is defined as true, yes, 1, or on, unique file names will be created (time stamp added)
unique = yes

# If this is true, yes, 1, or on, a copy of the full program config, plus an Info
# section will be saved.
save_config = yes

# If this is true/yes/on, the network node states will be counted and saved as a csv file.
# Default value True.
# Note only valid if the current process support updates. If not nothing will be saved.
save_state_count = yes
 
# Count nodes every ... iterations. Value should be integer >= 1.
# Default value 1.
save_state_count_interval = 1

# If this is true, yes, 1, or on, a copy of the network will be saved.
# Save interval may be set using the save_network_interval key.
save_network = yes

# This control how often the network will be saved.
# A value <= 0 means only the initial network will be saved. A positive value
# n> 0, results in the initial network being saved plus every n:th iteration
# thereafter, as well as the last network.
# Default value 0.
save_network_interval = 0