# Agent-Based Methods for Simulation of Epidemics with a Low Number of Infected Persons

Florian Miksch, Philipp Pichler, Kurt J. Espinosa, Niki Popper

► To cite this version:

Florian Miksch, Philipp Pichler, Kurt J. Espinosa, Niki Popper. Agent-Based Methods for Simulation of Epidemics with a Low Number of Infected Persons. 2nd Information and Communication Technology - EurAsia Conference (ICT-EurAsia), Apr 2014, Bali, Indonesia. pp.21-28, 10.1007/978-3-642-55032-4_2. hal-01397140

HAL Id: hal-01397140

https://inria.hal.science/hal-01397140

Submitted on 15 Nov 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Agent-based Methods for Simulation of Epidemics with a Low Number of Infected Persons

Florian Miksch<fnref n="1" />,<fnref n="3" />,*, Philipp Pichler<fnref n="2" />, Kurt J. Espinosa<fnref n="1" />, and Niki Popper<fnref n="3" />

**Abstract.** Modeling of infectious diseases with a low number of infections is a task that often arises since most real epidemics affect only a small fraction of the population. Agent-based methods simulate individuals and their behavior. When the model is simulated, the epidemic automatically arises without being explicitly defined. Surprisingly, it is not easy to produce such epidemics with small infection numbers. Instead, it needs model improvements to accomplish that task. In this paper, we show different extensions, addressing the person's behavior, the pathogen's behavior and the environmental impacts. It turns out that the discussed improvements have different consequences. Hence, they need to be used deliberately to overcome modeling issues of a specific epidemic in an appropriate and valid way. Even more, these improvements address the underlying behavior of epidemics and hence have the ability to provide a deeper insight into the real spreading process of a disease.

**Keywords:** Agent-based modeling, epidemic simulation, infectious disease modeling, infection numbers

## 1 Introduction

Most epidemics that occur on a regular basis only affect a small part of the population. Public perception might draw a different picture due to reports and warnings in media, even though the number of infected people is very low compared to the whole population. Influenza and Dengue serve as examples for such situations [1–3]. Simple epidemic models, however, tend to simulate epidemics with higher fractions of affected persons. Thus, they are not able to simulate some real epidemics accordingly and need improvement. Recent publications also deal with that issue [4, 5]. This publication is going to show different approaches and techniques for such model improvements as well as their impacts.

<footnote n="1">¹University of the Philippines Cebu, Department of Computer Science, Cebu City, Philippines
fmiksch.up@gmail.com, kpespinosa@up.edu.ph</footnote>

<footnote n="2">²Vienna University of Technology, Institute for Analysis and Scientific Computing, Vienna,
Austria</footnote>

<footnote>philipp.pichler@tuwien.ac.at</footnote>

<footnote n="3">³dwh Simulation Services, Vienna, Austria</footnote>

<footnote>niki.popper@dwh.at</footnote>
## 2 Underlying techniques

Ideas and approaches in this paper are based on a simple SIR epidemic. This model of a simplified epidemic has been introduced back in 1927 by Kermack and McKendrick [6]. Unlike them, thanks to available computational power today, we are going to compute SIR epidemics with agent-based models. This does not only provide higher modeling flexibility, it also allows clearer representation of produced effects and results.

### 2.1 Agent-based modeling

Agent-based modeling is a method that emerged in the 1990s. It tries to model the world as it is observed, based on individual entities, which are called agents. These agents exist within an in-silico environment; they have attributes and a behavior and also interact with each other [7–9]. For epidemics, this approach means to model single persons in their environment, give them the ability to be healthy or infected and assure that relevant contacts, which allow transferring the disease from infectious to susceptible persons, happen. Generally, it is important to incorporate all underlying causalities relevant for the spread of an infectious disease such as personal attributes, social behavior concerning contacts and aspects about the disease. Then, one can simulate the model and observe the propagation of the disease. Agent-based models do not directly provide results, instead statistical calculations on the simulated population are required. This needs more effort for evaluation but also leaves room for examining specific details. It should be clear that agent-based modeling is rather a general concept that provides freedom for the modeler but requires extended research [9].

