# High-Performance Computing and ABMS for High-Resolution COVID-19 Spreading Simulation
## 5 The Simulator  
Our simulator is built using ActoDemic [6], which is a framework that aims to facilitate the design and development of spreading phenomena in large-scale scenarios. The base unit is represented by actors that, depending on the target application, represent the entities of the system to model and simulate. The actors are implemented using the Java framework. ActoDeS as a backbone to support the agents' concurrent execution and distribution over several nodes. Each individual is modeled using a Base Spreader (BS) actor, which has a set of default attributes that can be enabled, configured, and modified to best suit the model. These attributes represent the demographic knowledge we used to model the population, but also the hidden internal state of each individual:  
1. Unique identifier
2. Province or municipality of residence
3. Age
4. Number of daily contacts
5. Current infection state
6. If the individual is an essential worker
7. If the individual wears a protective mask during the simulation period.  
The last two parameters are necessary to model and simulate different conditions verified in the early stage of the pandemic in Italy between February and May 2020.  
In order to model the COVID-19 spread, we adopted the SEIR model, which provides susceptible, exposed, infected, and recovered compartments, and modified it by adding two extra compartments: positive and quarantine. These phases are typical in the COVID-19 infection cycle. At the beginning, all are in the susceptibility state. At this stage, every individual can be infected by another one who is contagious. An individual who gets infected moves from a susceptibility state to an incubation state and remains in this state for a certain amount of time before moving into the next compartment, where it will become infected. An infected subject can spread the virus and infect other individuals. When the infection phase ends, the individual becomes positive. Being positive means that the virus was identified with a COVID-19 test. Due to this result, the individual will be forced into a quarantine state, limiting his/her contacts. After a certain time, a positive could heal or die. There is no death probability, but deaths follow the real death curve of the simulated use case taken into account. In particular, the incubation phase lasts from 7 to 14 days, the infectious phase from 3 to 7 days, and the positive phase from 14 to 30 days [61]. Figure 1 shows a diagram that summarizes the described infection cycle. Moreover, the distinction between positive and negative is necessary to model the use-case in 2020 since real-datarefers only to infections found with a delay using the COVID-19 tests several days after the first symptoms [62].  
Contagion is based on a specific transmission probability for each individual. This probability represents the likelihood of being in a condition that supports the virus spread. We use a general COVID-19 transmission probability (CTV) estimated in [6], but this probability is scaled by each individual depending on two other stochastic parameters that are related to the use of protective masks and their efficacy. We used statistics and masks' efficacy presented in [63]. We considered three categories of masks: cloth, surgical, and N95 masks. Efficiency of a mask is evaluated in terms of inward and outward protection. According to [63], a mask's inward efficiency could vary from 20% to 80% for cloth, 70-90% for surgical, and above 95% for N95 masks. On the other hand, outward efficiency could range from 0 to 80% for cloth masks, while surgical and N95 masks are 50-90% and 70-100% outwardly protective, respectively. The effectiveness of a generic mask is assumed to be equal to the average effectiveness of the three previous types. Figure 2 describes the contagion modeling.