# Dealing with Deadlocks in Industrial Multi Agent Systems
## 7 Conclusions  
The presented paper is, in a broader sense, an overview paper concerning the deadlock prevention and avoidance in industrial MAS in general. RAS are very important subclass of AMS. Dealing with deadlocks in RAS has been the main topic of this paper. Benefits  
Figure 13: The RT of the controlled PN model (**left**). No deadlocks are there. Both of sections (sub-nets) are active. The supervisor consisting of nine monitors (**right**). following from this are that deadlock free RAS can be designed off-line, preliminary to the construction of real manufacturing systems, still before their actual deployment in practice. Hence, this rapidly decreases a risk of defects in operation of AMS/RAS and prevents shutdowns of them. Thus, it is possible to avoid significant economic losses. Of course, another defects unrelated to deadlocks (e.g., some external disturbances) cannot be prevented in such a way. Attention has been paid to the present most frequently used RAS, in particular to their paradigms S\({}^{3}\)PR and S\({}^{4}\)PR. A wide review of literature was introduced. A general view on formal methods used in AMS was presented in Section 1.1. A short comment about the agent cooperation and negotiation, as well as on reentering in AMS was introduced in Section 1.2. The most used Petri net-based paradigms of RAS were adduced in Section 2.1. A literature overview about deadlock prevention and avoiding was referred to in Section 2.2. Setting marking of monitors in case of the siphon-based method was described in details in Section 4.2. Two simple illustration examples introduced in Section 3 (Example 1) and in Section 4 (Example 2) were supplemented by four more complicated illustrative examples in Section 5 (Example 3-Example 6). Two basic deadlock prevention techniques using Petri nets were presented in mathematical details, namely _P_-invariant-based method and the method based on siphons and traps. Although in Section 6 a rough comparison of both methods was introduced, in this closing section it is necessary to point out the principled difference between them. In Table 1, the main characteristics of both methods are introduced. The ability to address the deadlock prevention in the S\({}^{3}\)PR and S\({}^{4}\)PR paradigms of RAS is also included there. After comparing those characteristics, the method based on siphons and traps unambiguously appears more advantageous than the method based on _P_-invariants. The same result follows also from Table 2 (where disadvantage of both methods are introduced) because long lasting computations can be accelerated, e.g., by using more powerful computing technique and/or by finding algorithms with a less computational complexity. \begin{table}
\begin{tabular}{c c} \hline _P_-Invariant-Based Method & **Siphon and Trap-Based Method** \\ \hline simple analytic method & Matlab-based computational method \\ \hline it needs additional elaboration of RT & it does need any additional elaboration \\ it is more labored & — \\ \hline it has analytical setting of the initial marking & it needs additional setting of the initial marking of monitors \\ \hline \multirow{4}{*}{—} & it yields a possibility to control elementary \\  & siphons and to deal with dependent siphons by \\  & means of setting the siphon control \\  & depth variables \\ \hline it is suitable above all for S\({}^{3}\)PR paradigm & it is suitable for S\({}^{3}\)PR as well as for S\({}^{4}\)PR \\ of AMS & paradigms of AMS \\ \hline in the S\({}^{4}\)PR paradigm it cannot eliminate the & it is able to preclude origin of new deadlocks in \\ origin of new deadlocks and requires new & the S\({}^{4}\)PR paradigm \\ iterations of the deadlock prevention & \\ \hline \end{tabular}
\end{table} 
Table 1: Characteristics of both methods.