# SIM-D: An Agent-Based Simulator for Modeling Contagion in Population
## 1 Introduction  
Infectious diseases such as COVID-19, flu influenza, malaria, dengue, measles, mumps, and Ebola, etc. are a big threat to public health safety and security [1, 2]. Every year, a new strain of epidemic diseases circulates around the globe and infects millions of people, resulting in thousands (and sometimes millions) of deaths. According to the 2019 report of the World Health Organization (WHO), the health systems across the world are weak and are not prepared for epidemic-like situations [3]. This means that the human lives across the globe are at an increased risk. This observation was validated by the recent wave of COVID-19, a pneumonia-like disease caused by the coronavirus. As of this writing, the disease has infected 40 million people and has killed over one million persons [4]. Every place and community was affected. The disease has spread to over 200 countries in a matter of two-four months [5]. The world is at a greater risk of epidemic spread, for several reasons. First, the world population is growing rapidly, which means that the number of people that can be infected is increasing. Second, many people are moving to cities for better life opportunities, thus increasing the populationdensities of the cities. This increases the number of human interactions and spreads the infection faster. Third, the increase in life expectancy means a larger portion of people are in old age. Old people are more vulnerable to infectious diseases, and their chances of developing complications are usually high. Finally, long-distance travel is getting easier, creating ground for the faster spread of disease to far-off countries. According to the WHO, most countries in the world are not prepared for large-scale epidemics [3]. The spread of COVID-19 has shown that countries were not able to effectively respond to the spread of disease [6]. Many countries applied lockdowns, but since the lockdown measures were not driven by intelligent disease modeling, their precise impact was not significant [7]. An important lesson learnt was that more planning is needed. The planning should be backed by a model that can predict the spread of the disease under different conditions. For better understanding, the models are expected to enable the study of several variables, such as disease dynamics and social interactions. Several models have been developed that study the spread of infectious disease in population. The models can be divided into two broad categories: deterministic and stochastic [8]. The deterministic epidemic models calculate the total numbers of infections using mathematical formulations. It is good at estimating the duration of epidemic, however it does not provide any day-to-day details of infections [9]. The stochastic epidemic models are more realistic and use realistic social-contact networks. The models provide the day-to-day details about the spread of disease at different locations [10]. Although the stochastic models do not capture every complex situation, they give more insights into the spread of disease compared to the deterministic models [11]. In this work, a stochastic simulation engine is developed that is capable of modeling the spread of disease in population. Input to the simulation is a person-to-person interaction graph. The network graph shows the daily interactions between agents (humans) in a population. Since the model is agent-based, the interactions are computed between all interacting agents. The simulation computes the probability of spread of infection between the interacting infectious and susceptible agents (using the duration of contact, disease dynamics and agent demographics). The simulation engine is generic and is applicable to all epidemic diseases that spreads through interactions. The model is probabilistic and supports different disease states (incubation, infectious and recovered). Using the duration of disease, the model can be applied to susceptible-infectious-recovered (SIR), susceptible-infectious-susceptible (SIS) and susceptible-infectious (SI) models.