### 2.2 SIR epidemics

An SIR epidemic describes the spread of a simplified disease, which can be used to represent a wide class of diseases. The idea is to simulate a disease that can infect susceptible people and after a while they recover and become resistant. Hence, people are in one of the three states susceptible (S), infected (I) and resistant (R) (Fig. 1). To keep it simple, their approach assumes a homogenous population where every infected person can transmit the disease to any susceptible person with a given probability. Typically, initially most people are susceptible and a few are infected, then more people get infected – this means that the epidemic gets stronger. After a while, more people become resistant and, due to the smaller number of susceptible people -so the epidemic gets weaker, until it finally becomes extinct. Kermack and McKendrick [6] used differential equations for simulation; however, we are going to use an agent-based modeling approach.
## 2.3 The agent-based SIR model

Following the simple SIR approach, we construct an agent-based model of n agents representing persons. The only attribute that persons have describes their disease state which can be susceptible (S), infected (I) or resistant (R). In each time step, random pairwise contacts are performed with an average of c contacts per person. This means that $\frac{2 \cdot \text{total number of contacts}}{\text{number of persons}} = c$. State changes happen for two reasons: First, a susceptible person becomes infected with probability $\alpha$ when they meet an infected person. Contacts are processed independently, which means that a person can get infected more than once. Computed infections always apply for the proceeding time step which grants the order of contacts of a time step is not important because persons cannot get infected and infect someone else in the same time step. And second, infected persons become resistant after being infected for r time steps. Hence, the resulting model contains four parameters: n, c, $\alpha$ and r.

<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Left: Disease state progression of an SIR epidemic. Right: Typical behavior of an SIR epidemic.</figcaption></figure>

# 3 Methods

## 3.1 The tasks

At first, the underlying SIR model will be analyzed and issues will be outlined. Then, strategies will be discussed that might help to overcome these issues. This includes methodological descriptions as well as general analyses of their impacts on simulations. Agent-based models do not allow analytic examinations and can only be simulated using concrete parameters. Thus, exemplarily, an epidemic will be simulated for each case. It should infect totally 5% of the population and has an average of 10 relevant contacts for transmission per person per day and a recovery time of 7 days. Additionally, the sensitivity of disturbances should be evaluated, represented by variation of the infection probability by ±5% (hence, it will be multiplied by 0.95 and 1.05).
## 3.2 The basic SIR model

Calibration leads to an infection probability of 0.015 so that the simulation results in an epidemic that totally infects 5% of the population. However, the system is extremely sensitive. Decreasing the infection probability causes the epidemic to become extinct while increase of 5% results in an epidemic that already infects 10% of the population. This makes it hard to parameterize and simulate such a system. Even more, it questions credibility and validity of the model unless the real epidemic reacts extremely sensitive to disturbances (Fig. 2).

<figure><img src="image_3.png" /><figcaption>Fig. 2. Results of the exemplary simulations showing the number of totally infected people during the whole epidemic.</figcaption></figure>

## 3.3 Natural immunity

The first attempt comes up with an explanation of the system behavior. It suggests that infections numbers are low because many people are resistant to the disease so they cannot get infected. These people can also be referred to as “naturally immune”. This assumption can be explained with a strong immune system of some people, with past vaccinations, with immunity from past infections, with cross-protection from immunity against other strains, or with other predisposition. The intention is representing an unknown, prior to simulation start existing immunity. Hence, it should not be mixed up with vaccinations which might be known explicitly or even tested.

Such behavior is documented for several diseases. For example, infections with influenza might cause resistance to further infections or even provide cross-protection against other strains [10–12]. Also for Dengue it has been shown that the DENV causing secondary disease is always of a different serotype than the virus that induced immune responses during the earlier DENV infection [13].

