Next Article in Journal
Adaptive Cruise Control for Eco-Driving Based on Model Predictive Control Algorithm
Next Article in Special Issue
Productivity Improvement through Reengineering and Simulation: A Case Study in a Footwear-Industry
Previous Article in Journal
Reconfigurable Terahertz Metamaterial Using Split-Ring Meta-Atoms with Multifunctional Electromagnetic Characteristics
Previous Article in Special Issue
Identification of Optimal Process Parameter Settings Based on Manufacturing Performance for Fused Filament Fabrication of CFR-PEEK
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Supervisory Controller for Deadlock Control in Reconfigurable Manufacturing Systems with Dynamic Changes

1
Department of Industrial Engineering, College of Engineering, King Saud University, Riyadh 11421, Saudi Arabia
2
Institute of Systems Engineering, Macau University of Science and Technology, Taipa, Macau 999078, China
3
School of Electro-Mechanical Engineering, Xidian University, Xi’an 710071, China
4
Department of Electrical Engineering and Computer Science, Faculty of Science and Technology, University of Stavanger, 4036 Stavanger, Norway
*
Author to whom correspondence should be addressed.
Appl. Sci. 2020, 10(15), 5270; https://doi.org/10.3390/app10155270
Submission received: 10 July 2020 / Revised: 25 July 2020 / Accepted: 27 July 2020 / Published: 30 July 2020
(This article belongs to the Special Issue Design and Management of Manufacturing Systems)

Abstract

:
In reconfigurable manufacturing systems (RMSs), the architecture of a system can be modified during its operation. This reconfiguration can be caused by many motivations: processing rework and failures, adding new products, adding new machines, etc. In RMSs, sharing of resources may lead to deadlocks, and some operations can therefore remain incomplete. The objective of this article is to develop 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 (NRS) is used to design a reconfigurable Petri net model under dynamic configurations. The obtained model guarantees boundedness behavioral property but may lose the other properties of a Petri net model (i.e., liveness and reversibility). The second step develops an automatic deadlock prevention policy for the 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 achieve liveness and reversibility behavioral properties for the system. The proposed approach is tested using examples in the literature and the results highlight the ability of the automatic deadlock prevention policy to adapt to RMSs configuration changes.

1. Introduction

A typical example of discrete event systems is an automated manufacturing system (AMS) [1,2]. It enables various product types to be entered at discrete times by sharing resources like machines, automatic controlled vehicles, automated tools, robots, and buffers at asynchronous or simultaneous operations. AMSs have to cope with unexpected and rapid market changes on a competitive global market. They must make rapid modifications to their software and hardware to meet these dynamic changes. This requirement cannot, however, be satisfied successfully with traditional automated manufacturing systems, which require large capital investments. Reconfigurable manufacturing systems have now been developed to deal with those drawbacks in traditional automated manufacturing systems [3,4,5]. Reconfigurable manufacturing systems are a new kind of production systems that are randomly and dynamically configured in real time. Such configurations involve processing rework and failures, adding new products and machines, and adding new handling device. In RMSs, a set of system resources can be used to process each component according to a specific process sequence. This sharing of resources, however, may lead to deadlocks, and some operations can therefore remain incomplete. Therefore, dealing with deadlock problem is critical for RMSs.
Petri nets (PNs) are widely used for the scheduling, deadlock analysis and control in AMSs as graphical and mathematical modelling tools [6,7,8,9,10,11,12,13,14]. They can be used to describe characteristics and behaviors of AMSs such as synchronization, concurrency, conflict, causal dependence, and sequencing. Petri nets can be used for behavioral features, for example boundedness and liveness [15,16]. From a technical point of view, several policies based on Petri nets have been proposed. These policies are based on three strategies: (i) deadlock detection and recovery, (ii) deadlock avoidance, and (iii) deadlock prevention [15,17]. Most of these policies have proposed deadlock control in Petri nets through structural analysis [6,18] and reachability graph analysis [19,20,21]. In addition, three criteria to evaluate and construct an AMS supervisor have been proposed, namely behavioral permissiveness, computational complexity, and structural complexity [15,22].
Recently, several approaches have been adapted to deal with dynamic changes in manufacturing systems [7,23,24,25,26,27,28,29,30,31,32,33,34,35,36]. They primarily concentrate in two directions: direct and indirect. Direct approaches provide modification mechanisms or particular rules for system structure configurations, while indirect approaches typically import additional mechanisms for system reconfiguration specifications. The event–condition–action (ECA) paradigm is developed by Almeida et al. [30] for the design of reconfigurable logic controllers. Their research has demonstrated that the reconfiguration process is highly dependent on the modularity level of the logical control system and that not all “modular” structures can be reconfigured. For a class of discrete event systems (DESs), Sampath et al. [26] presented a reconfiguration approach for their control specifications, subject to linear constraint. This approach is suited to systems such as hospital management systems and can be reconfigured in non-real time. In order to evaluate and improve the performance of the control architecture, Dumitrache et al. [27] developed a real-time reconfigurable supervised control architecture for large manufacturing systems. A model-based control design for reconfigurable manufacturing systems is developed by Ohashi and Shin [28] through state transition diagrams and general graph representation taking into account configuration and reuse of design data. Kalita and Khargonekar [29] introduced a hierarchical structure and a framework for modeling, analysis, specification, and design of logic controllers for RMSs, which allows rapid reconfigurability and reusability of the controller during reconfiguration. In [23], reconfigurable manufacturing systems were used to replace the existing manufacturing systems to offer higher convertibility and flexibility such as dedicated production systems. Serial and parallel configurations, a rules-based matrix approach has been developed and implemented. In addition, a higher-level deadlock control method is presented for the serial and parallel configurations.
Net Rewriting Systems (NRS) are another graph-based reconfiguration mechanism [34]. In terms of pattern matching and dynamic structure replacements, the reconfiguration occurs. By the implementation of a Turing machine the expressive power was shown to be Turing equivalent. A subset of net rewriting systems, called reconfigurable nets, have also been provided with an algorithm to flatten a Petri net to standard. This subset only restricts NRS to those transformations that remain unchanged in the number of places and transitions, that is, only the flow relation can be changed. Flattening significantly increases the size of transitions by multiplying the number of reconfigurations by the amount of transitions. The NRS is used in logic controllers with improved net rewriting systems [35]. The improved NRS version restricts the rewriting rules to ensure important structural characteristics such as boundedness, liveness, and reversibility are not invalidated. In addition, in [24], an improved net rewriting system (INRS) was developed with the aim of reconfiguring an RMS supervisory controller based on PNs. Changes to an RMS modification were made to rewrite rules that were then applied in the initial PN controller. The INRS is first proposed as a reconfiguration basis. The structure of a Petri net model can be changed dynamically. Then, the study provided three representations of the RMS modification and suggested an INRS-based method to the design of the Petri net controller of an RMS. In this approach, the properties of behavioral, i.e., the boundedness, reversibility, and liveness of a modified system, were not verified or validated.
In [31], colored timed PNs (CTPN) were used in the modelling of RMSs and a mechanism to describe reconfigurability in the CTPN architecture was introduced that leads to a new architecture supporting the reconfiguration. This mechanism includes reconfigurable transitions, specific places, and inhibitor arcs. Wu and Zhou introduced intelligent token Petri net (ITPN) [25]. In their model, tokens representing job instances carry real-time knowledge about system states and changes, just like intelligent cards in practice such that dynamical changes of a system can be easily modeled. These formalisms can describe the reconfiguration behavior of the system. However, some of dynamic changes do not clearly define the modularity, which brings confusion to engineers in designing, understanding, and future redevelopment. Correctness of the system such as coherence of states before and after system reconfigurations is not considered. In addition, temporal constraints, which are of great significance in real-time systems are not mentioned. In [32], reconfigurable object nets (RONs) are used to model, simulate, and analyze RMSs. A formal method was proposed for fulfilling a new production requirement. The configuration consists of new extrusion and cutting machines. The reconfiguration is represented as graph transformations, RON tool was used to simulate the reconfigured systems and TINA [37] and PIPE [38] software tools were used to carry out the analysis.
The work of Silva et al. [36] explored the principles of the different approaches and takes from them the best practices. Configuration mechanisms were proposed using Holonic and multiagent system methods to allow a reconfigurable distributed production control system to systematically detect faults. To describe communication interfaces, the principle of service-oriented architecture was used. Hybrid top-down and bottom-up approaches were presented using Petri net models. In [33], object-oriented Petri nets (ORPNs) and π-calculus were used as two complementary formalisms. Initial RMSs structure and system behavior were modeled by ORPN while the π-calculus was used to describe RMSs’ reconfiguration. To evaluate, check, and validate RMSs, Petri nets and π-calculus supporting tools were used. The reconfigurability mechanism and consistency of RMSs could be analyzed by π-calculus. In [7], a new model is proposed, namely the intelligent colored token Petri net (ICTPN), which simulated dynamic configurations of systems such as adding new machines, processing failures and rework, machine failures, processing routes changes, removing old machines, and adding new products. The primary idea is that smart colored tokens were part types which represented real-time knowledge of system status and configurations. This allowed for the effective modeling of dynamic system configurations. The proposed ICTPN could modularly model dynamic system changes to generate a very compact model. Moreover, when configurations appear, only the colored token of the part type, which is changed from the current model was changed. The resulting ICTPN model ensures that the behavioral properties such as deadlock-free, conservative, and reversible were guaranteed.
All of the above methods with PNs attempted to deal with dynamic configuration issues in manufacturing systems. However, most of them do not include an algorithm or mechanism for reconfiguration, could not guarantee the properties of behavioral Petri net (i.e., boundedness (or safeness), liveness, and reversibility), or could not ensure that the results of the reconfiguration are correct, accurate or valid. In addition, few techniques for rapid and valid reconfiguration of literature deadlock control supervisors were presented.
The objective of this article is to develop 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 used in [34,39] was adapted to design a reconfigurable Petri net model under dynamic configurations. The obtained model guarantees boundedness behavioral property but may lose the other properties of a Petri net model (i.e., liveness and reversibility). This means that the reconfigured Petri net model has finite states, deadlocks, and does not behave cyclically. For this issue, the second step develops an automatic deadlock prevention policy for reconfigurable Petri net using the siphon control method based on place invariant to solve the deadlock problem with dynamic structure changes in RMSs and achieve liveness and reversibility behavioral properties for the system. Thus, the developed approach has the ability of adapting to RMS configuration changes.
The major applications of the developed approach are as follows:
  • Mass customization manufacturing can use the proposed approach to address its difficulties. For example, by trying to make products available rapidly to consumers, a high quality production of a wide variety of products can be maintained and achieve low costs in line with standard products.
  • Lean productivity concept can also use the proposed approach to enable a company to implement an RMS in order to improve the exploitation of the part of the resources for various family products and to minimize waste from the idle resource of an RMS.
  • Agile manufacturing can use the proposed approach to facilitate rapid products changeovers, rapid introduction of new products and unattended operation.
  • Flexible manufacturing systems can use the proposed approach to increase response to a variety of customers and markets. Moreover, scalability to the desired volume of products and convertibility to current systems, machines, robots, and controls are increased in accordance with the new production requirements.
