## 3 Deadlock Prevention Policy for Reconfigurable S\({}^{3}\)PR Net Based on Siphons
propose a computationally efficient method based on place invariants that enforces algebraic constraints on the elements of a marking of a net system by constructing control places. The control purpose is to ensure a siphon to be a marked siphon, i.e., ensure a siphon be non-empitable at all elements of a marking. Assume that a reconfigurable S\({}^{3}\)PR net with \(N_{R}=\) ((\(N,M_{o}\)), \(\mathcal{R}\)) and \(N_{k}\) (state of \(N_{R}\)) with \(N_{k}=\) (\(P_{C\!I}\), \(T_{k}\), \(F_{k}\), \(W_{k}\), \(M_{ko}\), \(K_{k}\)), \(k=\) 1, 2,..., \(|\mathcal{R}|\) is a net to be controlled, which includes \(n\) places and \(m\) transitions. Let \([N_{k}]\) be the incidence matrix of a plant reconfigurable S\({}^{3}\)PR net. The control places can be represented by \([N_{c}]\) a matrix that shows the connection relationship between control places to transitions of the net \(N_{k}\). The controlled net with incidence matrix \([N]\) comprises both the original reconfigurable S\({}^{3}\)PR net and the monitors, i.e.,  
\[[N]=\left[ \begin{array}{c}N_{k}\\ N_{c}\end{array} \right] \tag{4}\]  
The control purpose is to impose a set of linear constraints to prevent unwanted markings being reached. The constraints are formulated in a matrix form:  
\[\mathcal{L}M\geq\mathcal{B} \tag{5}\]  
where \(M\) denotes the marking vector of net \(N_{k}\), \(\mathcal{L}\) is an integer \(n_{c}\times n\) matrix (\(n_{c}\) - the number of constraints), and \(\mathcal{B}\) is an integer column vector. After the introduction of a non-negative slack variable that corresponds to the initial marking \(M_{ko}\) of \(N_{k}\), constraint (5) can be reformulated as:  
\[M_{co}=\mathcal{B}-\mathcal{L}M_{ko}. \tag{6}\]  
where \(M_{co}\) represents the initial marking of monitor \(c\). If \([N_{k}]\) is the incidence matrix, we have: \(M_{k}=M_{ko}+[N_{k}].\overset{\rightarrow}{\delta}\). Therefore, \(M_{c}=\mathcal{B}-\mathcal{L}. (M_{ko}+[N_{k}].\overset{\rightarrow}{\delta})\), which also can be reformulated as:  
\[M_{c}=M_{co}+(-\mathcal{L}.[N_{k}].\overset{\rightarrow}{\delta}) \tag{7}\]  
The place invariant computed by (5) must meet the place invariant equation \(I^{\mathrm{T}}[N]=\mathbf{0}^{\mathrm{T}}\). Therefore, the monitor \([N_{c}]\) can be formulated as:  
\[[N_{c}]=-\mathcal{L}.[N_{k}] \tag{8}\]  
Consequently, \(M_{c}\) may be considered as a marking of some additional monitors, where the supervised reconfigurable S\({}^{3}\)PR net has an incidence matrix \([N]=\left[ \begin{array}{c}N_{k}\\ N_{c}\end{array} \right]\), and a marking vector \(M=\left[ \begin{array}{c}M_{k}\\ M_{c}\end{array} \right]\). **Theorem 6**. : _Let \(N_{R}\) be a reconfigurable \(S^{3}PR\) net with \(N_{R}\) = ((\(N\), \(M_{o}\)), \(\mathcal{R}\)). Let \(N_{k}\) be a state of \(N_{R}\) with \(N_{k}\) = (\(P_{\mathcal{C}k}\), \(T_{k}\), \(F_{k}\), \(W_{k}\), \(M_{\text{ko}}\), \(K_{k}\)), incidence matrix \([N_{k}]\) and initial marking \(M_{\text{ko}}\) be given. A set of \(n_{c}\) linear constraints \(\mathcal{L}M_{k}\geq\mathcal{B}\) are to be imposed. If \(\mathcal{B}-\mathcal{L}M_{k}\geq 0\) then a Petri net controller with incidence matrix \([N_{c}]=-L.[N_{k}]\) and initial marking \(M_{\text{co}}=\mathcal{B}-\mathcal{L}M_{\text{ko}}\) enforces the constraint \(\mathcal{L}M_{k}\geq\mathcal{B}\) when included in the closed loop system \([N]=\left[ \begin{array}{c}N_{k}\\ N_{c}\end{array} \right]\). In addition, the controller is maximally permissive._  
Proof. : See [40,41]. Now, we consider the place invariant approach to control the siphon. Let \(S\) be an unmarked siphon. The control purpose is to ensure that \(S\) is never unmarked through the system evolution (\(N\), \(M_{o}\)) and eliminate markings that break the linear constraint (5) from the reachable markings. Let \(V_{S}\backslash S\in\Pi\) be the monitor resulting from controlling the siphon \(S\). There are siphons \(S\) such that if \(\sum_{p\in S}M_{o}(p)\geq 1\) for the initial marking \(M_{o}\), then \(\sum_{p\in S}M(p)\geq 1\) for all reachable markings \(M\).