# An Event-Driven Agent-Based Simulation Model for Industrial Processes
## 5 Simulation Experiments and Results
### Machine Overloading Scenario  
In this scenario, a product was deliberately loaded on the Machine M1, even if the buffer capacity of the machine does not support three products at a time but only two. The modified events are reported in Table 6, where the unexpected operation is highlighted in bold and framed. In this case, when the unexpected event is executed, Machine Agent M1 sends a suspension request to the Product Agent 115680 that suspends the product, such as described in Section 3.  
An extraction of the simulation log is reported in Table 7, where it is possible to see the messages exchanged between the Machine Agent and the Product Agent. Despite the suspension, product 115680 is reactivated as soon as the buffer of machine M1 is free. A representation of the plant at the end of the simulation is shown in Figure 13, where the simulation correctly terminates with the processing of product 115680. Even in this case, the MAS orchestrates the system and is able to handle the unforeseen event. Even if the scenario described here rarely happens in a system that is manually managed, it can occur in an automated system. Therefore, a good management of product loading is necessary. The reactivation of the products could be managed directly by the Product Agents, by asking to be reprocessed after a while, but this is not efficient as the products do not know exactly when a machine is ready, thus, the reactivation is handled by the Machine Agents.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Operation** & **Operation Code** & **Process Involved** \\ \hline Assigning product 115678 to M1 scheduling & 1 & M1 \\ Assigning product 115679 to M1 scheduling & 1 & M1 \\ Assigning product 115680 to M1 scheduling & 1 & M1 \\ Loading product 115678 into M1 buffer & 3 & WH1, M1 \\ Loading product 115679 into M1 buffer & 3 & WH1, M1 \\ Moving product 115680 within WH1 & 2 & WH1 \\ Loading product 115680 into M1 buffer & 3 & WH1, M1 \\ Assigning product 215678 to M2 scheduling & 1 & M2 \\ Assigning product 215679 to M2 scheduling & 1 & M2 \\ Working product 115678 on M1 & 4 & M1 \\ Working product 115679 on M1 & 4 & M1 \\ Loading product 115680 into M1 buffer & 3 & WH1, M1 \\ Assigning product 225680 to M3 scheduling & 1 & M3 \\ Loading product 215678 into M2 buffer & 3 & WH2, M2 \\ Loading product 225680 into M3 buffer & 3 & WH2, M3 \\ Loading product 215679 into M2 buffer & 3 & WH2, M2 \\ Working product 215678 on M2 & 4 & M2 \\ Working product 225680 on M3 & 4 & M3 \\ Working product 215679 on M2 & 4 & M2 \\ Moving product 215678 within WH3 & 2 & WH3 \\ Assigning product 215678 to M4 scheduling & 1 & M4 \\ Loading product 215678 into M4 buffer & 3 & WH3, M4 \\ Working product 215678 on M4 & 4 & M4 \\ Working product 115680 on M1 & 4 & M1 \\ Assigning product 215679 to M4 scheduling & 1 & M4 \\ Loading product 215679 into M4 buffer & 3 & WH3, M4 \\ Working product 215679 on M4 & 4 & M4 \\ Loading product 215678 to delivery truck & 5 & WH4, D \\ Loading product 215679 to delivery truck & 5 & WH4, D \\ Delivering product 215678 and 215679 & 6 & D \\ \hline \hline \end{tabular}
\end{table}
Table 6: Production operations in case of machine overloading.