# An Event-Driven Agent-Based Simulation Model for Industrial Processes
## 6 Conclusions  
Process manufacturing industries are complex and dynamic systems composed of several processes and subject to many operations. Industry 4.0 makes use of technologies that pave the way for the transformation of a traditional process industry into a smart factory, a paradigm that affects not only the technologies used to be more productive, but it means a system that will be fully connected, flexible and intelligent and will be capable of generating new business models. In this scenario, the innovation process beyond the smart factory affects also the traditional managerial chain, where the speed into the decision-making process is a valuable skill. In this context, the ability of coping with an unforeseen event is of utmost importance and a multi-agent system is certainly the most suitable candidate for the design of distributed and intelligent applications in a complex and dynamic environment. This paper presents an event-driven agent-based simulation model for simulating and controlling the operations of a general industrial process. The developed MAS is composed of eight reactive agents modeled by means of the actor approach and using the publish-subscribe paradigm in order to allow the agents to communicate with each other. The agents' high-level behavior of the proposed MAS was described by using the BPMN formalism and the interaction among the agents in different situations such as fault management, products reallocation and suspension was reported in detail. A web-based application was implemented through the ASP.NET toolkit of.NET Frameworks 4.0 to simulate the agent-based model. The GUI of the application allows the user to control the simulation and interact with it, showing also how the system process evolves over time. Different scenarios were simulated to show how the agent-based model can handle unexpected dynamic events such as off-spec products, machine faults or overloading on a single machine. Even if the considered scenarios represent a simplified version of real plant situations and the performance of the production process is far from optimal, the simulations show the potential and the advantages of the designed MAS approach and highlight that this paradigm can be transferred within an industrial environment in order to promptly react to different dynamic scenarios and to handle different unforeseen situations. The proposed agent-based model architecture is a hybrid due to the presence of VPA Agent, which inhibits the complete decentralization of the MAS structure but provides a high-level view of the plant and reduces the number of exchanged messages. The adopted communication model is fast and efficient and can be a suitable point of strength to considerably reduce the delay related to the information transfer among the involved actors by increasing the availability of useful information to feed the decision-making process. Furthermore, the developed modular system architecture is flexible and integrable with the existing IT systems of a company. \begin{table}
\begin{tabular}{c c} \hline \hline \multicolumn{1}{c}{...} \\ \hline
72 & PRODUCT EXEC: 115679—Tracking Updated \\
73 & PRODUCT EXEC: 115679—Routing Updated \\
74 & PRODUCT EXEC: 115679—Product Worked \\
75 & PRODUCT EXEC: 115679—Parameter Request to Customer Order \\
76 & CUSTOMER ORDER EXEC: 11913428—Inform Product ID: 115679 \\
77 & PRODUCT EXEC: 115679—Customer Reallocation Request \\
78 & VPA EXEC: Inform Product ID: 115679—Customer Found \\
79 & EVENT EXEC: 3—Loading Product 115680 into M2 Buffer \\
... & PRODUCT EXEC: 225680—Product Worked \\
123 & PRODUCT EXEC: 225680—Parameter Request to Customer Order \\
124 & PRODUCT EXEC: 225680—Parameter Request to Customer Order \\
125 & CUSTOMER ORDER EXEC: 11913428—Inform Product ID: 225680 \\
126 & PRODUCT EXEC: 225680—Customer Reallocation Request \\
127 & VPA EXEC: Inform Product ID: 225680–Customer Found \\... & \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Extract of the simulation log with the messages of the agents.