From a system's point of view, this means that the actual number of people at risk is significantly smaller than the whole population. In other words, a higher fraction of people at risk get infected than among the whole population. Hence, the spread of the expected epidemic is limited and the system is expected to be more stable due to disturbances.
The exemplary simulation assuming 75% naturally immune people among the population clearly confirms this expectation (Fig. 2).

## 3.4 Infections from external sources

The second attempt provides a different explanation why only a small number of people get infected. It proposes that the epidemic is generally weak, even too weak to survive. The reason why it does not become extinct is that people permanently get infected from an external source. This might be the case when the pathogen is found in the nature, in food, in garbage or in water. It is possible that animals carry the pathogen without getting sick and are able to transmit it to humans.

For example, lower primates infected with dengue viruses develop viremias of a magnitude sufficient to infect mosquitoes and mount an immune response but do not develop any detectable clinical signs [14]. Hence, via vectors they serve as an external source of transmissions for persons.

In the model, additionally to the regular transmissions from person to person upon contacts, every susceptible person can get infected from an external source with a given probability per time unit. Technically, this idea allows, at least to a certain extent, arbitrary steering of infections which makes it easier to reach a specific infection number. Hence, this approach should also lead to a system which is more stable due to disturbances. For the exemplary simulation, both infection probabilities are adjusted in a way so that half of all infections are from an external source. However, this epidemic would not end automatically since it only should affect a small part of the population, hence simulation time is strictly limited to the duration of the epidemic in the underlying SIR model. For simulation of disturbances, both infection probabilities are varied by 5%. Results show that this approach is extremely stabilizing and not prone to small disturbances (Fig. 2).

## 3.5 Unknown infections

The third attempt suggests that unknown infections exist. This can be explained by asymptomatic infections, which means that people get infected and spread the pathogen but do not experience any symptoms. However, the modeler might also consider that people are sick but their cases are just not reported.

For example, estimates on the fraction of reported influenza cases, hospitalization rates or case fatalities are subject to uncertainty [15, 16]. Asymptomatic infections might also happen for influenza [17, 18]. For streptococcus pneumoniae, reported colonization rates differ a lot among studies [19]. And for dengue, primary infections are often mild or even inapparent [20, 21] so that modelers assume asymptomatic infections by “unnatural infection routes” [5].

In both situations, asymptomatic and unreported cases, the model needs to simulate higher infection numbers than originally proposed and distinguish between reported and unreported cases. This should lead to easier model handling and higher stability due to disturbances. The exemplary simulation assumes that 75% of the infections are unknown. Results clearly meet the expectations (Fig. 2).
## 3.6 Time-dependent impacts

The fourth and last presented attempt suggests that the epidemic is generally too weak to survive. But, due to external conditions, the risk of transmissions increases for a limited time. This is a possible explanation why an epidemic sometimes stops even though it did not affect large parts of the population yet. Such behavior might occur due to specific weather conditions like coldness or rain, due to events or media hypes that change the behavior of the people or due to contaminated food or water. However, this approach provides great freedom and needs to be handled with care since it does not specify how long these conditions exist, whether they are recurring or only single events, and to what extent they change the risk of transmissions. Also, it requires a justification why the pathogen does not become completely extinct already before the external conditions become true.

Seasonal epidemics caused by external conditions apply for several diseases. For example, influenza epidemics usually happen during winter time and stop by the beginning of spring [22, 23] and dengue epidemics reach their peak during rainy season [24].

In the model, this attempt is realized by a time-dependent infection probability. For the exemplary simulation, the infection probability is doubled from simulation start to the time when the underlying SIR model reaches the peak of infections. Results show that the model still reacts extremely sensitive to small disturbances (Fig. 2). However, since this approach has reasonable real interpretations it might be combined with other approaches for valid results.

## 4 Results

