Introduction {#Sec1}
============

Each year, millions of people are exposed to serious health risks due to emerging infectious and communicable diseases. This poses a severe threat to the public health security at local, regional or national level; especially in underdeveloped countries. This is primarily due to the lack of infrastructure for timely collection, reporting, and analysis of epidemic data; non-existent early warning and forecasting systems; inadequate preparedness and emergency response management \[[@CR22]\].

3.9 billion people in 128 countries are at risk of contracting dengue, with estimated 96 million cases annually. The worldwide incidence of dengue has risen 30-fold in the past 30 years. Pakistan is among the 110 countries in the world which are badly affected by the mosquito-borne dengue virus. The first outbreak of dengue fever (DF) in Pakistan was confirmed in 1994. The country is currently experiencing among worst-ever dengue outbreaks, recording about 45,000 confirmed cases \[[@CR27]\]. Even today, an effective dengue vaccine offering balanced protection is still elusive. Unfortunately, existing dengue vaccines are known to have limited efficacy and cure \[[@CR8]\]. This underscores the critical need of preventing dengue transmission and eventual outbreak by: (i) investigating favorable conditions for the dengue epidemic to occur \[[@CR21]\]; (ii) plummeting the vector population \[[@CR23]\]; and averting the vector-human contact \[[@CR7]\], all of which are perceived as daunting challenges of Epidemiology. Due to the lack of ICT enabled governance, the existing infectious disease surveillance systems in Pakistan are unable to perform epidemiological spread analyses and effective emergency response planning \[[@CR11], [@CR18]\]. Researchers have started exploring latest techniques like Artificial Intelligence for diagnostic screen of dengue suspects \[[@CR12]\], but these methods are still in their infancy.

To mitigate these challenges, we need to develop a reliable *health surveillance* and rapid *emergency response* infrastructure, that monitors and responds to known endemic diseases in the country, and evolves to cater potential new outbreaks. This infrastructure should have the capability to collect spatio-temporal epidemiological data, analyze it using computational methods, forecast possible outbreaks and generate early warnings for rapid emergency response management. Due to the sparsity of data, the dynamics of the vector population and its interaction with the human population is quite difficult to capture. We therefore need to build models that incorporate the vector population, disease transmission and the spread direction of the infectious disease, and that support the application of preemptive strategies and countermeasures.

In this study we present a simulation approach to analyze and predict the mosquito population density and its consequence on dengue spread. We also simulate the pathogen transmission, and observe the dynamic interaction of human and mosquito population, both of which we use to forecast outbreaks in a spatial environment. Our proposed agent-based simulation framework allows modeling of both human and vector population dynamics, using separate layers. Human agents evolve between different states, from Susceptible to Exposed, Infected and eventually Recovered states while Mosquito agents evolve from Egg to Larva, Pupa and Adult state. Both population layers are spatially distributed and we model the interaction between both layers using our proposed algorithm. In addition, we expose both layers to exogenous variables such a temperature, humidity, rainfall and the permeable water surfaces in the region. From our simulation results we can reproduce predicted dengue cases across age groups and highlight them using spatio-temporal visualizations. We validate our results using data of an existing study of the local region \[[@CR4]\]. Our proposed framework can be re-used for simulation, visualization and forecasting of any region and aid Public health departments in emergency preparedness.

The rest of the paper is organized as follows: Sect. [2](#Sec2){ref-type="sec"} outlines the background concepts used in this paper and the literature review. Section [3](#Sec8){ref-type="sec"} discusses our proposed framework. Section [4](#Sec12){ref-type="sec"} provides simulation results and model validation and Sect. [5](#Sec13){ref-type="sec"} provides conclusions and future work.

Background and Literature Review {#Sec2}
================================

Dengue Epidemiology {#Sec3}
-------------------

This section provides key concepts used in our modeling approach. Epidemiology is the study of models, causes, effects, risk factors, transmission, spread and outbreaks of infectious diseases in a particular population \[[@CR25]\]. DENV is transmitted to humans through the bite of infected female Aedes mosquitoes primarily Aedes aegypti and Aedes albopictus. A susceptible mosquito can acquire infection from an infectious person and transmit it further, or human gets infection from the bite of already Infectious Aedes aegypti. It spends its lives around or in side houses, becomes adult and typically flies up to 400 m \[[@CR26]\]. Adees aegypti life cycle is composed of four stages as shown in Fig. [2](#Fig2){ref-type="fig"}. Aedes Aygepti proliferates around 30--32 $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$^\circ $$\end{document}$C. The number of eggs laid per batch depends on the weight of mosquito and other factors. Details of the dengue epidemiology can be viewed at \[[@CR9]\].Fig. 1.Mosquito to human dengue transmission Fig. 2.Life-cycle of Aedes aegypti

Environmental Factors {#Sec4}
---------------------

Various meteorological factors also influence the growth of the vector population and the spread of dengue fever. Temperature and humidity influence the incidence of dengue fever by modifying adult feeding behavior, larval development and mosquito survival. The average life span of Aedes mosquito is 25 days, with a range from one day to 76 days. Population density of Aedes Aegypti rapidly increases in summers as rising temperatures shortens the incubation period of mosquitoes and they take less time to emerge from eggs to adults. This increase the overall risk of dengue transmission \[[@CR14]\]. The mortality rate of mosquitoes increases at high temperatures. For temperatures 15 $\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$^\circ $$\end{document}$C, the feeding frequency of mosquitoes increases resulting in greater risk of viral transmission. Mosquito life cycle consists of two stages one of which is aquatic i.e they require stagnant water in order to develop and reproduce. Rainfall plays a vital role in the development of mosquitoes and Dengue transmission. There is an increase in dengue cases during and after rainy seasons. Pakistan is unfortunately experiencing severe forms of above stated changes. Relative humidity, temperature and rain remained noteworthy prognosticators of dengue occurrence in Pakistan. Surge of cases occurred from September to October \[[@CR24]\], as shown in Fig. [3](#Fig3){ref-type="fig"}.Fig. 3.Dengue cases in Pakistan (2013--2018)

Mathematical Modeling in Epidemiology {#Sec5}
-------------------------------------

Traditional non-spatial epidemiology models have been used use to represent epidemics of communicable diseases \[[@CR3]\]. A *Susceptible, Exposed, Infectious, Recovered (SEIR)* is an epidemiological model that describes the transmission process of an infectious disease \[[@CR19]\]. The individuals enter or leave the compartment based on flow rates defined. There is a decrease in Susceptible individuals when individuals get infection, or they die. Number of individuals in the Exposed compartment increases when they get infection and decreases as soon as they show the symptoms of infection and decreases with the death rate. The infection compartment increases by the infection events of Exposed and decreases by the death and recovery rate. There is an increase in Recovered compartment with the recovery rate and decreases with the natural death. Another extension to the SIS model was proposed in \[[@CR13]\]. It contains three population components: Humans (H), Vectors (M) and Eggs (E). 'L' represents the number of Latent mosquitoes that are in incubation period, as shown in Fig. [4](#Fig4){ref-type="fig"}. At first a Susceptible human gets infection from a vector moves to the Infectious compartment. While at infectious state, a human may get recovered and move to the Recovered state or may die. An Infectious human may spread infection to a Susceptible vector which would move to the Latent compartment, where it stays for the time between getting Infection and becoming infectious, called latency period; the vector then moves to the Infectious compartment. A susceptible mosquito if lays eggs increases the population of susceptible vectors, whereas an Infectious mosquito if lays eggs would increase the population of Infectious vectors. It is also possible that an Infectious mosquito lays normal eggs. The main goal of modeling the life cycle of mosquitoes is to estimate the growth of the vector density at a place and time; and the interaction with the hosts to predict the rate of spread of disease. Our proposed approach is based on the foundation of this principle.Fig. 4.Humans, mosquitoes and eggs. S = Susceptible, E = Exposed, I = Infected, R = Recovered, L = Latent, H = Human, M = Mosquitoes, E = Egg

Agent-Based Modeling and Simulation {#Sec6}
-----------------------------------

Most existing mathematical models focus on non-spatial macro-level aspects of the system. Because we are strongly interested in the micro-level aspects of our agents (a level where we can more easily extract rules and behaviors), we therefore use agent-based modelling. An agent-based model consists of autonomous decision-making entities: ***Agents***, each able to perceptively assess situations and make decision according to a set of predefined rules. ABM is decentralized and produces collective behavior by agents communicating and interacting with each other in their environment \[[@CR16]\]. The interest in using ABM has been recently renewed due to their ability to model complex geospatial structures and interacting networks \[[@CR5]\].

Literature Review {#Sec7}
-----------------

Many researchers have proposed different dengue epidemic simulation models. However, selection of the methodology and platform greatly depends upon the purpose of the study. Jacintho, et al. \[[@CR16]\] propose an agent-based model of the dengue spread, using the Swarm platform that models the micro-level behavior of agents in the spread and transmission of dengue fever using a rule-based approach, however it lacks GIS based spatial representation. Almeida, et al. \[[@CR1]\] propose an individual-based approach to model Aedes aegypti population considering vectors, humans and objects as agents, using repast framework. Kang and Aldstadt \[[@CR17]\] proposed an approach to validate spatially explicit ABM for several specifications of vector-borne disease transmission models, using multiple scale spatio-temporal patterns. Hunter et al. \[[@CR15]\] developed a data driven agent-based SEIR model that resulted in the emergence of patterns and behaviors that are not directly programmed into the model. Lima, et al. \[[@CR20]\] developed DengueME, a collaborative open source platform to simulate dengue disease and its vector's dynamics. It supports compartmental and individual-based models, implemented over a GIS database, that represent Aedes aegypti population dynamics, human demography, human mobility, urban landscape and dengue transmission mediated by human and mosquito encounters. Yein Ling Hii \[[@CR14]\] proposed a machine learning approach to study dengue fever considering climatic factors: temperature and rainfall using Poisson multivariate regression and validated through multiple statistical models. Guo, et al. \[[@CR10]\] presented a comparison of various machine learning algorithms for the accurate prediction of dengue in China, and shows that support vector regression achieved a superior performance in comparison with other forecasting techniques assessed in this study.

Our proposed framework uses the mathematical model proposed by \[[@CR13]\], as underlying foundation and extend it using an ABM approach, which consists of two population layers: (i) human and (ii) vectors (mosquitoes and eggs). Both layers express the population dynamics, mobility and microscopic behavior of human and vector agents separately, yet provide a common spatial environment for their interactions, to study the spread of disease within the desired spatiotemporal resolution.

Proposed Framework {#Sec8}
==================

This section discusses the details of our proposed framework which is composed of three layers: (i) Host Layer (Human population); (ii) Vector Layer (Mosquito population); and (iii) Pathogen Layer (Dengue parameters), as shown in Fig. [5](#Fig5){ref-type="fig"}. The framework further integrates: (i) GIS based spatial environment for agent distribution and mobility; (ii) time step using a user defined temporal resolution (from Min to Year); (iii) simulation engine to handle change of states and dynamic event processing; (iv) database for importing input data and exporting simulation results; (v) exogenous variables for weather and climate data; and (vi) validation data for model validation. The framework also provide a visualization dashboard for viewing the change of states of the distributed population of agents in real-time (or virtual time a.k.a faster than real-time) and for the graph visualization of the simulation results.Fig. 5.Agent-based simulation framework

Host Layer {#Sec9}
----------

This layer concerns with the structure, behavior and the interactions of host agent and allows the modelers to initialize a host population (e.g., human or animals) using variable configurations. The behavior of the host agent is represented by a state chart, as shown in Fig. [6](#Fig6){ref-type="fig"} which consists of six states: Susceptible, Exposed, Infected (or Immune), Recovered (or Dead). In this paper we assume the entire host population is initialized in Susceptible state. In the future, we intend to support a distribution of initial states so that we can use more realistic model configurations of a study area. When at *'Susceptible'* state, a host agent receives an incoming message from an infectious mosquito, representing the 'infectious bite', it transits to an *'Exposed'* state. After a certain period, defined by the incubation period parameter (3--8 days \[[@CR28]\]) either the host will transit to *'Infected'* state or go to immune state (if resolved immune by the immunity probability). When at infected state, an incoming 'bite' message causes a self-loop transition, which is used to transmit the virus to an uninfected mosquito, with a given probability. After a certain duration, defined by the illness duration parameter (20 days) the host will transit to 'Recovered' state, if resolved true by the survival probability (0.9) or 'Dead' otherwise. We implement the interactions between Host and Vector agents using message passing and a distance based network type \[[@CR2]\], which implies that a vector is connected with multiple hosts that are situated within a given range (36 m), and can communicate i.e. bite with infection or acquire an infection through a bite, as shown in Fig. [8](#Fig8){ref-type="fig"}. The detailed bite algorithm is presented later in this section.Fig. 6.Host agent (human) Fig. 7.Vector agent (mosquito) Fig. 8.Bite mechanism

Vector Layer {#Sec10}
------------

This layer concerns with the structure, behavior and the interactions of vector agent. The behavior of the vector agent is represented by a state chart, as shown in Fig. [7](#Fig7){ref-type="fig"}. It consists of states: *Egg*, *Larva*, *Pupa* and *Adult* (male or female). A vector agent can be initialized in any of these states. In this paper we assume initialize the vector population with the probability of 0.2 eggs, 0.2 larvae, 0.2 pupas and 0.4 adults (0.5 male and 0.5 female). The vector agents are uniformly distributed over the space, however this distribution can be fine tuned if the data of the concentrations of the mosquitoes nests is available. From egg, the agent moves on to the Larva state between 2--3 days. From larva it takes 4 days to transit to Pupa state, where it resides for 2 days and moves to the Adult stage, with a 0.5 probability to be a male or a female \[[@CR6]\]. The male Aedes aegypti neither makes a bite nor transmits infection and dies after a lifespan of 14 days and then go to the final state '*dead*'. A female mosquito can enter into the *'Oviposition'* state when it is ready to lay eggs. A susceptible female will lay susceptible eggs whereas an infected female lay eggs with infectious probability = 0.3. The spawning of eggs is triggered by the event *'EggSpawn'*. The initial state of an egg (infected or not) depends on whether the female mosquito is in Susceptible or infected state. The lifespan of the female mosquito is assumed to be between 42--56 days. Inspired from the Helmersson's mathematical model \[[@CR13]\], shown in Fig. [4](#Fig4){ref-type="fig"}, the 'susceptible', 'latent' and 'Infected' states of the female mosquito are implemented. If not initially infected (i.e., *IsInfected = false*), an adult female mosquito enters into 'susceptible' state. It goes to 'latent' state if bites an infected human and acquires the virus (with a transmission probability of 0.18). The latent period is the delay from transmission to infection and is assumed to be 10 days, after which the agent enters into the 'Infected' state. While at 'susceptible' or 'Infected' states, a female mosquito bites human and have her fill of blood after each meal, at the rate of a bite after 2 days. Aedes aegypti is an intermittent biter and prefers to bite more than one person during the feeding period, therefore we assume it bites all the connected hosts. This bite is triggered by the event 'bite' at random intervals until the mosquito is dead When a 'bite' occurs the interaction between Host and Vector is implemented as shown in Algorithm 1. It takes VectorID and a list of ConnectedHosts as input. A vector is connected to all the hosts that lie within the range of 36 m. This algorithm determines infectivity of the vector after the bite using a boolean variable 'Infected'. Line1 assigns the existing state (infected or not) of the vector. Line 2--14 iterates a list of all the connected hosts and evaluate two scenarios as shown in Fig. [1](#Fig1){ref-type="fig"}. If the vector is infected it will transmit an *'infectious bite'* through message passing, and cause the host to transit from ***'susceptible'*** to '***exposed'*** state. Else, if the host is infected the vector will acquire infection (with a 0.018 probability), and transit from ***'susceptible'*** to '***Latent'*** state. Otherwise it will just *'bite'* the host without the transmission of any infection. The number of times mosquito will bite human is defined by bite rate \[[@CR13]\], which is temperature dependent and is calculated as:$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$ BiteRate=\frac{\left( 0.03\times T\;+0.66\right) }{7} $$\end{document}$$

Pathogen Layer {#Sec11}
--------------

This layer deals with the modalities of the pathogen under study i.e., 'Dengue' in our case. In this paper the structure and the behaviour of the pathogen is limited only to initialize the serotype (i.e., DENV1, DENV2, DENV3 or DENV4) and key parameters such as infectivity, transmisiability, survivability and incubation period. In future, we aim to extend this layer for dealing with the complex logic of the cross-immunity with different serotypes.

Simulation and Results {#Sec12}
======================

Our simulation is implemented using AnyLogic University Edition, and performed for a population of 50,000 persons and 1,000 mosquito agents, for a period of 90 days, on an Intel Core i7-8700 CPU\@3.20 GHz, 16.0 GB RAM, and a 64-bit Windows Operating System. The human and mosquito populations are randomly distributed within a selected region in the city of Islamabad. A simulation run is shown using spatial and temporal visualization in Fig. [9](#Fig9){ref-type="fig"} and [10](#Fig10){ref-type="fig"}. Initially the person agent population is susceptible, as soon as it is bitten by infectious mosquito it becomes Exposed (orange), after completing its incubation period of 4--7 days in exposed state it either becomes Infectious (red) or Immune (gray). From Infectious state after completing 4--12 days it either becomes Recovered (green) or Dead (black).Fig. 9.Simulation results - spatial visualization (Color figure online) Fig. 10.Simulation results temporal visualization (Color figure online)

The simulated results obtained are compared with the actual results of confirmed cases obtained from the dengue outbreak occurred in the local region in 2013. The actual cases were 9,036 out of the total population of 1,257,602 while the simulated cases were 400 out of the total agents' population of 50,000. In order to compare the data results of actual and simulated dengue cases, we calculated the prevalence of both data sets:$$\documentclass[12pt]{minimal}
                \usepackage{amsmath}
                \usepackage{wasysym} 
                \usepackage{amsfonts} 
                \usepackage{amssymb} 
                \usepackage{amsbsy}
                \usepackage{mathrsfs}
                \usepackage{upgreek}
                \setlength{\oddsidemargin}{-69pt}
                \begin{document}$$\begin{aligned} \text {Prevalence} = \frac{\text {No. of Dengue Cases}}{\text {Total Population}} \times 100 \end{aligned}$$\end{document}$$For comparison we present a graph containing both cases in Fig. [11](#Fig11){ref-type="fig"}. We observe a similar trend in the prevalence of dengue cases between the actual and simulated results. The Root Mean Square Error (RMSE) of both actual and simulated prevalence for the 90 days is *0.064*. The results show that the dengue transmission is temperature dependent. It is to be noted that with the increase in temperature, the biting rate of Aedes aegypti increases that give rise to the dengue cases.Fig. 11.Comparison of dengue cases -Source of actual data \[[@CR4]\]

Conclusion and Future Work {#Sec13}
==========================

In this paper we presented a framework for modeling, simulation, visualization and forecasting of dengue spread, using an agent-based modeling approach. Our framework incorporates the structure, behaviour and interactions of key entities of disease epidemiology: (i) Host (Humans); (ii) Vector (mosquitoes); and (iii) Pathogen (dengue virus), using a separation of concern through independent layers. Our open-ended framework offers greater flexibility to the modelers for modification and extensibility of the disease under study, and can be used as a research tool by stakeholders (e.g., clinicians, microbiologists and public health professionals) to study the epidemiology of a region. The unique feature of our framework is its ability to model the life-cycle and population dynamics of both host and vector population, while incorporating extended mathematical models for the study of the epidemic spread. In the absence of vector population data, this tool provides means to synthesize vector population, and help improve the understanding of the spread of diseases. In the future, we plan to improve our proposed framework further by adding the mobility layer to incorporate movements, both in the Host and Vector layers. We also aim to extend our framework to support populations of a million agents or more.