This paper is organized as follows. Section 2 describes basic concepts of Petri nets, reconfigurable Petri nets. Section 3 presents the deadlock prevention policy for reconfigurable Petri net based on the concept of minimal siphons and place invariants. The behavioral and quantitative analysis of the proposed reconfigurable Petri net are presented in Section 4. A real-world case study is presented in Section 5 to demonstrate the application of the proposed approach. Conclusions and future research are presented in Section 6.

2. Preliminaries

2.1. S3PR NET

Definition 1. 
A simple sequential process (S2P) is a Petri net model with N = ({p0} ∪ PA, T, F) if (1) N is a strongly connected state machine and (2) each circuit N contains place p0, where p0 is a process idle place, PA = {p1, p2, …, pm} is a set of operation places, T = {t1, t2, …, tn} is a set of transitions, PB = PA ∪ {p0}, PB ∩ T = ∅, PB ∪ T ≠ ∅, and F: (PB × T) ∪ (T × PB) → IN is a set of weighted arcs called flow relations, where IN = {0, 1, 2, …}.
Definition 2. 
A simple sequential process with resources (S2PR) is a Petri net model with N = ({p0} ∪ PA ∪ PR, T, F) if
1. 
the subnet created by Y = PA ∪ {p0} ∪ T is an S2P;
2. 
PR ≠ ∅ and (PA ∪ {p0}) ∩ PR = ∅, where PR is called a set of resource places;
3. 
PC = PA ∪ {p0} ∪ PR, F ⊆ (PC × T) ∪ (T × PC) is flow relations;
4. 
••(p0) ∩ PR = (p0)•• ∩ PR ≠ ∅;
5. 
∀p ∈ PA, ∀t ∈ p, ∀t′ ∈ p, rp ∈ PR, t ∩ PR = t′ ∩ PR = {rp};
6. 
∀r ∈ PR, ••r ∩ PA = r•• ∩ PA ≠ ∅ and r ∩ r ≠ ∅;
Definition 3. 
Let N = ({p0} ∪ PA ∪ PR, T, F) be an S2PR with Mo being an initial marking of net N. An S2PR is called acceptably marked if (1) Mo(p0) ≥ 1, (2) Mo(p) = 0, ∀p ∈ PA, and (3) Mo(r) ≥ 1, ∀r ∈ PR.
Recursively, a system of S2PR is called an S3PR.
Definition 4. 
A system of S2PR, S3PR, is defined recursively as follows:
1. 
An S2PR is an S3PR;
1. 
Let Ni = ({p0i} ∪ PAi ∪ PRi, Ti, Fi), i = {1, 2}, be two S3PRs such that ({p01} ∪ PA1) ∩ ({p02} ∪ PA2) = ∅, PR1 ∩ PR2 = PD, PA1 ∩ PA2 ≠ PD, and T1 ∩ T2 ≠ ∅; then, the net N = ({p0} ∪ PA ∪ PR, T, F) is an S3PR resulting from the integration of N1 and N2 by the set of common PD (denoted as N1 N2) and expressed as: (1) p0 = {p01} ∪ {p02}, (2) PA = PA1 ∪ PA2, (3) PR = PR1 ∪ PR2, (4) T = T1 ∪ T2, and (5) F = F1 ∪ F2.
The integration of n S2PR N1-Nn via PD is expressed by i = 1 n N i . N i ¯ is used to indicate the S2P from which the S2PR Ni is built.
Definition 5. 
Let Ni = ({p0i} ∪ PAi ∪ PRi, Ti, Fi), i = {1, 2}, be two S3PRs. Mo is an initial marking of N. (N, Mo) is called acceptably marked if (1) (N, Mo) is an acceptably marked S2PR, and (2) N = N1 N2, where (Ni, Mio) is called an acceptably marked S3PR and
  • ∀i ∈ {1,2}, ∀p ∈ PAi ∪ {p0i}, Mo(p) = Mio (p).
  • ∀i ∈ {1,2}, ∀r ∈PRi \ PD, Mo(r) = Mio (r).
  • ∀i ∈ {1,2}, ∀r ∈ PD, Mo(p) = max {M1o (r), M2o (r)}.
