Intelligent Colored Token Petri Nets for Modeling, Control, and Validation of Dynamic Changes in Reconfigurable Manufacturing Systems

: The invention of reconfigurable manufacturing systems (RMSs) has created a challenging problem: how to quickly and effectively modify an RMS to address dynamic changes in a manufacturing system, such as processing failures and rework, machine breakdowns, addition of new machines, addition of new products, removal of old machines, and changes in processing routes induced by the competitive global market. This paper proposes a new model, the intelligent colored token Petri net (ICTPN), to simulate dynamic changes or reconfigurations of a system. The main idea is that intelligent colored tokens denote part types that represent real ‐ time knowledge about changes and status of a system. Thus, dynamic configurations of a system can be effectively modeled. The developed ICTPN can model dynamic changes of a system in a modular manner, resulting in the development of a very compact model. In addition, when configurations appear, only the changed colored token of the part type from the current model has to be modified. Based on the resultant ICTPN model, deadlock ‐ free, conservative, and reversible behavioral properties, among others, are guaranteed. The developed ICTPN model was tested and validated using the GPenSIM tool and compared with existing methods from the literature.


Introduction
A manufacturing system (MS) is a conglomeration of robots, machine tools, fixtures, and buffers. Several types of products enter the MS at separate points in time. The system can process these parts based on a specified sequence of operations and resource sharing. In the competitive global market, MSs must handle unpredictable and rapid market changes. To cope with these dynamic changes, MSs need to execute quick changes in their software and hardware. Nevertheless, traditional manufacturing systems cannot successfully meet this requirement because they need large capital investments. To tackle these drawbacks in traditional manufacturing systems, reconfigurable manufacturing systems (RMSs) were developed [1][2][3]. RMSs are a new class of manufacturing systems and are subject to dynamic and random configurations in real time. These changes include processing failures and rework, machine breakdowns, addition of new machines, addition of new products, removal of old machines, and changes in processing routes.
To address the dynamic change problem in manufacturing systems, several approaches with Petri nets have been proposed. The study of Reference [4] presented a new higher-level deadlock control technique for the serial and parallel configuration of RMSs. RMSs have been used to replace this paper is to propose an intelligent colored token Petri net (ICTPN) based on a knowledge base for a rapid and valid reconfiguration-based Petri net for RMS. The main idea is to use colored tokens denoting part types that represent real-time knowledge about the changes and status of a system. The knowledge is introduced in the transitions, and the transitions know where the colored tokens should be located based on their colors and knowledge. The proposed ICTPN will cope with dynamic changes such as processing failures and rework, machine breakdowns, addition of new machines, addition of new products, removal of old machines, and change processing routes. The proposed ICTPN will ensure that the PN's behavioral properties, i.e., boundedness, liveliness, and reversibility, indicate that the modeled MS has finite states, is deadlock-free, and operates cyclically, respectively.
The proposed ICTPN can be implemented to Mass Customization Manufacturing (MCM) to solve its challenges, such as attempting to make the products available to customers in a timely manner, keeping high-quality production of a high variety of products, and achieving costs low to match those of standardized products. It can be introduced to the Lean Production (LP) concept, so that a company can apply an RMS to optimize the use of the part of resources for particular product families, and it can also decrease the waste induced by the part of an RMSʹs idle resources. It can be applied for Agile Manufacturing (AM) to increase rapid changeover between products, rapid introduction to new products and unattended operation. It can be implemented to Flexible Manufacturing System (FMS) to increase the speed of responsiveness to a variety of markets and customers. In addition, increasing the scalability to the required products volume and convertibility to the existing systems, machines, robots, and controls to match new production specifications.
The rest of the paper is organized as follows. Section 2 describes the ICTPN and synthesis. Section 3 explains how to model dynamic configurations by ICTPN. Section 4 describes the qualitative and quantitative properties of ICTPNs. Finally, Section 5 presents the conclusions and future research.