A simple SIR model has problems simulating epidemics with low infection numbers because it is so simple that the epidemic would not stop as long as there are enough susceptible people in the population. The presented model extensions have the ability to improve the quality of simulations and results and hence help to overcome these issues to some extent. If the fraction of unknown infections, infections from external sources or natural immunity is increased, then the result represented by the total number of infected people, reacts less sensitive to variations of the infection probability. However, implementation of time-dependent infection probability even increased the sensitivity of the infection probability in our case.

## 5 Discussion

The underlying issue is an unrealistic model behavior, hence solutions are motivated by real epidemiological mechanisms. Three of the four presented techniques clearly improve the model behavior while one fails in our test scenario. Still, one needs to be aware that the fourth method is extremely flexible so there might be different ways of applications that lead to different model behavior.
Even though the three successful methods significantly change the model behavior
in a desired way, one has to justify that performed changes are valid [25, 26]. This
means that the added structures must have meaningful interpretations which need to
agree with knowledge on the real system. If this information on the real system is
lacking, then the model can still be justified using inductive reasoning: The model
behavior and the results agree with knowledge on the real system. Therefore, the up-
dated model structure is likely to be correct and hence valid. In the context of induc-
tive reasoning, the model structure might be used to obtain knowledge by having
ideas how the real system might work.

In some situations it can be useful to combine two or more approaches to get even better results. For example, a part of the population might be naturally immune while others experience asymptomatic infections. Then, only checking for validity is not sufficient, it also requires specific testing on a technical level to understand the impact of the added structures.

6 References

1. Thompson, W.W., Comanor, L., Shay, D.K.: Epidemiology of Seasonal Influenza: Use of Surveillance Data and Statistical Models to Estimate the Burden of Disease. J. Infect. Dis. 194, S82–S91 (2006).

2. Emerging Disease Surveillance and Response Team, Division of Health Security and Emergencies, World Health Organization Regional Office for the Western Pacific, Arima, Y., Edelstein, Z.R., Hwi Kwang, H., Matsui, T.: Epidemiologic update on the dengue situation in the Western Pacific Region, 2011. West. Pac. Surveill. Response J. 4, 51–58 (2013).

3. Viboud, C., Boëlle, P.-Y., Pakdaman, K., Carrat, F., Valleron, A.-J., Flahault, A.: Influenza epidemics in the United States, France, and Australia, 1972-1997. Emerg. Infect. Dis. 10, 32–39 (2004).

4. Coburn, B.J., Wagner, B.G., Blower, S.: Modeling influenza epidemics and pandemics: insights into the future of swine flu (H1N1). BMC Med. 7, (2009).

5. Chikaki, E., Ishikawa, H.: A dengue transmission model in Thailand considering sequential infections with all four serotypes. J. Infect. Dev. Ctries. 3, 711–722 (2009).

6. Kermack, W.O., McKendrick, A.G.: A Contribution to the Mathematical Theory of Epidemics. Proc. R. Soc. Math. Phys. Eng. Sci. 115, 700–721 (1927).

7. Wooldridge, M.: Agent-based software engineering. IEE Proc. Softw. Eng. 144, 26–37 (1997).

8. Casti, J.L.: Would-be worlds: how simulation is changing the frontiers of science. J. Wiley, New York (1997).

9. Macal, C.M., North, M.J.: Tutorial on agent-based modelling and simulation. J. Simul. 4, 151–162 (2010).

10. Tecle, T., White, M., Hartshorn, K.: Innate Immunity to Influenza A Virus Infection. Curr. Respir. Med. Rev. 1, 127–145 (2005).

11. Morris, K.: Influenza protection—natural immunity and new vaccines. Lancet Infect. Dis. 11, 268–269 (2011).
12. Joshi, S.R., Shaw, A.C., Quagliarello, V.J.: Pandemic Influenza H1N1 2009, Innate Immunity, and the Impact of Immunosenescence on Influenza Vaccine. Yale J. Biol. Med. 82, 143–151 (2009).

13. Rothman, A.L.: Dengue: defining protective versus pathologic immunity. J. Clin. Invest. 113, 946–951 (2004).