Definition 6. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR, where W: (PC × T) ∪ (T × PC) → IN is a mapping that assigns a weight to an arc and Mo: PCIN is the initial marking.
Definition 7. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. N is said to be an ordinary net if p ∈ PC, t ∈ T, ∀(p, t) ∈ F, and W(p, t) = 1.
Definition 8. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. N is said to be a weighted net if p ∈ PC, t ∈ T, (p, t) ∈ F, and W(p, t) > 1.
Definition 9. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR, where p and t are a place and a transition in N, respectively. The preset (postset) of p is the set of all input (output) transitions of p, i.e., p = {t ∈ T | (t, p) ∈ F}(p = {t ∈ T | (p, t) ∈ F}). The preset (postset) of t is the set of all input (output) places of t, i.e., t = {p ∈ PC | (p, t) ∈ F}(t = {p ∈ PC | (t, p) ∈ F}).
Definition 10. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. N is self-loop free if for all p, t ∈ PC ∪ T; W(p, t) > 0 implies W(t, p) = 0 and has a self-loop if W(t, p) > 0.
Definition 11. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR and M be a marking of N, where M is a mapping M: PCIN and the pth element of M, expressed by M(p), is the number of tokens in place p.
Definition 12. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. A transition t ∈ T is enabled if ∀p ∈ t, M(p) ≥ W(p, t).
Definition 13. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. The marking M′ resulting from the firing of an enabled transition t ∈ T at marking M is denoted by M[ t M′ and expressed as follows:
M ( p ) = [ M ( p ) + W ( p ,   t ) if   p t \ t M ( p ) W ( t ,   p ) if   p t \ t M ( p ) + W ( t ,   p ) W ( p ,   t ) if   p t t M ( p ) otherwise ]
Definition 14. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. R(N, M) is a set of reachable markings from M in N, which is expressed by nodes and arcs; nodes represent markings that are labeled with Mi and arcs represent transition firings that are labeled with t. If t fires, then there is an arc from marking Mi to marking Mj and Mj is reached.
Definition 15. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. A transition t ∈ T is live at Mo if ∀M ∈ R(N, Mo), M′ ∈ R(N, M) such that M′[ t holds. (N, M0) is dead at Mo if there does not exist t ∈ T such that Mo[ t holds. (N, M0) is weakly live or live-locked if ∀M ∈ R(N, Mo), t ∈ T, M [ t holds. (N, M0) is quasi-live if ∀t ∈ T, M ∈ R(N, Mo) such that M [ t holds.
Definition 16. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. [N] is said to be the incidence matrix of net N, where [N] is a |P|×|T| integer matrix with [N](p, t) = W(t, p) − W(p, t). For a place p (transition t), its incidence vector, a row (column) in [N], is expressed as [N](p, .) ([N](., t).
Definition 17. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. A marking M′ is called reachable from M if there exists a sequence of transitions δ = t1 t2 t3 … tn that can be fired, and markings M1, M2, M3, …, and Mn−1 are such that M[ t o M1[ t 1 M2[ t 2 M3… Mn [ t n M′ holds, expressed as M[ δ M′, satisfies the state equation M′ = M + [N] δ . δ : T → IN is called a firing count vector or a Parikh vector that maps t in T to the number of occurrences of t in δ.
Definition 18. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. N is said to be bounded if there exists q ∈ IN, ∀M ∈ R(N, M0), ∀p ∈ PC, M(p) ≤ q. (N, M0) is structurally bounded if it is bounded for any Mo.
Definition 19. 
LLet N = ({p0} ∪ PA ∪ PR, T, F, W, Mo) be an S3PR. N is called safe if ∀M ∈ R(N, M0), ∀p ∈ PC, M(p) ≤ 1. (N, M0) is q -safe if it is q-bounded.L
Consider the example of AMS illustrated in Figure 1a. The system has one robot R1 and one machine M1. Machine M1 processes one part at a time and robot R1 holds one part at a time. There are buffers for loading/unloading. Furthermore, one part type is considered to be processed in the system. The part operation sequence is illustrated in Figure 1b. Figure 2 shows the S3PR net of the AMS example. It has six places and four transitions. The following sets of places can be used: P0 = {p1}, PR = {p5, p6}, and PA = {p2, p3, p4}. There are five reachable markings on the Petri model. The initial marking is Mo = (5, 0, 0, 0, 1, 1)T, which represents the different raw parts that are to be processed synchronously within the system, including preconditions, input signals, buffers and resource status, such as machines and robot. Places are generally used to represent the resource status, operations, and activities. The transitions are used to express control changes from one state to another. Directed arcs correspond to the material, resource, information flow, and control flow direction between states. Material, information, and resources are represented by tokens.

2.2. Reconfigurable S3PR Net

This section presents definitions and theorems in the reconfigurable S3PR nets, which are originally proposed by [34,35,39].
Definition 20. 
Let N = ({p0} ∪ PA ∪ PR, T, F, W, Mo, K) be a finite-capacity S3PR, where p0, PA, PR, T, F, W, and Mo are defined in Definitions 1–6. K: PCIN is the function of capacity that assigns to each place p the maximal number of tokens K(p).
Definition 21. 
Let (Ni, Mi) be two S3PR nets with Ni = (PCi, Ti, Fi, Wi, Mi, Ki), i= 1, 2. N1 and N2 are called morphism nets if there exists a bijection Ψ: N1 → N2, Ψ = (ΨPC: PC1 → PC2, ΨT: T1 → T2) such that for all a, b ∈ PC1 ∪ T1, F1(a, b) ∈ N1 = F2(Ψ(a), Ψ(b)) ∈ N2, and for all p ∈ PC1, M1(p) ≤ M2PC(p)).
Definition 22. 
Let (Ni, Mi) be two S3PR nets with Ni = (PCi, Ti, Fi, Wi, Mi, Ki), i = 1, 2. N1 is called the full subnet of N2 if there exists an injection function that maps places to places and transitions to transitions, denoted by ξ: N1 → N2, ξ (PC1) ⊆ PC2, and ξ (T1) ⊆ T2 such that for all a, b ∈ PC1 ∪ T1, F1(a, b) = F2(ξ (a), ξ (b)).
In the algebraic, a rewriting rule is a transformation approach that can change and combine the Petri nets dynamically. The main idea is to define and change the system configurations as a graph rewriting rule.
Definition 23. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ), where(N, Mo) is an S3PR net with N = (PC, T, F, W, Mo, K) and = {rr1, rr2, rr3, …, rrm} is called a set of rewriting rules or dynamic configurations if
1. 
For all rr ∈ , rr = {L, R, φ, φ, φ};
2. 
L = (PCL, TL, FL, WL, MoL, KL) is called the left-hand side;
3. 
R = (PCR, TR, FR, WR, MoR, KR) is called the right-hand side;
4. 
φ ⊆ (PCL × PCR) ∪ (TL × TR) is said to be an interface transfer relation of r that relates places of L to places of R and transitions of L to transitions of R, PCL φ ⊆ PCR, φPCR ⊆ PCL, TLφ ⊆ TR, and φTR ⊆ PL;
5. 
φ ⊆ φ is said to be an input interface transfer relation, expressed as φ = {({L.pi}, {R.pi})} or {({L.ti}, {R. ti})}, and L.* or R.* means to input nodes “*” in L or R;
6. 
φ ⊆ φ is named output interface transfer relation, φ = {({L.pj}, {R.pj})} or {({L.tj}, {R.tj})}, and L.* or R.* means to output nodes “*” in L or R;
7. 
for all rri, rrj (i ≠ j), ξ (Li) ∩ ξ (Lj) ≠ ∅, a rewriting must be guaranteed without overlap; moreover, the order of rri, rrj does not impact the result of the rewriting.
Definition 24. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). A new rewriting reconfigurable net NR is an S3PR net (NR, MR) with NR = (PC, T, F, W, MR, K), and a net (N, Mo) is called the initial state of the rewriting net model.
Definition 25. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). A state graph in NR is a labeled directed graph whose nodes are the marking of NR, expressed as:
1. 
Transition firing: If Arcs labeled with t can fire in the net (N1, M1), leading to (N2, M2): (N1, M1) t (N2, M2) ⇔ (N1 = N2 and M1[ t 2 M2 in N1).
2. 
Configuration changing: Arcs labeled with r = {L, R, φ, φ, φ} from state (N1, M1) to state (N2, M2) if there is ξ: L → N1 so that, ∀a ∉ ξ(L) and b ∈ L if
2.1. 
a ∈ ξ(b) ⇒ b ∈ φ and a ∈ ξ(b) ⇒ b ∈ φ.
2.2. 
N1 = (PC1, T1, F1, W1, M1, K1) and N2 = (PC2, T2, F2, W2, M2, K2) holds the following: PC2 = PC1 − ξ(PC1L) + PC1R and T2 = T1 − ξ(T1L) + T1R. Note that −(+) means deleting(inserting) places or transitions from (to) N1 and the places name of PC1R and T1R inserted into N1 must be different to prevent clashes.
Definition 26. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2). A net N1 is the restriction of a net N2 if PC1 ⊆ PC2, T1 ⊆ T2, and F1 = F2 ∩ ((PC1 × T1) ∪ (T1 × PC1)) and expressed by N1 ⊆ N2.
Definition 27. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2). The set of weighted arcs (flow relation) F2 is expressed as:
F 2 ( a ,   b ) = [ F 1 ( a ,   b ) if   a R b R F R ( a ,   b ) if   a R b R b i φ b F 1 ( a , ξ ( y i ) ) if   a R b R a i φ a F 1 ( ξ ( a i ) , b ) if   a R b R ]
Definition 28. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2). The marking of M′(p), p ∈ PC2, is expressed as:
M ( p ) = [ M ( p ) if   p R p φ p M ( ξ ( p ) ) if   p R ]
Theorem 1. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2), PC1, T1 ≠ ∅ and = {rr}, rr = {L, R, φ, φ, φ}. If L and R are a single place or single transition, then the obtained N2 by rr is equal to N1.
Proof. 
Straightforward. □
Theorem 2. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2), PC1, T1 ≠ ∅ and = {rr}, rr = {L, R, φ, φ, φ}. If (N1, M1) is bounded, L is a single place or single transition and R is an S3PR net, then the resulting (N2, M2o) net by rr is bounded.
Proof. 
The rewriting of N2 using rr is similar to replacing a place/transition by the S3PR net. Therefore, the boundedness can be established by checking if the S3PR net is well constructed and behaved. The resulting net (N2, M2o) maintains the boundedness because the S3PR net is well constructed and behaved. □
Corollary 1. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2), PC1, T1 ≠ ∅ and = {rr}, rr = {L, R, φ, φ, φ}. If (N1, M1o) is bounded, L is an S3PR Petri net and R is a single place or single transition, then the resulting net (N2, M2o) by rr is bounded.
Corollary 2. 
An S3PR net (N2, M2o) can be a bounded net and a full subnet of (N1, M1o).
Theorem 3. 
Let NR be a reconfigurable S3PR with NR = ((N, Mo), ). Let N1 and N2 be two states in NR with N1 = (PC1, T1, F1, W1, M1o, K1) and N2 = (PC2, T2, F2, W2, M2o, K2), PC1, T1 ≠ ∅ and = {rr}, rr = {L, R, φ, φ, φ}. If (N1, M1o) is bounded, L is an S3PR net and R is an S3PR net, then the resulting net (N2, M2o) by rr is bounded.
Proof. 
The rewriting of N2 using rr is similar to replacing an S3PR net by another S3PR net. Therefore, the boundedness can be established by checking if the S3PR net is well constructed and behaved. The resulting net (N2, M2o) maintains the boundedness because the S3PR net is well constructed and behaved. □
Based on Definitions 20–28 and Theorems 1–3, the developed reconfiguration procedures for S3PR net algorithm are constructed as follows:
Algorithm 1:Reconfiguration procedures for S3PR net
Input: An S3PR net (No, Mo)
Output: A reconfigurable S3PR net (NR, MRo)
Initialization:Generate dynamic configurations = {rr1, rr2, rr3, …, rrm} k=0.
Step 1: while do
    k = k+1
1.1. Build rrk = {Lk, Rk, φk, φk, φk}.
1.2. Build Lk = (PCLk, TLk, FLk, WLk, MLko, KLk).
1.3. Build Rk = (PCRk, TRk, FRk, WRk, MRko, KRk).
1.4. Build φk and φk.
1.5. Build ξk: Nk-1 → Nk.
1.6. Apply rewriting rule rrk: Nk r r k Nk−1.
1.7. Update the flow relation Fk as follows:
F k ( a , b ) = [ F k 1 ( a ,   b ) if   a R k b R k F ( k 1 ) R ( a , b ) if   a R k b R k b i φ b F k 1 ( a , ξ ( y i ) ) if   a R k b R k a i φ a F k 1 ( ξ ( a i ) , b ) if   a R k b R k ]
1.8. Calculate the initial marking of Nk
M k o ( p ) = [ M ( k 1 ) o ( p ) if   p P R , P R R k 0 if   p P A , P A R k ]
1.9. = \CR. /* CR is covered rrk*/
  end while
Step 2: Output a reconfigurable S3PR net (NR, MRo)
Step 3: End
To illustrate the proposed Algorithm 1, reconsider the initial S3PR net (No, Mo) illustrated in Figure 2. Suppose that the first system configuration includes adding new machine. In this scenario, a new machine M2 is assigned to the system (No, Mo) to process a part after M, a robot is needed to load/unload a part to/from M2. To model the addition of new machine by using the synthesis procedure of Algorithm 1, we construct a configuration as a rewriting rule = {rr1} with rr1 = {L1, R1, φ1, φ1, φ1}, where L1 and R1 are illustrated in Figure 3a and Figure 3b, respectively. We have ξ1: N1 → No, φ1 = ({p1, p6, p7, p8, p9},{t4, t5, t6}), φ1 = ({L1.t4},{R1.t4}), and φ1 = ({L1.p1, L1.p6},{R1.p1}). Then the obtained reconfigurable S3PR net (N1, M1o) is illustrated in Figure 3c.
The second configuration includes adding a new product. In this scenario, a new product (part B) is assigned to a system, which indicates that a new operation sequence is assigned and the system requires an adjustment to its Petri net model structure. To model the addition of new product by using the synthesis procedure of Algorithm 1, we constructed a configuration as a rewriting rule = {rr2} with rr2 = {L2, R1, φ2, φ2, φ2}, where L2 and R2 are illustrated in Figure 4a and Figure 4b, respectively. We have ξ2: N2 → N1, φ2 = ({p5, p6, p10, p11, p12, p13},{t7, t8, t9, t10}), φ2 = ({L2.p5, L2.p6},{R2.t7}), and φ2 = ({L2.p5, L2.p6},{R2.t10}). Then the obtained reconfigurable S3PR net (N2, M2o) is illustrated in Figure 4c.
The third system configuration involves rework. In this scenario, a part can be inspected after all operations have been completed. The system can proceed on the basis of the original sequence of operation if the configuration is carried out properly. Otherwise, rework is needed. By using Algorithm 1, the production operations of the reworked part can be exactly and easily modeled by considering rework operations as alternative sequences. Reconsider the reconfigurable S3PR net (N2, M2) illustrated in Figure 4c. Suppose that an inspection machine M3 is added to a system and that part B is processed in M1. Then, part B is moved to M3 by Robot 1 to check if there are defects in part B. If part B performed properly, then it will leave the system by Robot 1. Otherwise, if part B has defects, rework is needed, and part B is moved to M1 by Robot 1. To model the rework operation by using the synthesis procedure of Algorithm 1, we construct a configuration as a rewriting rule = {rr3} with rr3 = {L3, R3, φ3, φ3, φ3}, where L3 and R3 are illustrated in Figure 5a,b, respectively. We have ξ3: N3 → N2, φ3 = ({p5, p6, p10, p11, p12, p13, p14, p15, p16, p17},{t7, t8, t9, t10, t11, t12, t13, t14, t15}), φ3 = ({L3.t7},{R3.t7}), and φ3 = ({L3.t10},{R3.t14}). Then the obtained reconfigurable S3PR net (N3, M3o) is illustrated in Figure 5c.
Finally, a configuration includes adding a new robot. In this scenario, a new robot R2 is assigned to the system (N3, M3o) to load/unload a part A to/from M1 and M2. To model the addition of the new robot by using the synthesis procedure of Algorithm 1, we construct a configuration as a rewriting rule = {rr4} with rr4 = {L4, R4, φ4, φ4, φ4}, where L4 and R4 are illustrated in Figure 6a,b, respectively. We have ξ4: N4 → N3, φ4 = ({p1, p2, p3, p4, p6_1, p6_2, p7, p8, p10, p11, p12, p14, p15, p16},{t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15}), φ4 = ({L4.t1, L4.t7},{R4. t1, R4. t7}), and φ4 = ({L4. t6, L4. t14}, {R4.t6, R4.t14}). Then the obtained reconfigurable S3PR net (N4, M4o) is illustrated in Figure 6c.

3. Deadlock Prevention Policy for Reconfigurable S3PR Net Based on Siphons

This section presents definitions on siphons in reconfigurable S3PR nets. Next, the siphon control method based on place invariants is introduced. Finally, a deadlock prevention algorithm is proposed to solve the deadlock problems in reconfigurable S3PR nets.
Definition 29. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A place vector of N1 is expressed as a column vector I: PC1Z indexed by PC1, and a transition vector of N1 is defined as a column vector J: T1Z indexed by T1, where Z = {…, −2, −1, 0, 1, 2, …}.
Definition 30. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A place vector I of N1 is expressed as a place invariant (PI) if IT. [N1] = 0T and I ≠ 0, and a transition vector of N1 is defined as a transition invariant (TI) if [N1]. J = 0 and J ≠ 0.
Definition 31. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A place invariant I of N1 is expressed as a place semi-flow if each element of I is non-negative. ||I|| = {p |I(p) ≠ 0} is said to be the support of place invariant of I. ||I||+ = {p|I(p) > 0} is said to be the positive support of place invariant I. ||I|| = {p |I(p) < 0} is said to be the negative support of place invariant I. I is a minimal place invariant if ||I|| is not a superset of the support of any other one and its components are mutually prime.
Definition 32. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A transition invariant J of N1 is expressed as a transition semi-flow if each element of J is non-negative. ||J|| = {t |J(t) ≠ 0} is said to be the support of transition invariant of J. ||J||+ = {t|J(t) > 0} is said to be the positive support of transition invariant J. ||J|| = {t |J(t) < 0} is said to be the negative support of transition invariant J. J is a minimal transition invariant, if ||J|| is not a superset of the support of any other one, and its components are mutually prime.
Definition 33. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). li is said to be the coefficients of place invariant I if for all pi ∈ PC1, li = I(pi).
Definition 34. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A non-empty set S ⊆ PC1 is called a siphon in N1 if S ⊆ S. S ⊆ PC1 is called a trap in N1 if SS. S⊆ PC1 is called a minimal siphon (trap) if a siphon (trap) contains no other siphons. A minimal siphon S is called a strict minimal siphon if S S. Let Π   = {S1, S2, S3, …, Sk} be a set of strict minimal siphons of N1. We have S= SA ∪ SR, SR = S ∩ PR, and SA = S\SR, where SA and SR are sets of operations and resources places, respectively.
Definition 35. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A siphon S in N1 is called marked at marking M if p S M ( p ) 1 , and otherwise is called unmarked at marking M.
Definition 36. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1). A siphon S in N1 is called an emptiable siphon if there exists M ∈ R(N1, M1o) such that p S M ( p ) = 0 , and otherwise is called non-emptiable siphon.
Theorem 4. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1) and Π the set of N1 siphons. The net N1 is deadlock-free if for all S ∈ Π , for all M ∈ R(N1, M1o),   p S M ( p ) 1 .
Proof. 
Let S be a siphon in N1 and pS. p is marked at marking M and satisfies p S M ( p ) 1 . The net N1 has at least one transition t enabled at any marking reachable from M and S is never be an unmarked, and it is therefore deadlock-free. □
Theorem 5. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1) and Π the set of N1 siphons. The net (N1, M1o) is in a deadlock state, i.e., M is a dead marking of N1. Then, {p ∈ PC1|M(p) = 0} is a siphon S.
Proof. 
Since M is a dead marking, each t has an empty input place p at M, ∀pt, M(p) < W(p, t), and thus S includes each transition of N1. In fact, we have S S. Therefore, S is a siphon. Since the net has at least one transition tT1, S is not an empty set. □
Corollary 3. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1), a deadlocked N1 net includes at least one unmarked siphon S.
Corollary 4. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let N1 be a state of NR with N1 = (PC1, T1, F1, W1, M1o, K1), N1 is a deadlocked net at marking M. Then, N1 has at least one unmarked siphon S such that for all p ∈ S, there exists t ∈ p such that W1(p, t) > M(p).
To develop a deadlock prevention policy for reconfigurable S3PR net, we reviewed the approach of designing a control place (monitor) for a place invariant developed by Yamalidou et al. [40]. Then we develop a deadlock prevention policy for reconfigurable S3PR net to achieve an optimal place invariant. Yamalidou et al. 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-emptiable at all elements of a marking.
Assume that a reconfigurable S3PR net with NR = ((N, Mo), ) and Nk (state of NR) with Nk = (PCk, Tk, Fk, Wk, Mko, Kk), k = 1, 2, …, | | is a net to be controlled, which includes n places and m transitions. Let [Nk] be the incidence matrix of a plant reconfigurable S3PR net. The control places can be represented by [Nc] a matrix that shows the connection relationship between control places to transitions of the net Nk. The controlled net with incidence matrix [N] comprises both the original reconfigurable S3PR net and the monitors, i.e.,
[ N ] = [ N k N c ]
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:
. M
where M denotes the marking vector of net Nk, is an integer nc x n matrix (nc - the number of constraints), and is an integer column vector. After the introduction of a non-negative slack variable that corresponds to the initial marking Mko of Nk, constraint (5) can be reformulated as:
M c o = . M k o .
where Mco represents the initial marking of monitor c.
If [ N k ] is the incidence matrix, we have: M k = M k o + [ N k ] . δ . Therefore, M c = . ( M k o + [ N k ] . δ ) , which also can be reformulated as:
M c = M c o + ( . [ N k ] . δ )
The place invariant computed by (5) must meet the place invariant equation IT[N] = 0T. Therefore, the monitor [Nc] can be formulated as:
[ N c ] = . [ N k ]
Consequently, M c may be considered as a marking of some additional monitors, where the supervised reconfigurable S3PR net has an incidence matrix [ N ] = [ N k N c ] , and a marking vector M = [ M k M c ] .
Theorem 6. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let Nk be a state of NR with Nk = (PCk, Tk, Fk, Wk, Mko, Kk), incidence matrix [ N k ] and initial marking Mko be given. A set of nc linear constraints . M k are to be imposed. If . M k 0 then a Petri net controller with incidence matrix [ N c ] = L . [ N k ] and initial marking M c o = . M k o enforces the constraint . M k when included in the closed loop system [ N ] = [ N k N c ] . 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, Mo) and eliminate markings that break the linear constraint (5) from the reachable markings.
Let VS\S Π be the monitor resulting from controlling the siphon S. There are siphons S such that if p S M o ( p ) 1 for the initial marking Mo, then p S M ( p ) 1 for all reachable markings M. Therefore, a siphon S does not require control. In order to reduce the supervisor’s complexity, these siphons are identified and no monitors are added. Thus, we have two sets of constraints: . M and o . M o rather than a single set of constraints . M . The deadlock prevention supervision of the original net needs enforcing . M and selecting an initial marking M o such that o . M o o and . M o . The constraints o . M o are the constraints that all reachable markings satisfy when the initial markings satisfy them. Therefore, there are two cases to control a siphon:
If VSS, then S does not require monitor and VS is not assigned to a net N. Furthermore, VSS if and only if S is a trap. Thus, when S is also a siphon, it is (trap) controlled for all initial markings M o that satisfy p S M o ( p ) 1 . Therefore, a siphon S is assigned to ( o ; o ).
A.  If VS S, then S needs a monitor and VS is assigned to N. Therefore, the S is assigned to ( ; ).
Definition 37. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let Nk be a state in NR with Nk = (PCk, Tk, Fk, Wk, Mko, Kk). A siphon S in Nk is called controlled if for all M ∈R(Nk, Mko),   p S M ( p ) 1 and satisfy . M and o . M o .
Definition 38. 
Let NR be a reconfigurable S3PR net with NR = ((N, Mo), ). Let Nk be a state in NR with Nk = (PCk, Tk, Fk, Wk, Mko, Kk). The deadlock controller for (Nk, Mok) is expressed as (V, MVo) = (PV, TV, FV, MVo), where (1) PV = {VS\S ∈ Π } is set of monitors. (2) TV = {t\t ∈ VS ∪VS}. (3) FV ⊆ (PV × TV) ∪ (TV × PV) is called a flow relation of V. (4) for all VS ∈ PV, M V o ( V s ) = . M k o ( V s ) , where MVo(VS) is called an initial marking of a monitor. (NRC, MRCo) is said to be a controlled reconfigurable S3PR net resulting from the integration of (Nk, Mko) and (V, MVo), expressed as (Nk, Mko) ∥ (V, MVo), where NRC = (PRC, TRC, FRC, WRC, MRCo, KRC), PRC = PCk ∪ PV, TRC = Tk ∪ TV, FRC: (PRC × TRC) ∪ (TRC × PRC) → IN is called flow relations, WRC: (PRC × TRC) ∪ (TRC × PRC) → IN is a mapping that assigns a weight to an arc, MRCo: PRCIN is the initial marking, and KRC: PRCIN is the function of capacity that assigns to each place p the maximal number of tokens KRC(p).
Based on the concept of place invariant and siphon control, the deadlock prevention algorithm for reconfigurable S3PR net is developed as follows:
Algorithm 2:Deadlock prevention algorithm for reconfigurable S3PR net based on siphon control
Input: An S3PR net (No, Mo)
Output: A controlled reconfigurable S3PR net (NRC, MRCo).
Initialization: Generate dynamic configurations = {rr1, rr2, rr3, …, rrm} k=0, PV = ∅, TV = ∅, FV = ∅, (NRC, MRCo) = ∅.
Step 1: while do
    k=k+1
