Published October 16, 2024 | Version v1
Software Open

SIR Agent-Based Model Without Demographics in the NetLogo Environment

  • 1. Riga Technical University

Description

The SIR agent-based (ABM) model is developed as a control example for validating the results of the classical SIR model published on Wikipedia [1]. The SIR model presented on Wikipedia is based on an ordinary differential equations (ODE) system. The SIR ABM model can replace the SIR ODE model, providing additional capabilities for infection cluster analysis and compartments density evaluation.

Initial conditions: Susceptible compartment S(0) = 997, Infectious compartment I(0) = 3, Recovered compartment R(0) = 0. The population size N(0)=S(0)+I(0)+R(0), and N(t)=N(0). Infection probability (beta) = 0.4, recovery probability (alpha) = 0.04. The simulation runs for 100 time units and more, with a time step of 1 unit. The changes among compartments S(t), I(t), and R(t) are plotted over time.

The Setup ensures that the I(0) agents are randomly placed at different locations on a grid. Each agent has 4 possible connections (up, down, left, right). If a susceptible agent has an infected agent as a neighbour, it can become infected with a probability of beta. At any time step t, any infected agent can recover with a probability of alpha.

Since N(t) does not completely fill the grid, additional computational errors arise, caused by gaps in the grid and the placement of agents at the grid's edges. The accumulated errors do not have a significant impact on the simulation results. The model is implemented using NetLogo 6.3.0.

Files

Files (13.8 kB)

Name Size Download all
md5:b361a40fc7d77e6130d182c246e2b5aa
13.8 kB Download

Additional details

Software

Programming language
NetLogo

References