Definition of Intelligent Colored Token Petri Nets
Traditional Petri nets are popularly used to model, simulate, control, and analyze automated manufacturing systems (AMSs). Existing traditional Petri net studies assumed one or more of the following: (1) the system configuration is recognized and does not change throughout the operation, (2) there is no addition of new machines and no removal of old machines, and machine failures are not addressed, (3) rework is not required, and (4) products to be manufactured are identified, their process routes are specified, and the addition of new products is not applicable [13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31][32]. This means that traditional Petri net models do not undergo dynamic configurations, such as processing failures and rework, machine breakdowns, addition of new machines, addition of new products, removal of old machines, or change processing routes induced by the competitive global market. Therefore, an ICTPN based on a knowledge base for a rapid and valid reconfiguration-based Petri net for an RMS is proposed to deal with such dynamic changes. The main idea is that colored tokens denote part types that represent real-time knowledge about the changes and status of a system. Transitions know where the colored tokens should be located based on their colors and knowledge. Definition 1: Let N = (PA ∪ {po} ∪ {pr}, T, F, W, Mo, K) be a finite-capacity Petri net, where po is a common load/unload place that represents a part type to be processed in the system, pr is a common transportation resource that represents transportation resources in the system, and PA = {p1, p2, p2,…, pm} is a set of operation resources and PA ∩ {pr} = ∅. T is a finite non-empty set of transitions. F ⊆ (P × T) ∪ (T × P) is said to be a set of directed arcs of N that join the places to transitions or transitions to  Gf, If), where PA, po, pr, T, F, W, Mo, and K are defined in Definition 1. SC is a color set that contains colors ci and the operations on the colors. Cf is the color function that maps pi ∈ PC into colors ci ∈SC. Nf is the node function that maps F into (P × T) ∪ (T × P). Af is the arc function that maps each flow (arc) f ∈F into the term e. Gf is the guard function that maps each transition ti ∈ T to a guard expression g that has a Boolean value. If is the initialization function that maps each place pi ∈ PC into an initialization expression.
to the number of appearances of t in δ and is called a Parikh vector or a firing count vector.

Design of Intelligent Colored Token Petri Nets
In AMS, let OR = {OR1, OR2, OR3, …, ORn} be all possible routes and should be manufactured in a system for all types of parts PT, where ORi is Ro → Ri1 → Ri2 → ……→ RiFi → Ro, n, Fi are large integer numbers, Ro denotes a load/unload station of the system with infinite capacity, and Ri(i ≠ 0) may be a buffer or machine, which is named an operation resource. An operation route starts from Ro and ends at Ro. For each part, if there exists more than one operation route such that Ri → Rj(i ≠ j), it is said that there is a path from Ri to Rj. When a part transfers from Ri to Rj, namely it is transported by a material handling device, such as an AGV or robot that is named a transportation resource.
In Definition 4, Ψ(p, cpi, cti, d) knows where colored tokens cpi and cti should go based on their colors and knowledge and knows the system configuration and the state of the tokens themselves. Because of this, cpi and cti are named intelligent colored tokens. An approach can be used to synthesize the ICTPN irrespective of how complicated the system operation routes are.
According to part routing information and transportation requirements, the modeling of operation and transportation resources is stated as follows:

Algorithm 1: Modeling operation and transportation resources
Initialization: Build a common load/unload place po and common transportation resource place pr, π = {Ro}, c = 0, j=0, and h = 0.  Output: The ICTPN model To demonstrate the synthesis of an ICTPN, consider an AMS example, shown in Figure 1(a). The AMS Petri net model is given in Chen et al. [33], Piroddi et al. [34], Chen and Li [35], Chen et al. [36], and Kaid et al. [37]. The system is composed of four machines (M1, M2, M3 and M4; each machine can process one part at a time) and two robots (Ro1 and Ro2; each robot can hold a part at a time). There is a loading/unloading buffer. Two part-types, A and B, are considered to be processed in the system. The operations sequences of these two part-types are shown in Figure 1(b). The operation and transportation resources model is shown in Figure 2, for operation resources, p1, p2, p3, and p4 model M1, M2, M3, and M4, respectively. The process route of Part A is constructed by , for transportation resources, common place pr models Ro1 and Ro2.
Note that in ICTPN, transition t has one input place from p ∈ PA, one input place from pr, one output place to p ∈ PA, and one output place to pr. Next, to define the initial marking of the system, place tokens with colors into place po such that Mo(po) = { cp1, cp2 }, where cp1 and cp2 denote a part type A and part type B, respectively. Place tokens with colors into place pr such that Mo(pr) = { ct1, ct2 }, where ct1 and ct2 denote transportation resources in the system Ro1 and Ro2, respectively.  Consider the ICTPN model shown in Figure 2. If the condition given in Definition 6 is satisfied, then we can say that t is enabled by cpi and cti. By Definition 9, the marking of the ICTPN can be changed as follows. When transition t011A (Ψ(po , pr, cp1, ct1, d011A )) fires for duration d011A, it selects only one token with color cp1 from input place po and one token with color ct1 from input place pr. If t011A fires, then it transfers only one token with color cp1 to output place p1 and one token with color ct1 to output place pr. When transition t022A (Ψ(po, pr, cp1, ct1, d022A)) fires for duration d022A, then it selects only one token with color cp1 from input place po and one token with color ct1 from input place pr. If t022A fires, it transfers only one token with color cp1 to output place p2 and one token with color ct1 to output place pr. When transition t040B (Ψ(po, pr, cp2, ct2, d040B)) fires for duration d040B, then it selects only one token with color cp2 from input place po and one token with color ct2 from input place pr. If t040B fires, it transfers only one token with color cp2 to output place p4 and one token with color ct2 to output place pr. In addition, if transition t130A (Ψ(p1, pr, cp1, ct1, d130A)) fires for duration d130A, it selects only one token with color cp1 from input place p1 and one token with color ct1 from input place pr. If t130A fires, it transfers only one token with color cp1 to output place p3 and one token with color ct1 to output place pr. Moreover, when transition t230A (Ψ(p2, pr, cp1, ct1, d230A)) fires for duration d230A, it selects only one token with color cp1 from input place p2 and one token with color ct1 from input place pr. If t230A fired, it transfers only one token with color cp1 to output place p3 and one token with color ct1 to output place pr. If transition t420B (Ψ(p4, pr, cp2, ct1, d420B)) fires for duration d420B, it selects only one token with color cp2 from input place p4 and one token with color ct1 from input place pr. If t420B fires, it transfers only one token with color cp2 to output place p2 and one token with color ct1 to output place pr. Then, when transition t200B (Ψ(p2, pr, cp2, ct1, d200B)) fires for duration d200B, it selects only one token with color cp2 from input place p2 and one token with color ct1 from input place pr. If t200B fires, it transfers only one token with color cp2 to output place po and one token with color ct1 to output place pr. Finally, if transition t300A (Ψ(p3, pr, cp1, ct2, d300A)) fires for duration d300A, it selects only one token with color cp1 from input place p3 and one token with color ct2 from input place pr. If t300A fires, it transfers only one token with color cp1 to output place po and one token with color ct2 to output place pr.

Machine Breakdowns
In an automated manufacturing system, the breakdown of its machines is usually caused by quality out-of-control signals, missing or defective part programs or tools, damaged tools, or the failure of sensing and actuating systems. For example, if a machine breakdown is detected, the operations that use the broken machine need to be performed by another machine. In this case, some processing routes are changed, which implies a modification to the structure of its Petri net model. Reconsider the ICTPN model shown in Figure 2. There are four machine tools, denoted by p1, p2, p3, and p4. Assume that p1 is down and p4 will perform the operations that were previously performed by itself and performed by p1. Therefore, the structure of the ICTPN model is changed and will be redesigned such that the system with the removal of resource p1 can operate continuously without stoppage. Hence, to model the reconfigured system, consider the following procedures: Step 1: Disable the transitions connected to the place corresponding to the breakdown machine and remove or disable this place p1.
Step 2: Change the names of transitions based on new machine p4 Step 3: Change the operation route from Step 4: Connect the transitions to the new machine p4.
Step An ICTPN for the reconfigured system by machine breakdowns is shown in Figure 3.