1.1. Build (Nk, Mko) by using Algorithm 1.
1.2. Compute minimal siphons Π for (Nk, Mko).
1.3. for each S ∈ Π do
   if VS S, then
        a. Add S to ( ; ).
        b.  [ N V S ] = . [ N k ]
        c.  M V o ( V s ) = . M k o .
        d. PV := PV ∪ {Vs}
        e. TV := TV ∪ {t\tVSVS}.
        f. FV := FV ∪ ((PV × TV) ∪ (TV × PV))
   elseIf VSS and p S M o ( p ) 1 , then
        Add S to ( o ; o ).
end if
    end for
1.4. (NRC, MRCo) := (Nk, Mko)(Vk, MVko)
1.5. = \CR. /* CR is covered rrk*/
  end while
Step 2: Output a controlled reconfigurable S3PR net (NRC, MRCo).
Step 3: End
To illustrate the proposed Algorithm 2, reconsider the initial S3PR net (No, Mo) illustrated in Figure 2. The initial net has four minimal siphons S1 = {p1, p2, p3, p4}, S2 = {p3, p5}, S3 = {p2, p4, p6}, and S4 = {p4, p5, p6}. The No incidence matrix is
[ N o ] = [ 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 1 ]
while its initial marking is:
M o = [ 5 0 0 0 1 1 ] T
S4 creates monitor VS1, therefore one monitor VS1 is added, which enforces:
M(p4) + M(p5) + M(p6) ≥ 1
The following place invariant is generated:
M(VS1) = M(p4) + M(p5) + M(p6) − 1
The current matrices and represent the Equation (12).
= [ 0 0 0 1 1 1 ] ,   = [ 1 ]
while the others minimal siphons create constraints in ( o ; o ).
o = [ 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 ] ,   o = [ 1 1 1 ]
The controller net incidence matrix is calculated by Equation (8):
[ N V S ] = . [ N o ] = [ 1 0 1 0 ]
The controller‘s initial place marking is calculated as:
Mo(VS1) = Mo(p4) + Mo(p5) + Mo(p6) − 1 = 1
The controlled net of (No, Mo) is illustrated in Figure 7. The place and arcs of the controller are shown with blue lines.
Now, reconsider the reconfigured S3PR net by addition of new machine (N1, M1o) illustrated in Figure 3c. The reconfigured net has seven minimal siphons S1 = {p3, p5}, S2 = {p7, p9}, S3 = {p2, p4, p6, p8}, S4 = {p4, p5, p6, p8}, S5 = {p2, p6, p8, p9}, S6 = {p5, p6, p8, p9}, and S7 = {p1, p2, p3, p4, p7, p8}.
The N1 incidence matrix is:
[ N 1 ] = [ 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 0 0 0 0 0 1 1 0 0 0 1 1 0 ]
while its initial marking is:
M 1 O = [ 5 0 0 0 1 1 0 0 1 ] T
S4, S5, and S6 create monitor VS1, VS2, and VS3, respectively. Thus, three monitors are added, VS1, VS2, and VS3, which enforce:
M(p4) + M(p5) + M(p6) + M(p8) ≥ 1
M(p2) + M(p6) + M(p8) + M(p9) ≥ 1
M(p5) + M(p6) + M(p8) + M(p9) ≥ 1
The following place invariants are accordingly generated:
M(VS1) = M(p4) + M(p5) + M(p6) + M(p8) − 1
M(VS2) = M(p2) + M(p6) + M(p8) + M(p9) − 1
M(VS3) = M(p5) + M(p6) + M(p8) + M(p9) − 1
The current matrices and represent the Equations (18)–(20).
= [ 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 ] ,   = [ 1 1 1 ]
while the other minimal siphons create constraints in ( o ; o ).
o = [ 0 0 1 0 1 0 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 ] ,   o = [ 1 1 1 1 ]
The controller’s net incidence matrix is calculated by Equation (12);
[ N V S ] = . [ N 1 ] = [ 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 ]
The initial marking controllers are calculated as:
Mo(VS1) = Mo(p4) + Mo(p5) + Mo(p6) + Mo(p8) − 1 = 1
Mo(VS2) = Mo(p2) + Mo(p6) + Mo(p8) + Mo(p9) − 1 = 1
Mo(VS3) = Mo(p5) + Mo(p6) + Mo(p8) + Mo(p9) − 1 = 2
The controlled reconfigurable net of (N1, M1o) is illustrated in Figure 8. The place and arcs of the controllers are shown with blue lines.
Then, reconsider the reconfigured S3PR net by addition of new product (N2, M2o) illustrated in Figure 4c. The reconfigured net has 11 minimal siphons S1 = {p7, p9}, S2 = {p3, p5, p11}, S3 = {p10, p11, p12, p13}, S4 = {p4, p5, p6, p8, p12}, S5 = {p5, p6, p8, p9, p12}, S6 = {p1, p2, p3, p4, p7, p8}, S7 = {p2, p4, p6, p8, p10, p12}, S8 = {p2, p6, p8, p9, p10, p12}, S9 = {p4, p5, p6, p8, p12}, S10 = {p5, p6, p8, p9, p12}, and S11 = {p2, p6, p8, p9, p10, p12}. The N2 incidence matrix is
[ N 2 ] = [ 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 0 1 1 0 0 0 0 0 0 1 0 0 1 ]
while its initial marking is:
M 2 O = [ 5 0 0 0 1 1 0 0 1 0 0 0 5 ] T
S4, S5, and S8 create monitors VS1, VS2, and VS3, respectively. Thus, three monitors are added, VS1, VS2, and VS3, which enforce:
M(p4) + M(p5) + M(p6) + M(p8) + M(p12) ≥ 1
M(p5) + M(p6) + M(p8) + M(p9) + M(p12) ≥ 1
M(p2) + M(p6) + M(p8) + M(p9) + M(p10) + M(p12) ≥ 1
The following place invariants are accordingly generated:
M(VS1) = M(p4) + M(p5) + M(p6) + M(p8) + M(p12) − 1
M(VS2) = M(p5) + M(p6) + M(p8) + M(p9) + M(p12) − 1
M(VS3) = M(p2) + M(p6) + M(p8) + M(p9) + M(p10) + M(p12) − 1
The current matrices and represent the Equations (29)–(31).
= [ 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 ] ,   = [ 1 1 1 ]
while the other minimal siphons create constraints in ( o ; o ).
o = [ 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 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 ] ,   o = [ 1 1 1 1 1 1 1 1 ]
The controller’s net incidence matrix is calculated by Equation (12);
[ N V S ] = . [ N 2 o ] = [ 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 ]
The initial marking controllers are calculated as:
Mo(VS1) = Mo(p4) + Mo(p5) + Mo(p6) + Mo(p8) + Mo(p12) − 1 = 1
Mo(VS2) = Mo(p5) + Mo(p6) + Mo(p8) + Mo(p9) +Mo(p12) − 1 = 2
Mo(VS3) = Mo(p2) + Mo(p6) + Mo(p8) + Mo(p9) + Mo(p10) + Mo(p12) − 1 = 1
The controlled reconfigurable net of (N2, M2o) is illustrated in Figure 9. The place and arcs of the controllers are shown with blue lines.
Then, reconsider the reconfigured S3PR net by rework (N3, M3o) illustrated in Figure 5c. The reconfigured net has 13 minimal siphons S1 = {p4, p5, p6, p8, p12, p16}, S2 = {p5, p6, p8, p9, p12, p16}, S3 = {p4, p5, p6, p8, p16, p17}, S4 = {p5, p6, p8, p9, p16, p17}, S5 = {p2, p6, p8, p9, p10, p12, p15, p16}, S6 = {p2, p4, p6, p8 p10, p15, p16, p17}, S7 = {p2, p6, p8, p9, p10, p15, p16, p17}, S8 = {p2, p4, p6, p8, p10, p12, p15, p16}, S9 = {p7, p9}, S10 = {p1, p2, p3, p4, p7, p8}, S11 = {p3, p5, p11}, S12 = {p14, p17}, and S13 = {p10, p11, p12, p13, p14, p15, p16}. Siphons S1S7, create monitors VS1- VS7, respectively. Thus, seven monitors are added, VS1- VS7, which enforce:
M(p4) + M(p5) + M(p6) + M(p8) + M(p12) + M(p16) ≥ 1
M(p5) + M(p6) + M(p8) + M(p9) + M(p12) + M(p16) ≥ 1
M(p4) + M(p5) + M(p6) + M(p8) + M(p16) + M(p17) ≥ 1
M(p5) + M(p6) + M(p8) + M(p9) + M(p16) + M(p17) ≥ 1
M(p2) + M(p6) + M(p8) + M(p9) + M(p10) + M(p12) + M(p15) + M(p16) ≥ 1
M(p2) + M(p4) + M(p6) + M(p8) + M(p10) + M(p15) + M(p16) + M(p17) ≥ 1
M(p2) + M(p6) + M(p8) + M(p9) + M(p10) + M(p15) + M(p16) + M(p17) ≥ 1
The following place invariants are accordingly generated:
M(VS1) = M(p4) + M(p5) + M(p6) + M(p8) + M(p12) + M(p16) − 1
M(VS2) = M(p5) + M(p6) + M(p8) + M(p9) + M(p12) + M(p16) − 1
M(VS3) = M(p4) + M(p5) + M(p6) + M(p8) + M(p16) + M(p17) − 1
M(VS4) = M(p5) + M(p6) + M(p8) + M(p9) + M(p16) + M(p17) − 1
M(VS5) = M(p2) + M(p6) + M(p8) + M(p9) + M(p10) + M(p12) + M(p15) + M(p16) − 1
M(VS6) = M(p2) + M(p4) + M(p6) + M(p8) + M(p10) + M(p15) + M(p16) + M(p17) − 1
M(VS7) = M(p2) + M(p6) + M(p8) + M(p9) + M(p10) + M(p15) + M(p16) + M(p17) − 1
The current matrices and represent the Equations (38)–(44).
= [ 0 0 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 1 ] ,   = [ 1 1 1 1 1 1 1 ]
The controller’s net incidence matrix is calculated by Equation (12);
[ N V S ] = [ 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 ]
The initial marking controllers are calculated as:
Mo(VS1) = 1, Mo(VS2) = 2, Mo(VS3) = 2, Mo(VS4) = 3, Mo(VS5) = 1, Mo(VS6) = 1, and Mo(VS7) = 2.
The controlled reconfigurable net of (N3, M3o) is illustrated in Figure 10. The place and arcs of the controller are shown with blue lines.
Finally, reconsider the reconfigured S3PR net by addition of a new robot (N4, M4o) illustrated in Figure 6c. The reconfigured net has 17 minimal siphons, ten of which S1S10 that create monitors VS1- VS10, respectively, which are siphons S1 = {p2, p6, p6-1, p8, p9}, S2 = {p4, p5, p6-1, p8, p11}, S3 = {p5, p6-1, p8, p9, p11}, S4 = {p4, p5, p6-1, p6-2, p8, p12, p16}, S5 = {p4, p5, p6-1, p6-2, p8, p16, p17}, S6 = {p5, p6-1, p6-2, p8 p9, p12, p16}, S7 = {p5, p6-1, p6-2, p8, p9, p16, p17}, S8 = {p3, p5, p6-2, p12, p16}, S9 = {p3, p5, p6-2, p16, p17,}, and S10 = {p6-2, p10, p15, p16, p17}. The current matrices and are expressed as:
= [ 0 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 0 0 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 ] ,   = [ 1 1 1 1 1 1 1 1 1 1 ]
The controller’s net incidence matrix is calculated by Equation (12);
[ N V S ] = [ 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 ]
The initial marking controllers are calculated as Mo(VS1) = 1, Mo(VS2) = 1, Mo(VS3) = 2, Mo(VS4) = 2, Mo(VS5) = 3, Mo(VS6) = 3, Mo(VS7) = 4, Mo(VS8) = 1, Mo(VS9) = 2, and Mo(VS10) = 1.
The controlled reconfigurable net of (N4, M4o) is illustrated in Figure 11. The place and arcs of the controller are shown with blue lines.

