# High-Performance Computing and ABMS for High-Resolution COVID-19 Spreading Simulation
## 4 Actor Based Modeling and Simulation
### Using ActoDeS for ABMS Large Scale Applications  
As previously introduced, the need to use ABMS in different research and application sectors, makes the availability of ABMS that offer the features necessary in the specific research and application domain. To address this problem, ActoDeS provides several implementations of the actors and components that define an application's runtime. In particular, an actor can have its thread of execution or share it with the other actors of the actor space; moreover, different types of actors can perform simulation steps of different lengths during the execution of an application. Furthermore, as far as the runtime components are concerned, it is necessary to use different scheduling algorithms to guarantee good efficiency to different types of ABMS [56]. In this regard, ActoDeS provides some schedulers which implement the most interesting and well-known scheduling algorithms. These characteristics make ActoDeS a suitable means to build ABMS applications that, depending on the characteristics of the application domain, can be easily realized by choosing the implementations of the actors and runtime components most suitable for that type of application. ActoDeS supports the development of large-scale ABMS applications by using specialized schedulers for distributed applications and using techniques to simplify and reduce the cost of communication. Among the various types of schedulers provided, a scheduler can remove an idle actor from the execution list, store it in persistent storage, and put it back into the execution list when the actor is ready to restart its execution. This type of scheduler is useful in application domains that involve many actors who, during the simulation, can have long periods of inactivity. In fact, in these conditions, the cost of removing, storing and adding actors can be easily balanced by reducing the number of actors running. In many cases, that solution guarantees a lower use of the hardware and software resources used by the application. Undoubtedly the most critical component to develop and ensure the proper functioning of ABMS applications, and especially of large-scale applications, is communication management. Regarding distributed applications, ActoDeS allows an actor to communicate transparently with actors from other actor spaces (i.e., it needs only to get their remote references). Regarding communication, ActoDeS supports, in addition to point-to-point communication, one-to-many communication via broadcast, multicast, and publish-subscribe protocols, and reduces the cost of one-to-one communication through message aggregation techniques [57; 58]. Commonly, in different ABMS applications, each actor must propagate information to all or to a large part of the actors of the application. Naturally, if such messages were disseminated through a point-to-point interaction, the cost of communication would become intolerable even with a limited number of actors. However, ActoDeS provides an actor implementation, called \"shared actor\", which avoids this type of problem: all the actors of the application share a single mailbox that keeps all the messages sent in the previous and current simulation step and allows the reception of the messages of the previous simulation step. Therefore, this type of actor can receive: (i) the point-to-point messages that are addressed to itself, (ii) all the broadcast messages, and (iii) all the messages from a multicast group to which it has subscribed. Furthermore, separating the messages of two simulation steps avoids the burden of keeping a copy of the current environment when it is necessary to ensure that agents decide their actions with the same information about the environment in which they operate [56]. In some cases, when there is a strong interaction between the application actors, especially when a relevant part of the interaction occurs between the actors of different computation nodes, the cost of communication can cause incorrect behavior or even the failure of the application.