Addition of New Product
The second automated manufacturing system reconfiguration involves the addition of a new product. When a new product is added to a system, it means that a new route is added, which implies a modification to the structure of its Petri net model. To model the newly added route by using the ICTPN synthesis procedure, reconsider the ICTPN model shown in Figure 2. Assume that a new product part C is added. It processing route is constructed by load/unload station → M4 → M3 → load/unload station. To transport part C between the load/unload station and M4, Ro2 is needed, and to transport part C between M4 and M3, Ro1 is needed. Hence, to model the reconfigured system, consider the following procedures: Step 1: Add a new operation route from po → t040C → p4→ t430C → p3 → t300C → p0.
Step 2: Add the transportation operation of part C. Transition t040C denotes loading part C to p4, and Ro2 is needed; t430C denotes transporting part C to p3 and Ro1 is needed. Transition t300C denotes unloading part C from p3 and Ro2 is needed. These operations can be done by common place pr.
Step 4: Place the token with color cp3 into place po, which denotes a part C that will be processed in the system.
An ICTPN for the reconfigured system by the addition of a new product is shown in Figure 4.

Addition of New Machine
The third system reconfiguration includes the addition of a new machine. In this case, a new machine is added to the system. Operations for new or used parts are conducted by the newly added machine. Moreover, new job processing routes can be generated, which implies the modification of the structure of the Petri net model. To model the newly added machine by using the ICTPN synthesis procedure, new places and transitions can be added based on the original ICTPN.
Consider the ICTPN model shown in Figure 2. Assume that a new machine M5 is added to process part B. The processing route of part B is constructed by load/unload station → M4 or M5 → M2→ load/unload station. To transport part B between the load/unload station and M4 or M5, Ro2 is needed, and to transport part B between M4 or M5 and M2, Ro1 is needed. Hence, to model the reconfigured system, consider the following procedures: Step 1: Add process routes of part B as route 1 : Step 2: Add the transportation operation of part B. Transitions t041B and t052B denote loading part B to p4 and p5, respectively, where Ro2 is needed; t420B and t520B denote transporting part B to p2, where Ro1 is needed; these operations can be done by common place pr.
Step An ICTPN for the reconfigured system with the addition of a new machine is shown in Figure 5.

Removal of Old Machine
The fourth system reconfiguration includes the removal of an old machine. This indicates that the operations that use the removed machine need to be performed by another machine. Thus, some processing routes are changed, which implies a modification to the structure of its Petri net model. Reconsider the ICTPN model shown in Figure 2. Assume that machine 1 p1 is removed from the system, and p2 will perform the operations that are previously performed by itself and performed by p1. Therefore, the structure of the ICTPN model is changed and will be re-designed, such that the system with the removal of machine p1 can operate continuously without stoppage. Hence, to model the reconfigured system, consider the following procedures: Step 1: Delete all the transitions connected to the place corresponding to the removed machine p1 and remove this place p1.
Step 3: Delete the old knowledge function of transitions based on removed machine p1.
An ICTPN for the reconfigured system by removal of an old machine is shown in Figure 6.

Change Processing Routes
The fifth system reconfiguration includes the change of processing routes. In this case, processing routes of parts are changed in the system, which implies a modification of the structure of its Petri net model. Reconsidering the ICTPN model shown in Figure2, assume that the processing route of part A changes from po → p1→ p3 → p0, or po → p2 → p3 → p0 to po → p4→ p3 → p0, or po → p2 → p3 → p0, and the processing route of part B changes from po→ p4 → p2 → p0 to po→ p1 → p2 → p0. Therefore, the structure of the ICTPN model is changed and redesigned, such that the system works with changed processing routes. Hence, to model the reconfigured system, consider the following procedures: Step 1: Change the names of transitions based on processing routes.
Step 2: Change the operation route of part A from po Step 3: Change the operation route of part A from po Step 4: Update the knowledge function of transitions based on removed machine p1. p1, pr, cp2, ct1, d120B ) An ICTPN for the reconfigured system by the removal of an old machine is shown in Figure 7.   Figure 7. An ICTPN for the reconfigured system by removal of an old machine.

Rework
The sixth system reconfiguration includes rework. In this case, a part may be inspected when some of its operations are finished. If the reconfiguration is performed properly, then the system will continue based on an original route. Otherwise, rework is required. By using an ICTPN, the manufacturing operations of the reworked part can be easily and exactly modeled by considering rework operations as alternative routes. Reconsider the ICTPN model shown in Figure 2. Assume that M3 is an inspection machine and that part A is processed in M1 or M2. Then, part A is transported to an inspection machine M3 by Robot 1 to determine if there are defects in part A. If part A performs properly, then it will depart the system by Robot 2. Otherwise, if part A has defects, rework is required, and part A is removed and transported to M1 by Robot 2. Thus, part A has four possible routes: 1. Load-unload station → M1 → inspection machine M3 → load-unload station, 2. Load-unload station → M2 → inspection machine M3 → load-unload station, 3. Load-unload station → M1 → inspection machine M3 → M1 → inspection machine M3 → load-unload station, or 4. Load-unload station → M2→ inspection machine M3 → M1 → inspection machine M3 → load-unload station. Therefore, to model two routes by using the ICTPN synthesis procedure, a new transition can be added based on the original ICTPN. Hence, to model the reconfigured system, consider the following procedures: Step 1: Add the process routes of part B as route 1: Step 2: Add the knowledge function of transition based on rework: p3 , pr, cp1, ct2, d310B ) An ICTPN for the reconfigured system by rework is shown in Figure 8.

Deadlock
A deadlock is a situation in which each process in a set of processes enters a waiting state because a requested resource is being held by another waiting process, which in turn is waiting for another resource. Thus, deadlocks should be avoided or prevented.  Ψ(p, cpi, cti, d)), and is deadlock-free (live).
Proof: There is a need to prove that all transitions T in the ICTPN are live. It does not matter how the system changes. For all t ∈ T, if ∀pi ∈ • t and MC(pi) > 0, then t can fire in any case because it is uncontrollable. □ To demonstrate the liveness of an ICTPN, consider the ICTPN model shown in Figure 2. Figure  9 shows the reachability graph of the ICTPN, and the system is live.

Reversibility
An ICTPN is reversible if its initial marking can be reached from any other reachable marking. Theorem 2: Assume that: (1) in an ICTPN, any part type has at least a route Ro → R1 → R2 → R3 ……→ Rn → Ro to complete it, and (2) after any reconfiguration, assumption 1 is still met. Then, the ICTPN that builds the configurations of the system is reversible.
Proof: The dynamic changes in an AMS can be effectively constructed by an ICTPN, and the system can be controlled to be reversible if the suppositions given in Theorem 2 are met. Suppositions 1 and 2 ensure that for any cpi, there is at least a route Ro → R1 → R2 → R3 ……→ Rn → Ro that starts from po, moves through some operation places other than po, and ends at po. It does not matter how the system is modified. Hence, the operation places can always be unmarked or are reversible. □ To demonstrate the reachability of an ICTPN, consider the ICTPN model shown in Figure 2. Figure 9 shows the reachability graph of the ICTPN, and the system is reversible.

Structural Complexity
The structural complexity depends on the fact that Algorithm 1 can model an ICTPN N = (PA ∪ {po} ∪ {pr}, T, F, W, Mo, K, and Ψ(p, cpi, cti, d)) with fewer places, transitions, and arcs, which leads to a decrease in software and hardware costs. First, we compare the results of the ICTPN model of Figure  2 with the traditional PN methods in the studies of Chen et al. [33], Piroddi et al. [34], Chen and Li [35], Chen et al. [36], and Kaid et al. [37]. Table 1 lists the results for the numbers of idle process places, operation places, resource places, transportation places, transitions, monitors, arcs, as well as liveness, and reachable markings. We observe that the proposed ICTPN model is minimal compared with other techniques used by Chen et al. [33], Piroddi et al. [34], Chen and Li [35], Chen et al. [36], and Kaid et al. [37].

Validation and Behavioral Permissiveness of ICTPN Model
To test and validate the developed ICTPN model, we coded an ICTPN model using the GPenSIM tool [37,38], and the code is validated and compared with Chen et al. [33], Piroddi et al. [34], Chen and Li [35], Chen et al. [36], and Kaid et al. [37]. We created three files: (1) the Petri net definition file (PDF), which defines the static ICTPN model by declaring the sets of places, transitions, and arcs, (2) the common processor file (COMMON_PRE file), which defines the conditions for the enabled transitions to start firing based on the intelligent colored tokens, and (3) the main simulation file (MSF) to compute the simulation results. The GPenSIM code was also built in MATLAB.
Behavioral permissiveness leads to the better time performance in an ICTPN, such as utilization of the robots and machines, total throughput, work-in-process (WIP), and total time in system (throughput time). The simulation was undertaken for 480 min. After running and simulating the ICTPN model in MATLAB, we obtained the results summarized in Table 2. Table 2 illustrates the results in terms of the aforementioned time performance criteria. In terms of the resource utilization, overall, the proposed model can obtain better utilization than the other techniques, as illustrated in Figure 10. Moreover, from the viewpoint the throughput, the proposed model can provide greater throughput than the other techniques, as illustrated in Figure 11. With respect to the throughput time per part, the proposed model can obtain less throughput time than other techniques, as illustrated in Figure 12. Finally, in terms of WIP, the proposed model leads to better WIP than the other techniques, as illustrated in Figure 13.   Chen et al. [33] Piroddi et al. [34] Chen and Li [35] Chen et al. [36] Kaid et al. [37] Proposed method   Each sub-route R requires place pa that corresponds to Ri(j-1), place pa that corresponds to Rij, and transition t, an arc from pa to t, an arc from t to pb, an arc from common place pr to t, and an arc from t to common place pr. Note that one common transportation resource pr is added and represents all transportation resources in the system. Therefore, let x be the number of possible routes, OR, i.e., |OR| = x. The number of each sub-route Fi is expressed by y, i.e., | Fi | = y. The number of corresponding places, transitions, and arcs to each sub-route is expressed by I, i.e., |I| = z. The number of transportation resources pr is 1, i.e., |pr| = 1. The "FOR loop" is executed (xyz) times to model an ICTPN. Thus, the computational complexity is O(xyz). In the proposed algorithm by Wu and Zhou [6], all transportation resources are required to be added; thus, the number of transportation resources pri is expressed as k, i.e., |pri| = k. Therefore, the computational complexity of the proposed algorithm in the study of Wu and Zhou [6] is O(xyz + k). Thus, Algorithm 1 has minimal computational complexity compared with that of Wu and Zhou [6] and can be implemented in a large-scale system. In fact, Algorithm 1 has polynomial time complexity.

Conclusions
This paper presented a new model named an intelligent colored token Petri net for automatic reconfiguration of RMS to face the dynamical changes in the manufacturing system. The main idea is that intelligent colored tokens denote product types that represent real-time knowledge about changes and status of a system. Thus, dynamical configurations of a system can be effectively modelled. The developed ICTPN can model dynamical changes of a system in a modular manner, resulting in an easily compact model. In addition, when configurations appear, only the changed colored token from the current model has to be modified. The developed ICTPN model was tested and validated using the GPenSIM tool and compared with the existing methods from the literature.
The main advantages of the proposed method are: (1) The proposed ICTPN model is more powerful, has a simpler structure, does not need to calculate reachability graphs, and has lowoverhead computation compared with Chen et al. [ Chen et al. [33] Piroddi et al. [34] Chen and Li [35] Chen et al. [36] Kaid et al. [37] Proposed method WIP Work-In-Process al. [36], and Kaid et al. [37]. (2) It can easily handle any dynamical changes in RMS compared with Lee and Tilbury [4], Li et al. [5], and Wu and Zhou [6]. (3) It can obtain one common transportation resource place to transport all part types compared with Wu and Zhou [6]. (4) GPenSIM code is developed for simulation, validation, and performance comparison compared with Li et al. [5], and Wu and Zhou [6]. (5) The proposed ICTPN model can dynamically change the structure of a PN without damaging its behavioral properties, i.e., liveness, conservativeness, boundedness, and reversibility. (6) We provided a representation of a RMS configuration and presented an ICTPN model for designing a modular. (7) The proposed ICTPN model can be applicable to other types of complex AMSs such as semiconductor fabrication system and liquid-crystal display factory, including automated storage and retrieval systems, automated guided vehicle, and machines. (8) The proposed ICTPN model can consider systems with sequential and complex resource requirements. The main limitation of the proposed method is that the the ICTPN model lacks an efficient conversion method from the ICTPN model into industrial control languages for application. Therefore, our future research will investigate the proposed model to have an automatic way to test the applicability of the ICTPN model for real world systems. It is crucial to come up with a means to convert the ICTPN model into ladder diagrams (LDs) for implementation on programmable logic controllers (PLCs) [24], using adaptive control techniques [39], or using surveillance systems [40]. We will also consider to model and schedule automated manufacturing systems [41] and social networks [42] using the proposed model methodology.