4. Behavioral and Quantitative Analysis of Reconfigurable S3PR Net

4.1. Liveness

Liveness is one of the most important issues in reconfigurable manufacturing systems with dynamic changes. Conversely, in these systems, deadlock is usually unwanted. When a system is not live, tasks could never be performed because of local or global deadlocks. Liveness of a transition means that, irrespective of the current state of the net, it can always eventually fire.
Theorem 7. 
The controlled reconfigurable S3PR net (NRC, MRCo) with NRC = (PRC, TRC, FRC, WRC, MRCo, KRC) is live.
Proof. 
All transitions TRC in (NRC, MRCo) must be proven to be live. There is no unmarked siphon, pS. p is marked at marking M and satisfies p S M ( p ) 1 , since all t ∈ TRC are live. For all tTRC, if for all p t, MRCo(p) > 0, then t can fire in any case. Therefore, the controlled reconfigurable S3PR net (NRC, MRCo) is live. □
To demonstrate the liveness of a reconfigurable S3PR net, consider the model illustrated in Figure 9. Its reachability graph with all model markings is illustrated in Figure 12 and it is apparent that all transitions are live, which means that the system is live.

4.2. Boundedness

The boundedness is associated with a place, indicating that the number of tokens in a place never exceeds a certain number. This means that there is no overflow in a place.
Theorem 8. 
Let a reconfigurable S3PR net (NRC, MRCo) with NRC = (PRC, TRC, FRC, WRC, MRCo, KRC) be a controlled net. Then (NRC, MRCo) is bounded.
Proof. 
Theorem 7 proves that the net (NRC, MRCo) is live. Therefore, the boundedness can be established by checking if the net (NRC, MRCo) is well constructed, behaved, and controlled. The resulting net (NRC, MRCo) maintains the boundedness as the net is well constructed, behaved and has a finite reachability set. □
To demonstrate the boundedness of a controlled reconfigurable S3PR net, consider the net illustrated in Figure 9. Its reachability graph is illustrated in Figure 12. It is obvious that markings reachable from initial marking are five-bounded, which indicates that the system is bounded.

