**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, *p* ∈ *S. p* is marked at marking *M* and satisfies *<sup>p</sup>*∈*<sup>S</sup> M*(*p*) ≥ 1, since all *<sup>t</sup>* ∈ *TRC* are live. For all *<sup>t</sup>* ∈ *TRC*, if for all *<sup>p</sup>* <sup>∈</sup> •*t*, *MRCo*(*p*) <sup>&</sup>gt; *<sup>0</sup>*, then *<sup>t</sup>* 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.

**Figure 12.** Reachable markings of a controlled reconfigurable S3PR net, as illustrated in Figure 8.

#### *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 *M* <sup>∈</sup> *R*(*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 δ = *t*<sup>1</sup> *t*<sup>2</sup> *t*<sup>3</sup> ... *tn* that can be fired, and markings *M*1*, M*2*, M*3*,* ... *, and Mn*−<sup>1</sup> are such that *MRCo*[*t*1*M1*[*t*2*M*2[*t*3*M*<sup>3</sup> ... *Mn*−1[*tnM*, expressed as *MRCo*[δ*M*, agrees with the state equation *M* = *MRCo* + [*NRC*] → δ . In addition, *M* and *MRCo* satisfy all place invariants, *I <sup>T</sup>*.*M* = *I <sup>T</sup>*.*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}, *Ii <sup>T</sup>*. [*NRC*] = 0*T*. *M6* ∈ *R*(*NRC, MRCo*), *I1 <sup>T</sup>*.*M6*=*I1 <sup>T</sup>*.*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*M*2[*t*3*M*3[*t*4*M*4[*t* <sup>5</sup>*M*6[*t* <sup>6</sup>*MRCo*. Therefore, the reconfigurable S3PR net (*NRC, MRCo*) is live, bounded, and reversible.

**Figure 13.** Reachable markings of a controlled reconfigurable S3PR net, as illustrated in Figure 7.

#### *4.4. Computational Complexity*

Algorithm 1 is used to design a reconfigurable S3PR net with *NR* = ((*N, Mo*), <sup>R</sup>). In addition, Algorithm 2 computes the control places to a reconfigurable S3PR net with *NR* <sup>=</sup> ((*N, Mo*), <sup>R</sup>).

**Theorem 10.** *Given a reconfigurable S3PR net with NR* <sup>=</sup> *((N, Mo),* R*), where NR with Nk* <sup>=</sup> *(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*), R = {*rr1*, *rr2*, *rr3*, ... , *rrk*}, *rrk* = {*Lk*, *Rk*, ϕ*k*, •ϕ*k*, ϕ*<sup>k</sup>* •}, and net (*NR, MRo*) be the obtained reconfigurable S3PR net. Let *<sup>x</sup>* be the cardinality of <sup>R</sup>, i.e., |R| = *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* <sup>=</sup> *((N, Mo),* R*), where NR with Nk* <sup>=</sup> *(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 R, i.e., |R| = *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.

**Table 1.** Time performance comparison with the existing methods.


**Figure 14.** Comparison of the proposed method with the existing methods.