14. Henchal, E.A., Putnak, J.R.: The dengue viruses. Clin. Microbiol. Rev. 3, 376–396 (1990).

15. Fair, J.M., Powell, D.R., LeClaire, R.J., Moore, L.M., Wilson, M.L., Dauelsberg, L.R., Samsa, M.E., DeLand, S.M., Hirsch, G., Bush, B.W.: Measuring the uncertainties of pandemic influenza. Int. J. Risk Assess. Manag. 16, 1 (2012).

16. Carrat, F., Luong, J., Lao, H., Sallé, A.-V., Lajaunie, C., Wackernagel, H.: A “small-world-like” model for comparing interventions aimed at preventing and controlling influenza pandemics. BMC Med. 4, 26 (2006).

17. Lau, L.L.H., Cowling, B.J., Fang, V.J., Chan, K., Lau, E.H.Y., Lipsitch, M., Cheng, C.K.Y., Houck, P.M., Uyeki, T.M., Peiris, J.S.M., Leung, G.M.: Viral Shedding and Clinical Illness in Naturally Acquired Influenza Virus Infections. J. Infect. Dis. 201, 1509–1516 (2010).

18. Olalla Sierra, J., Ory Manchón, F. de, Casas Flecha, I., Montiel Quezel-Guerraz, N., Salas Bravo, D.: Asymptomatic infection by influenza AH1N1 virus in healthcare workers: MARBEGRIP study, preliminary results. Rev. Esp. Salud Pública. 85, 63–71 (2011).

19. Cardozo, D.M., Nascimento-Carvalho, C.M.C., Souza, F.R., Silva, N.M.S.: Nasopharyngeal colonization and penicillin resistance among pneumococcal strains: a worldwide 2004 update. Braz. J. Infect. Dis. Off. Publ. Braz. Soc. Infect. Dis. 10, 293–304 (2006).

20. Endy, T.P., Chunsuttiwat, S., Nisalak, A., Libraty, D.H., Green, S., Rothman, A.L., Vaughn, D.W., Ennis, F.A.: Epidemiology of inapparent and symptomatic acute dengue virus infection: a prospective study of primary school children in Kamphaeng Phet, Thailand. Am. J. Epidemiol. 156, 40–51 (2002).

21. Nisalak, A., Endy, T.P., Nimmannitya, S., Kalayanarooj, S., Thisayakorn, U., Scott, R.M., Burke, D.S., Hoke, C.H., Innis, B.L., Vaughn, D.W.: Serotype-specific dengue virus circulation and dengue disease in Bangkok, Thailand from 1973 to 1999. Am. J. Trop. Med. Hyg. 68, 191–202 (2003).

22. Fuhrmann, C.: The Effects of Weather and Climate on the Seasonality of Influenza: What We Know and What We Need to Know. Geogr. Compass. 4, 718–730 (2010).

23. Tang, J.W., Lai, F.Y.L., Nymadawa, P., Deng, Y.-M., Ratnamohan, M., Petric, M., Loh, T.P., Tee, N.W.S., Dwyer, D.E., Barr, I.G., Wong, F.Y.W.: Comparison of the incidence of influenza in relation to climate factors during 2000-2007 in five countries. J. Med. Virol. 82, 1958–1965 (2010).

24. Cuong, H.Q., Vu, N.T., Cazelles, B., Boni, M.F., Thai, K.T.D., Rabaa, M.A., Quang, L.C., Simmons, C.P., Huu, T.N., Anders, K.L.: Spatiotemporal Dynamics of Dengue Epidemiics, Southern Vietnam. Emerg. Infect. Dis. 19, 945–953 (2013).

25. Balci, O.: Verification, Validation, and Testing. In: Banks, J. (ed.) Handbook of Simulation. pp. 335–393. John Wiley & Sons, Inc., Hoboken, NJ, USA.

26. Sargent, R.G.: Verification and validation of simulation models. Proceedings of the 2010 Winter Simulation Conference (WSC). pp. 166–183. IEEE (2010).