## 6 Conclusions  
This paper develops a novel two-step solution for quick and accurate reconfiguration of supervisory controllers for deadlock control in RMSs with dynamic changes. In the first step, the net rewriting system is used to design a reconfigurable PN model under dynamic configurations. The obtained model guarantees boundedness behavioral property but may not guarantee the other properties of a Petri net model (i.e., liveness and reversibility). The second step proposes an automatic deadlock prevention policy for reconfigurable Petri net using the siphon control method based on a place invariant to solve the deadlock problem with dynamic structure changes in RMSs and guarantee the liveness and reversibility properties for the system. The proposed method is validated using the GPenSIM tool and compared with existing methods in the literature to highlight its ability of adapting to RMS configuration changes.  
The major advantages of the developed approach are as follows: (1) It does not need to compute reachability graphs as illustrated in Algorithm 2, Section 3, and has low-overhead computation as proved in Theorems 10 and 11, Section 4.4. (2) It can automatically and dynamically modify the structure of a Petri net model without affecting its behavioral properties, i.e., liveness, boundedness, and reversibility as illustrated in Algorithm 2, Section 3. (3) It allows rapid reconfigurability and reusability of the controller during reconfiguration as shown in Algorithm 2, Section 3. (4) It can easily handle any dynamical changes in RMSs compared with the studies in [PERSON] et al. [39], [PERSON] and [PERSON] [34], [PERSON] and [PERSON] [25], and [PERSON] et al. [7] as shown in Algorithm 2, Section 3. (5) The GPenSIM code is developed for designing, simulation, validation, and performance analysis of deadlock problems with dynamic structure changes in RMSs and the correctness of the proposed  
Figure 20: Controlled reconfigurable \(\mathbb{S}^{3}\)PR net after adding changeable control specifications.  
approach is proven and compared with the studies in [PERSON] et al. [43], [PERSON] and [PERSON] [44], and [PERSON] et al. [6] as shown in Section 4.5. (6) Based on Theorems 10 and 11, the computational complexity of the proposed approach has polynomial time complexity. Therefore, it has low computational complexity and can be applicable to other types of complex systems such as mass customization manufacturing, lean productivity, agile manufacturing, and flexible manufacturing systems. (7) It can consider systems with sequential and complex resource requirements, meaning that a set of system resources can be used and shared to process each component according to sequential processes that depend on the step-by-step discrete execution and multiple processes that depend on the execution at the same time as shown in numerical example.  
The limitation of the developed approach is that the obtained models lack an appropriate conversion approach from the PN model into control languages for application. Thus, our future research will examine the developed approach to have an automatic method to examine the applicability of the obtained models for real world manufacturing systems.  
Conceptualization, H.K. and A.A.-A.; software, H.K. and R.D.; resources, H.K., A.A.-A. and R.D.; formal analysis, H.K. and A.A.-A.; investigation, H.K., A.A.-A. and Z.L.; validation, H.K., A.A.-A., Z.L. and R.D.; writing-original draft preparation, H.K., A.A.-A. and Z.L.; writing-review and editing, H.K., A.A.-A., Z.L. and R.D.; visualization, H.K., A.A.-A. and Z.L.; supervision, A.A.-A., and Z.L. All authors have read and agreed to the published version of the manuscript.  
This research was funded by King Saud University through Researchers Supporting Project Number (RSP-2020/62).  
The authors would like to thank King Saud University for funding and supporting this research through Researchers Supporting Project Number (RSP-2020/62).  
The authors declare no conflict of interest.