4.3. Reversibility

Reversibility means that a system can always return to its initial marking. A controlled reconfigurable S3PR Petri net model (NRC, MRCo) is reversible if for each marking MR(NRC, MRCo), initial marking MRCo is reachable from M.
Theorem 9. 
Let a reconfigurable S3PR net (NRC, MRCo) with NRC = (PRC, TRC, FRC, WRC, MRCo, KRC) be a live and controlled net. NRC is reversible if for each marking M ∈ R(NRC, MRCo), initial marking MRCo is reachable from M, M and MRCo satisfying all place invariants and M marks each trap of NRC.
Proof. 
Suppose that M is reachable. Then there exists a finite transition sequence δ = t1 t2 t3 … tn that can be fired, and markings M1, M2, M3, …, and Mn−1 are such that MRCo[ t 1 M1[ t 2 M2[ t 3 M3 … Mn−1[ t n M, expressed as MRCo[ δ M, agrees with the state equation M = MRCo + [NRC] δ . In addition, M and MRCo satisfy all place invariants, IT.M = IT.MRCo. Therefore, we can say that MRCo is the home marking of the net (NRC, MRCo), M is reachable from MRCo, and we get MRCo δ M. Thus, the reconfigurable S3PR net (NRC, MRCo) is reversible. □
To demonstrate the reversibility of a controlled reconfigurable S3PR net, consider the model illustrated in Figure 8. Its reachability graph is illustrated in Figure 13. In the net shown in Figure 8, there are seven minimal place invariants: I1 = p3 + p5, I2 = p2 +p3 + p10, I3 = p7 + p9, I4 = p4 +p7 + p11, I5 = p2 +p3 + p4+ p7+ p12, I6 = p2 +p4 + p6+ p8, I7 = p1 +p2 + p3+ p4+ p7+ p8, since ∀i ∈ {1,2,3,4,5,6,7}, IiT. [NRC] = 0T. M6R(NRC, MRCo), I1T.M6=I1T.MRCo= M6(p3)+ M6(p5)= MRCo(p3)+ MRCo(p5)=1. The net has a unique T-invariant J = t1 + t2+ t3 + t4 + t5+ t6 and the transition sequence δ = t1t2t3t4t5t6 is firable. As a result, MRCo[ t 1 M1[ t 2 M2[ t 3 M3[ t 4 M 4 [ t 5 M 6 [ t 6 MRCo. Therefore, the reconfigurable S3PR net (NRC, MRCo) is live, bounded, and reversible.

4.4. Computational Complexity

Algorithm 1 is used to design a reconfigurable S3PR net with NR = ((N, Mo), ). In addition, Algorithm 2 computes the control places to a reconfigurable S3PR net with NR = ((N, Mo), ).
Theorem 10. 
Given a reconfigurable S3PR net with NR = ((N, Mo), ), where NR with Nk = (PCk, Tk, Fk, Wk, Mko, Kk), the time complexity of Algorithm 1 is polynomial.
Proof. 
Let Nk be states in NR with Nk = (PCk, Tk, Fk, Wk, Mko, Kk), = {rr1, rr2, rr3, …, rrk}, rrk = {Lk, Rk, φk, φk, φk}, and net (NR, MRo) be the obtained reconfigurable S3PR net. Let x be the cardinality of , i.e., | | = x. The “While” loop is executed x times to design state Nk in a reconfigurable S3PR net (NR, MRo). Therefore, in the worst case, the computational complexity of algorithm 1 is O(x). Thus, the computational complexity of the Algorithm 1 has polynomial time complexity. □
Theorem 11. 
Given a reconfigurable S3PR net with NR = ((N, Mo), ), where NR with Nk = (PCk, Tk, Fk, Wk, Mko, Kk), the time complexity of Algorithm 2 is polynomial.
Proof. 
Algorithm 2 is used to design a control place VS to each minimal siphon S, VS S in each state Nk in a reconfigurable S3PR net (NR, MRo) to achieve the liveness of net (NR, MRo). Obviously, each VS is associated with the minimal siphon S in net (Nk, Mko). Let x be the cardinality of , i.e., | | = x. Let y be the number of minimal siphons S (denoted as S′) that requires VS i.e., |S′| = y. The “While” loop is executed x times to design state Nk in reconfigurable S3PR net (NR, MRo). The “FOR loop” loop is executed y times to design VS for the S′ in (Nk, Mko). Therefore, the computational complexity of Algorithm 2 is O(xy). Thus, the computational complexity of the Algorithm 2 has polynomial time complexity. □

4.5. GPENSIM Code and Validation

We coded the developed approach using the GPenSIM tool [6,42] to verify and validate it and compared the developed code with the studies by Ezpeleta et al. [43], Li and Zhou [44], and Kaid et al. [6]. There were three files generated: (1) the Petri net definition file (PDF) that represents the static model by stating the sets of places, transitions, and arcs, (2) the common processor file (COMMON_PRE file) that represents the conditions for activation of the enabling fire transitions, and (3) the main simulation file (MSF) that calculates the results of the simulation. The developed approach was implemented on MATLAB R2015a. A PC with Windows 10, 64-bit and Intel(R) Core (TM) i7-4702MQ CPU @ 2.20 GHz, 16 GB RAM.
Simulation leads to a better time performance in the designed model including total throughput time (total time in system), total throughput, and utilization of the robots and machines. Consider the model illustrated in Figure 8. The simulation was undertaken for 480 min. The results summarized in Table 1 were obtained after simulation in MATLAB. Table 1 shows the results for the time performance criteria mentioned above. All methods achieve approximately the same values for the utilization of resources as illustrated in Figure 14. In addition, the proposed method, as illustrated in Figure 14, can achieve approximately the same values with other techniques for throughput. In term of throughput time of Part A, the proposed method can achieve approximately the same values with other techniques as illustrated in Figure 14. Therefore, the proposed method is valid, sufficiently accurate results can be obtained and other cases can be applied.

5. Numerical Example

In this section, an example is used to present the application of the proposed approach. Consider an AMS example illustrated in Figure 15a. Its Petri net model is given in [6,7,15,22,45,46]. The system consists of four machines M1–M4 for processing parts; two robots R1 and R2 for loading and unloading parts. Each machine (robot) can process (hold) one part at a time. There are two input buffers I1 and I2 and two output buffers O1 and O2. Two raw part types, A and B, are considered to be processed in the system. Figure 15b shows the operation sequences of the two raw part types. The S3PR net of this AMS example is illustrated in Figure 16. It comprises 19 places and 14 transitions. The places can be defined as the following set partitions: PA = {p2, p3, …, p12}, PR = {p13, p14, , p18}, and P0 = {p1, p19}. The S3PR net contains 282 reachable markings.
Suppose that the first configuration of the system involves removing old machine. In this case, an old machine M1 is removed from the system (No, Mo). To model the removed machine by using the synthesis procedure of Algorithm 1, we construct a configuration as a rewriting rule = {rr1} with rr1 = {L1, R1, φ1, φ1, φ1}, where L1 and R1 are illustrated in Figure 17a and Figure 17b, respectively. In addition, we have ξ1: N1 → No, φ1= ({p2, p3, p4, p5, p13, p16, p17},{t1, t2, t3, t4, t5, t6}), φ1= ({L1.t1},{R1.t1}), and φ1 = ({L1.t6},{R1.t6}). The second configuration includes adding new product. If a new product (part C) is assigned to a system, which indicates that a new operation sequence is assigned and the system requires an adjustment to its Petri net model structure. To model the addition of new product by using the synthesis procedure of Algorithm 1, we construct a configuration as a rewriting rule = {rr2} with rr2 = {L2, R1, φ2, φ2, φ2}, where L2 and R2 are illustrated in Figure 18a and Figure 18b, respectively. Moreover, we have ξ2: N2 → N1, φ2= ({p15, p17, p20, p21, p22, p23},{t15, t16, t17, t18}), φ2= ({L2.p15, L2.p17},{R2.t15}), and φ2 = ({L2.p15, L2.p17},{R2.t18}).
The third system configuration involves rework. In this scenario, a part can be inspected after all operations have been completed. By using the proposed Algorithm 1, the production operations of the reworked part can be exactly and easily modeled by considering rework operations as alternative sequences. Suppose that an inspection machine M5 is added to a system and that part A is processed in M1 and M3. Then, part A is moved to an M5 by Robot 2 to check if there are defects in part A. If part A performs properly, then it will leave the system by Robot 2. Otherwise, if part A has defects, rework is needed, and part A is moved to M3 by Robot 2. To model the rework operation by using the synthesis procedure of Algorithm 1, we construct a configuration as a rewriting rule = {rr3} with rr3 = {L3, R3, φ3, φ3, φ3}, where L3 and R3 are illustrated in Figure 19a and Figure 19b, respectively, ξ3: N3 → N2, φ3= ({p6, p7, p14, p18, p24, p25, p26, p27},{t6, t7, t8, t19, t20, t21, t22}), φ3= ({L3.t6},{R3.t6}), and φ3 = ({L3.t8},{R3.t21}). The Specifications of S3PR net illustrated in Figure 16 under changeable control specifications are shown in Table 2. In addition, the required monitors using Algorithm 2 of the system illustrated in Figure 16 under changeable control specifications are shown in Table 3.
The controlled net after adding above changeable control specifications is illustrated in Figure 20. The place and arcs of the controller are illustrated with blue lines.

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 Badouel et al. [39], Llorens and Oliver [34], Wu and Zhou [25], and Kaid 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 approach is proven and compared with the studies in Ezpeleta et al. [43], Li and Zhou [44], and Kaid 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.

Author Contributions

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.

Funding

This research was funded by King Saud University through Researchers Supporting Project Number (RSP-2020/62).

Acknowledgments

The authors would like to thank King Saud University for funding and supporting this research through Researchers Supporting Project Number (RSP-2020/62).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hu, Y.; Ma, Z.; Li, Z. Design of Supervisors for Active Diagnosis in Discrete Event Systems. IEEE Trans. Autom. Control 2020. [Google Scholar] [CrossRef]
  2. Wang, D.; Wang, X.; Li, Z. Nonblocking Supervisory Control of State-Tree Structures with Conditional-Preemption Matrices. IEEE Trans. Ind. Inform. 2019, 16, 3744–3766. [Google Scholar] [CrossRef]
  3. Mehrabi, M.G.; Ulsoy, A.G.; Koren, Y. Reconfigurable manufacturing systems: Key to future manufacturing. J. Intell. Manuf. 2000, 11, 403–419. [Google Scholar] [CrossRef]
  4. Katz, R. Design principles of reconfigurable machines. Int. J. Adv. Manuf. Technol. 2007, 34, 430–439. [Google Scholar] [CrossRef]
  5. Patel, R.; Gojiya, A.; Deb, D. Failure Reconfiguration of Pumps in Two Reservoirs Connected to Overhead Tank. In Innovations in Infrastructure; Springer: Berlin/Heidelberg, Germany, 2019; pp. 81–92. [Google Scholar]
  6. Kaid, H.; Al-Ahmari, A.; Li, Z.; Davidrajuh, R. Single controller-based colored Petri nets for deadlock control in automated manufacturing systems. Processes 2020, 8, 21. [Google Scholar] [CrossRef] [Green Version]
  7. Kaid, H.; Al-Ahmari, A.; Li, Z.; Davidrajuh, R. Intelligent colored token Petri nets for modeling, control, and validation of dynamic changes in reconfigurable manufacturing systems. Processes 2020, 8, 358. [Google Scholar] [CrossRef] [Green Version]
  8. Li, Z.; Zhou, M. Deadlock Resolution in Automated Manufacturing Systems: A Novel Petri Net Approach; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
  9. Zan, X.; Wu, Z.; Guo, C.; Yu, Z. A Pareto-based genetic algorithm for multi-objective scheduling of automated manufacturing systems. Adv. Mech. Eng. 2020, 12, 1687814019885294. [Google Scholar] [CrossRef]
  10. Li, L.; Basile, F.; Li, Z. An approach to improve permissiveness of supervisors for GMECs in time Petri net systems. IEEE Trans. Autom. Control 2019, 65, 237–251. [Google Scholar] [CrossRef]
  11. Liu, Y.; Cai, K.; Li, Z. On scalable supervisory control of multi-agent discrete-event systems. Automatica 2019, 108, 108460. [Google Scholar] [CrossRef] [Green Version]
  12. Chen, Q.; Yin, L.; Wu, N.; El-Meligy, M.A.; Sharaf, M.A.F.; Li, Z. Diagnosability of vector discrete-event systems using predicates. IEEE Access 2019, 7, 147143–147155. [Google Scholar] [CrossRef]
  13. Kaid, H.; Al-Ahmari, A.; Nasr, E.A.; Al-Shayea, A.; Kamrani, A.K.; Noman, M.A.; Mahmoud, H.A. Petri Net Model Based on Neural Network for Deadlock Control and Fault Detection and Treatment in Automated Manufacturing Systems. IEEE Access 2020, 8, 103219–103235. [Google Scholar] [CrossRef]
  14. Zhao, M. An integrated control method for designing non-blocking supervisors using Petri nets. Adv. Mech. Eng. 2017, 9, 1687814017700829. [Google Scholar] [CrossRef]
  15. Chen, Y.; Li, Z.; Khalgui, M.; Mosbahi, O. Design of a maximally permissive liveness-enforcing Petri net supervisor for flexible manufacturing systems. Autom. Sci. Eng. IEEE Trans. 2011, 8, 374–393. [Google Scholar] [CrossRef]
  16. Al-Ahmari, A.; Kaid, H.; Li, Z.; Davidrajuh, R. Strict Minimal Siphon-Based Colored Petri Net Supervisor Synthesis for Automated Manufacturing Systems with Unreliable Resources. IEEE Access 2020. [Google Scholar] [CrossRef]
  17. Kaid, H.; Al-Ahmari, A.; El-Tamimi, A.M.; Abouel Nasr, E.; Li, Z. Design and implementation of deadlock control for automated manufacturing systems. South Afr. J. Ind. Eng. 2019, 30, 1–23. [Google Scholar] [CrossRef] [Green Version]
  18. Chao, D.Y. Improvement of suboptimal siphon-and FBM-based control model of a well-known S3PR. IEEE Trans. Autom. Sci. Eng. 2011, 8, 404–411. [Google Scholar] [CrossRef]
  19. Ghaffari, A.; Rezg, N.; Xie, X. Design of a live and maximally permissive Petri net controller using the theory of regions. IEEE Trans. Robot. Autom. 2003, 19, 137–141. [Google Scholar] [CrossRef]
  20. Uzam, M. The use of the Petri net reduction approach for an optimal deadlock prevention policy for flexible manufacturing systems. Int. J. Adv. Manuf. Technol. 2004, 23, 204–219. [Google Scholar] [CrossRef]
  21. Sun, D.; Chen, Y.; El-Meligy, M.A.; Sharaf, M.A.F.; Wu, N.; Li, Z. On algebraic identification of critical states for deadlock control in automated manufacturing systems modeled with Petri nets. IEEE Access 2019, 7, 121332–121349. [Google Scholar] [CrossRef]
  22. Nasr, E.A.; El-Tamimi, A.M.; Al-Ahmari, A.; Kaid, H. Comparison and Evaluation of Deadlock Prevention Methods for Different Size Automated Manufacturing Systems. Math. Probl. Eng. 2015, 501, 1–19. [Google Scholar] [CrossRef] [Green Version]
  23. Lee, S.; Tilbury, D.M. Deadlock-free resource allocation control for a reconfigurable manufacturing system with serial and parallel configuration. IEEE Trans. Syst. ManCybern. Part C (Appl. Rev.) 2007, 37, 1373–1381. [Google Scholar] [CrossRef]
  24. Li, J.; Dai, X.; Meng, Z. Automatic reconfiguration of petri net controllers for reconfigurable manufacturing systems with an improved net rewriting system-based approach. IEEE Trans. Autom. Sci. Eng. 2009, 6, 156–167. [Google Scholar] [CrossRef]
  25. Wu, N.; Zhou, M. Intelligent token Petri nets for modelling and control of reconfigurable automated manufacturing systems with dynamical changes. Trans. Inst. Meas. Control 2011, 33, 9–29. [Google Scholar]
  26. Sampath, R.; Darabi, H.; Buy, U.; Liu, J. Control reconfiguration of discrete event systems with dynamic control specifications. IEEE Trans. Autom. Sci. Eng. 2008, 5, 84–100. [Google Scholar] [CrossRef]
  27. Dumitrache, I.; Caramihai, S.; Stanescu, A. Intelligent agent-based control systems in manufacturing. In Proceedings of the 2000 IEEE International Symposium on Intelligent Control. Held jointly with the 8th IEEE Mediterranean Conference on Control and Automation (Cat. No. 00CH37147), Rio Patras, Greece, 19–19 July 2000; pp. 369–374. [Google Scholar]
  28. Ohashi, K.; Shin, K.G. Model-based control for reconfigurable manufacturing systems. In Proceedings of the 2001 ICRA. IEEE International Conference on Robotics and Automation (Cat. No. 01CH37164), Seoul, Korea, 21–26 May 2001; pp. 553–558. [Google Scholar]
  29. Kalita, D.; Khargonekar, P.P. Formal verification for analysis and design of logic controllers for reconfigurable machining systems. IEEE Trans. Robot. Autom. 2002, 18, 463–474. [Google Scholar] [CrossRef]
  30. Almeida, E.E.; Luntz, J.E.; Tilbury, D.M. Event-condition-action systems for reconfigurable logic control. IEEE Trans. Autom. Sci. Eng. 2007, 4, 167–181. [Google Scholar] [CrossRef]
  31. Zhang, L.; Rodrigues, B. Modelling reconfigurable manufacturing systems with coloured timed Petri nets. Int. J. Prod. Res. 2009, 47, 4569–4591. [Google Scholar] [CrossRef]
  32. Kahloul, L.; Bourekkache, S.; Djouani, K.; Chaoui, A.; Kazar, O. Using high level Petri nets in the modelling, simulation and verification of reconfigurable manufacturing systems. Int. J. Softw. Eng. Knowl. Eng. 2014, 24, 419–443. [Google Scholar] [CrossRef]
  33. Yu, Z.; Guo, F.; Ouyang, J.; Zhou, L. Object-oriented Petri nets and π-calculus-based modeling and analysis of reconfigurable manufacturing systems. Adv. Mech. Eng. 2016, 8, 1687814016677698. [Google Scholar] [CrossRef] [Green Version]
  34. Llorens, M.; Oliver, J. Structural and dynamic changes in concurrent systems: Reconfigurable Petri nets. IEEE Trans. Comput. 2004, 53, 1147–1158. [Google Scholar] [CrossRef]
  35. Li, J.; Dai, X.; Meng, Z. Improved net rewriting systems-based rapid reconfiguration of Petri net logic controllers. In Proceedings of the 31st Annual Conference of IEEE Industrial Electronics Society, Raleigh, NC, USA, 6–10 November 2005. [Google Scholar]
  36. da Silva, R.M.; Benítez-Pina, I.F.; Blos, M.F.; Santos Filho, D.J.; Miyagi, P.E. Modeling of reconfigurable distributed manufacturing control systems. IFAC-Pap. 2015, 48, 1284–1289. [Google Scholar] [CrossRef]
  37. Berthomieu, B.; Ribet, P.-O.; Vernadat, F. The tool TINA–construction of abstract state spaces for Petri nets and time Petri nets. Int. J. Prod. Res. 2004, 42, 2741–2756. [Google Scholar] [CrossRef]
  38. Bonet, P.; Catalina, M.L.; Puigjaner, R. A Petri Net tool for performance modeling. In Proceedings of the 23rd Latin American Conference on Informatics (CLEI 2007), San Jose, Costa Rica, October 2007. [Google Scholar]
  39. Badouel, E.; Llorens, M.; Oliver, J. Modeling concurrent systems: Reconfigurable nets. In Proceedings of the PDPTA, Las Vegas, NV, USA, 23–26 June 2003; pp. 1568–1574. [Google Scholar]
  40. Yamalidou, K.; Moody, J.; Lemmon, M.; Antsaklis, P. Feedback control of Petri nets based on place invariants. Automatica 1996, 32, 15–28. [Google Scholar] [CrossRef]
  41. Moody, J.O.; Antsaklis, P.J. Supervisory Control of Discrete Event Systems Using Petri Nets; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2012; Volume 8. [Google Scholar]
  42. Davidrajuh, R. Modeling Discrete-Event Systems with GPenSIM: An Introduction; Springer: Berlin/Heidelberg, Germany, 2018. [Google Scholar]
  43. Ezpeleta, J.; Colom, J.M.; Martinez, J. A Petri net based deadlock prevention policy for flexible manufacturing systems. IEEE Trans. Robot. Autom. 1995, 11, 173–184. [Google Scholar] [CrossRef] [Green Version]
  44. Li, Z.; Zhou, M. Elementary siphons of Petri nets and their application to deadlock prevention in flexible manufacturing systems. IEEE Trans. Syst. Man Cybern. Part A Syst. Hum. 2004, 34, 38–51. [Google Scholar] [CrossRef]
  45. Piroddi, L.; Cordone, R.; Fumagalli, I. Selective siphon control for deadlock prevention in Petri nets. IEEE Trans. Syst. Man Cybern. Part A: Syst. Hum. 2008, 38, 1337–1348. [Google Scholar] [CrossRef]
  46. Chen, Y.; Li, Z.; Zhou, M. Behaviorally optimal and structurally simple liveness-enforcing supervisors of flexible manufacturing systems. IEEE Trans. Syst. Man Cybern. Part A Syst. Hum. 2012, 42, 615–629. [Google Scholar] [CrossRef]
Figure 1. (a) Automated manufacturing system (AMS) example and (b) operation sequence.
Figure 1. (a) Automated manufacturing system (AMS) example and (b) operation sequence.
Applsci 10 05270 g001
Figure 2. A system of (S2P) (simple sequential process) (S3PR) net of the AMS.
Figure 2. A system of (S2P) (simple sequential process) (S3PR) net of the AMS.
Applsci 10 05270 g002
Figure 3. A reconfigured S3PR net by addition of new machine. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N1, M1o).
Figure 3. A reconfigured S3PR net by addition of new machine. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N1, M1o).
Applsci 10 05270 g003
Figure 4. A reconfigured S3PR net by addition of new product. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N2, M2o).
Figure 4. A reconfigured S3PR net by addition of new product. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N2, M2o).
Applsci 10 05270 g004
Figure 5. A reconfigured S3PR net by rework. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N3, M3o).
Figure 5. A reconfigured S3PR net by rework. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N3, M3o).
Applsci 10 05270 g005
Figure 6. A reconfigured S3PR net by addition of a new robot. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N4, M4o).
Figure 6. A reconfigured S3PR net by addition of a new robot. (a) Left hand side net L. (b) Right hand side net R. (c) A reconfigurable S3PR net (N4, M4o).
Applsci 10 05270 g006
Figure 7. Controlled S3PR net by Algorithm 2.
Figure 7. Controlled S3PR net by Algorithm 2.
Applsci 10 05270 g007
Figure 8. Controlled reconfigurable S3PR net by addition of new machine.
Figure 8. Controlled reconfigurable S3PR net by addition of new machine.
Applsci 10 05270 g008
Figure 9. Controlled reconfigurable S3PR net by addition of new product.
Figure 9. Controlled reconfigurable S3PR net by addition of new product.
Applsci 10 05270 g009
Figure 10. Controlled reconfigurable S3PR net by rework.
Figure 10. Controlled reconfigurable S3PR net by rework.
Applsci 10 05270 g010
Figure 11. Controlled reconfigurable S3PR net by rework.
Figure 11. Controlled reconfigurable S3PR net by rework.
Applsci 10 05270 g011
Figure 12. Reachable markings of a controlled reconfigurable S3PR net, as illustrated in Figure 8.
Figure 12. Reachable markings of a controlled reconfigurable S3PR net, as illustrated in Figure 8.
Applsci 10 05270 g012
Figure 13. Reachable markings of a controlled reconfigurable S3PR net, as illustrated in Figure 7.
Figure 13. Reachable markings of a controlled reconfigurable S3PR net, as illustrated in Figure 7.
Applsci 10 05270 g013
Figure 14. Comparison of the proposed method with the existing methods.
Figure 14. Comparison of the proposed method with the existing methods.
Applsci 10 05270 g014
Figure 15. (a) An AMS example and (b) production sequence.
Figure 15. (a) An AMS example and (b) production sequence.
Applsci 10 05270 g015
Figure 16. S3PR net (No, Mo) of the AMS illustrated in Figure 13a.
Figure 16. S3PR net (No, Mo) of the AMS illustrated in Figure 13a.
Applsci 10 05270 g016
Figure 17. A reconfigured S3PR net by removing a machine. (a) Left hand side net L. (b) Right hand side net R.
Figure 17. A reconfigured S3PR net by removing a machine. (a) Left hand side net L. (b) Right hand side net R.
Applsci 10 05270 g017
Figure 18. A reconfigured S3PR net by adding a product. (a) Left hand side net L. (b) Right hand side net R.
Figure 18. A reconfigured S3PR net by adding a product. (a) Left hand side net L. (b) Right hand side net R.
Applsci 10 05270 g018
Figure 19. A reconfigured S3PR net by rework. (a) Left hand side net L. (b) Right hand side net R.
Figure 19. A reconfigured S3PR net by rework. (a) Left hand side net L. (b) Right hand side net R.
Applsci 10 05270 g019
Figure 20. Controlled reconfigurable S3PR net after adding changeable control specifications.
Figure 20. Controlled reconfigurable S3PR net after adding changeable control specifications.
Applsci 10 05270 g020
Table 1. Time performance comparison with the existing methods.
Table 1. Time performance comparison with the existing methods.
PerformanceEzpeleta et al. [43]Li and Zhou [44]Kaid et al. [6]The Proposed Method
M1 utilization (%)29.0529.0529.6029.05
M2 utilization (%)29.6129.6130.5029.61
R1 utilization (%)48.0448.0447.5648.04
Throughput (parts)34343434
Throughput time (min/part)14.1214.1214.1214.12
Table 2. The Specifications of S3PR net illustrated in Figure 16 under configurations.
Table 2. The Specifications of S3PR net illustrated in Figure 16 under configurations.
ParameterConfiguration
An Initial S3PR NetRemoval of an Old MachineAddition of a New ProductRework
No. of monitors53510
No. of arcs21122648
LivenessLiveLiveLiveLive
BoundednessBoundedBoundedBoundedBounded
ReversibilityReversibleReversibleReversibleReversible
Table 3. Required monitors using Algorithm 2 of the system illustrated in Figure 16 under configurations.
Table 3. Required monitors using Algorithm 2 of the system illustrated in Figure 16 under configurations.
ConfigurationiSiphonVSiVSiMRCo (Vsi)
An initial S3PR net1S1t7,t13t1,t95
2S2t4,t5,t13t1,t112
3S3t7,t13t1,t94
4S4t7,t11t1,t93
5S5t4,t13t2,t111
Removal of an old machine1S1t4,t13t1,t91
2S2t7,t11t4,t93
3S3t7,t13t1,t94
Addition of a new product1S1t11,t17t10,t151
2S2t4,t13,t17t1,t10,t152
3S3t4,t13t1,t91
4S4t7,t11,t17t4,t9,t153
5S5t7,t13,t17t1,t9,t154
Rework1S1t7t6,t191
2S2t20t62
3S3t6,t20t71
4S4t7,t11,t17t4,t9,t15,t193
5S5t7,t13,t17t1,t9,t15,t194
6S6t11,t17,t20t4,t9,t154
7S7t13,t17,t20t1,t9,t155
8S8t11,t17t8,t151
9S9t4,t13,t17t1,t10,t152
10S10t4,t13t1,t91

Share and Cite

MDPI and ACS Style

Kaid, H.; Al-Ahmari, A.; Li, Z.; Davidrajuh, R. Automatic Supervisory Controller for Deadlock Control in Reconfigurable Manufacturing Systems with Dynamic Changes. Appl. Sci. 2020, 10, 5270. https://doi.org/10.3390/app10155270

AMA Style

Kaid H, Al-Ahmari A, Li Z, Davidrajuh R. Automatic Supervisory Controller for Deadlock Control in Reconfigurable Manufacturing Systems with Dynamic Changes. Applied Sciences. 2020; 10(15):5270. https://doi.org/10.3390/app10155270

Chicago/Turabian Style

Kaid, Husam, Abdulrahman Al-Ahmari, Zhiwu Li, and Reggie Davidrajuh. 2020. "Automatic Supervisory Controller for Deadlock Control in Reconfigurable Manufacturing Systems with Dynamic Changes" Applied Sciences 10, no. 15: 5270. https://doi.org/10.3390/app10155270

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop