## 3 Deadlock Prevention Policy for Reconfigurable S\({}^{3}\)PR Net Based on Siphons
Thus, three monitors are added, \(V_{S1}\), \(V_{S2}\), and \(V_{S3}\), which enforce:  
\[M(p_{4})+M(p_{5})+M(p_{6})+M(p_{8})\geq 1 \tag{18}\]  
\[M(p_{2})+M(p_{6})+M(p_{8})+M(p_{9})\geq 1 \tag{19}\]  
\[M(p_{5})+M(p_{6})+M(p_{8})+M(p_{9})\geq 1 \tag{20}\]  
The following place invariants are accordingly generated:  
\[M(V_{S1})=M(p_{4})+M(p_{5})+M(p_{6})+M(p_{8})-1 \tag{21}\]  
\[M(V_{S2})=M(p_{2})+M(p_{6})+M(p_{8})+M(p_{9})-1 \tag{22}\]  
\[M(V_{S3})=M(p_{5})+M(p_{6})+M(p_{8})+M(p_{9})-1 \tag{23}\]  
The current matrices \(\mathcal{L}\) and \(\mathcal{B}\) represent the Equations (18)-(20). \[\mathcal{L}=\left[ \begin{array}{cccccccc}0&0&0&1&1&1&0&1&0\\ 0&1&0&0&0&1&0&1&1\\ 0&0&0&0&1&1&0&1&1\end{array} \right]\text{, }\mathcal{B}=\left[ \begin{array}{c}1 \\ 1\\ 1\end{array} \right] \tag{24}\]  
while the other minimal siphons create constraints in \((\mathcal{L}_{o};\mathcal{B}_{o})\). \[\mathcal{L}_{o}=\left[ \begin{array}{cccccccc}0&0&1&0&1&0&0&0&0\\ 0&0&0&0&0&1&0&1\\ 0&1&0&1&0&1&0&1&0\\ 1&1&1&1&0&0&1&1&0\end{array} \right]\text{, }\mathcal{B}_{o}=\left[ \begin{array}{c}1 \\ 1\\ 1\\ 1\end{array} \right] \tag{25}\]  
The controller's net incidence matrix is calculated by Equation (12);  
\[\left[N_{V_{S}}\right]=-\mathcal{L}.\left[N_{1}\right]=\left[ \begin{array}{ ccccc}-1&0&1&0&0&0\\ 0&0&-1&0&1&0\\ -1&0&0&0&1&0\end{array} \right] \tag{26}\]  
The initial marking controllers are calculated as:  
\[M_{o}(V_{S1})=M_{o}(p_{4})+M_{o}(p_{5})+M_{o}(p_{6})+M_{o}(p_{8})-1=1\]  
\[M_{o}(V_{S2})=M_{o}(p_{2})+M_{o}(p_{6})+M_{o}(p_{8})+M_{o}(p_{9})-1=1\]  
\[M_{o}(V_{S3})=M_{o}(p_{5})+M_{o}(p_{6})+M_{o}(p_{8})+M_{o}(p_{9})-1=2\]  
The controlled reconfigurable net of \((N_{1},M_{1o})\) is illustrated in Figure 8. The place and arcs of the controllers are shown with blue lines. Then, reconsider the reconfigured S\({}^{3}\)PR net by addition of new product (\(N_{2}\), \(M_{2o}\)) illustrated in Figure 4c. The reconfigured net has 11 minimal siphons \(S_{1}=\{p_{7},p_{9}\}\), \(S_{2}=\{p_{3},p_{5},p_{11}\}\), \(S_{3}=\{p_{10},p_{11}\), \(p_{12}\), \(p_{13}\}\), \(S_{4}=\{p_{4},p_{5},p_{6},p_{8},p_{12}\}\), \(S_{5}=\{p_{5},p_{6},p_{8},p_{9},p_{12}\}\), \(S_{6}=\{p_{1},p_{2},p_{3},p_{4},p_{7},p_{8}\}\), \(S_{7}=\{p_{2},p_{4},p_{6},p_{8}\), \(p_{10},p_{12}\}\), \(S_{8}=\{p_{2},p_{6},p_{8},p_{9},p_{10},p_{12}\}\), \(S_{9}=\{p_{4},p_{5},p_{6},p_{8},p_{12}\}\), \(S_{10}=\{p_{5},p_{6},p_{8},p_{9},p_{12}\}\), and \(S_{11}=\{p_{2},p_{6}\), \(p_{8},p_{9},p_{10},p_{12}\}\). The \(N_{2}\) incidence matrix is  
\[[N_{2}]=\left[ \begin{array}{ccccccccc}-1&0&0&0&0&1&0&0&0&0\\ 1&-1&0&0&0&0&0&0&0&0\\ 0&1&-1&0&0&0&0&0&0&0\\ 0&0&1&-1&0&0&0&0&0&0\\ 0&-1&1&0&0&0&0&-1&1&0\\ -1&1&-1&1&-1&1&-1&1&-1&1\\ 0&0&0&1&-1&0&0&0&0&0\\ 0&0&0&0&1&-1&0&0&0&0\\ 0&0&0&-1&1&0&0&0&0&0\\ 0&0&0&0&0&0&1&-1&0&0\\ 0&0&0&0&0&0&0&1&-1&0\\ 0&0&0&0&0&0&0&1&-1\\ 0&0&0&0&0&-1&0&0&1\end{array} \right] \tag{27}\]  
while its initial marking is:  
\[M_{2O}=\left[ \begin{array}{ccccccccc}5&0&0&0&1&1&0&0&1&0&0&0&5\end{array}  \right]^{\rm T} \tag{28}\]  
\(S_{4}\), \(S_{5}\), and \(S_{8}\) create monitors \(V_{S1}\), \(V_{S2}\), and \(V_{S3}\), respectively. Thus, three monitors are added, \(V_{S1}\), \(V_{S2}\), and \(V_{S3}\), which enforce:  
\[M(p_{4})+M(p_{5})+M(p_{6})+M(p_{8})+M(p_{12})\geq 1 \tag{29}\]  
\[M(p_{5})+M(p_{6})+M(p_{8})+M(p_{9})+M(p_{12})\geq 1 \tag{30}\]  
\[M(p_{2})+M(p_{6})+M(p_{8})+M(p_{9})+M(p_{10})+M(p_{12})\geq 1 \tag{31}\]  
Figure 8: Controlled reconfigurable S\({}^{3}\)PR net by addition of new machine. The following place invariants are accordingly generated:  
\[M(V_{S1})=M(p_{4})+M(p_{5})+M(p_{6})+M(p_{8})+M(p_{12})-1 \tag{32}\]  
\[M(V_{S2})=M(p_{5})+M(p_{6})+M(p_{8})+M(p_{9})+M(p_{12})-1 \tag{33}\]  
\[M(V_{S3})=M(p_{2})+M(p_{6})+M(p_{8})+M(p_{9})+M(p_{10})+M(p_{12})-1 \tag{34}\]  
The current matrices \(\mathcal{L}\) and \(\mathcal{B}\) represent the Equations (29)-(31). \[\mathcal{L}=\left[ \begin{array}{cccccccccccc}0&0&0&1&1&1&0&1&0&0&0&1&0\\ 0&0&0&0&1&1&0&1&1&0&0&1&0\\ 0&1&0&0&0&1&0&1&1&1&0&1&0\end{array} \right]\text{, }\mathcal{B}=\left[