**3.2. Crucial MTSI (CMTSI)**

Two types of CMTSIs are defined as follows.

*Definition 7*: Type I CMTSI: = {(*M, t*)|*M ML*, *t T*, and *M MD*, *M ML*, and *t T* such that *M* [*t* > *M* and *M* [*t* > *M*}. Denote the set of all the dead markings related to as *M'D*, i.e., *MD* = {*M MD* | (*M*, *t*) such that *M* [*t M*}. They are called type I deadlocks.

Definition 7 explains a legal marking that can evolve into a dead or legal zone as shown in Figure 1 through a single transition's firing. For those dead markings that are not type I deadlocks, we need to introduce Type II CMTSI and deadlocks.

*Definition 8*: A zone consisting of all type I deadlocks (*M'D*) is called type I dead zone, denoted by *Z*.

*Definition 9*: k is defined as a transition firing sequence starting in a quasi-dead marking (*MQ*) and ending in a deadlock marking in *MD* where *i* = |σ*k*| is the number of transitions in *σk*, called its length. Denote a firing sequence with the shortest length (i.e., smallest *i*) from any quasi-dead marking to *M'* as σ\* (*M'*) given *M' MD –M'D*.

*Definition 10*: Type II CMTSI : = {(*M*, *t*)|*M ML*, *t T*, and *M MQ*, *M ML*, *M MD, t T*, and a firing sequence σ *=* σ\* (*M* ) from *M* to *M* such that *M* [*t* > *M* , *M* [*t* > *M*, and *M* [σ > *M*}. The set of dead markings associated with Type II CMTSI is denoted as *M"D*, called type II deadlocks. *MD* = {*M MD* | (*M*, *t*) , *M MQ* and a firing sequence from *M* to *M* such that *M*[*tM* and σ *=* σ\* (*M*)}.

**Figure 1.** A structure of Type I CMTSI.

*Definition 11*: A zone consisting of all type II deadlocks (*MD*) is called type II dead zone, *Z*.

A Type II CMTSI contains a legal marking that cannot reach a dead marking with one single transition's firing as shown in Figure 2. Given a dead marking in *M"D*, the shortest transition firing sequence needs to be found. The main reason is based on the fact that, for a dead marking, the length of the firing sequence from the initial marking to CMTSI is the longest path than those from the initial marking to MTSIs. Hence, the solutions of MTSIs will be totally covered by the solution of CMTSI. For example, as shown in Figure 3, σ\* is the shorter path since |σ\* | < |σ| (i.e. |σ\* | =1 and |σ| = 3).

*Remark 1*: A dead marking is always with its corresponding CMTSI. As a result, the corresponding CMTSI is of either Type I or II. Type I may be viewed as a special case of Type II CMTSI by defining \* = 0 (no need to enter *ZQ* but directly to *ZD*). Type I CMTSI will be processed first in our proposed method. In the following, Theorems 1-3 will help readers to understand how to choose CMTSIs, which are with the same firing sequence of legal markings, from Types I and II.

*Theorem 1*: If a dead marking *M M'D* is associated with two different CMTSIs, only one CMTSI needs to be controlled.

*Proof*: Assume that a dead marking *M* is with both CMTSIs {*Mi*, *tm*} and {*Mj*, *tn*} as shown in Figure 4. According to the state equation, *Mi* + [*N*](•*tm*) = *Mj* + [*N*](•*tn*) = *M*. Arranging the above equation, *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mi* ) + [*N*](•*tm*) = *M*0 + [*N*] (• *<sup>M</sup>*<sup>0</sup> *Mj* ) + [*N*](•*tn*). According to (4), realizing either CMTSI, e.g., {*Mi*, *tm*}, leads to *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mi* ) + [*N*](•*tm*) -1, which in turn implies *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mj* ) + [*N*](•*tn*) -1 and vice versa. Hence, only one CMTSI needs to be controlled.

*Remark 2*: Based on Theorem 1, if a dead marking *M M'D* is associated with more than two CMTSIs, only one of them needs to be controlled.

**Figure 2.** A structure of Type II CMTSI.

56 Petri Nets – Manufacturing and Computer Science

**3.2. Crucial MTSI (CMTSI)** 

.

any quasi-dead marking to *M'* as σ\*

*M"D*, called type II deadlocks. *M*

**Figure 1.** A structure of Type I CMTSI.

 to *M*

*T*, and a firing sequence σ *=* σ\*

and *M* [*t*

that *M* [*t* > *M*

denoted by *Z*

i.e., *MD* = {*M*

*MD, t*

and *M*[σ > *M*

sequence from *M*

Two types of CMTSIs are defined as follows.

*Definition 7*: Type I CMTSI: = {(*M, t*)|*M ML*, *t T*, and *M*

*MD* | (*M*, *t*) such that *M* [*t M*

deadlocks, we need to introduce Type II CMTSI and deadlocks.

*Definition 10*: Type II CMTSI : = {(*M*, *t*)|*M ML*, *t T*, and *M*

*D* = {*M*

such that *M*[*tM*

(*M*

zone (i.e. quasi-dead and dead markings) from *R*(*N*, *M*0) if one wants to obtain the maximally permissive behavior. Ghaffari *et al.* propose the MTSI method to achieve their deadlock prevention based on the theory of regions13. However, the set of all MTSIs from the reachability graph must be identified. As a result, we can conclude that their method is computationally inefficient. A more efficient method is thus needed as described next.

> *MD*, *M*

> *M*}. Denote the set of all the dead markings related to as *M'D*,

Definition 7 explains a legal marking that can evolve into a dead or legal zone as shown in Figure 1 through a single transition's firing. For those dead markings that are not type I

*Definition 8*: A zone consisting of all type I deadlocks (*M'D*) is called type I dead zone,

*Definition 9*: k is defined as a transition firing sequence starting in a quasi-dead marking (*MQ*) and ending in a deadlock marking in *MD* where *i* = |σ*k*| is the number of transitions in *σk*, called its length. Denote a firing sequence with the shortest length (i.e., smallest *i*) from

(*M'*) given *M' MD –M'D*.

 to *M*

}. The set of dead markings associated with Type II CMTSI is denoted as

*MD* | (*M*, *t*) , *M*

(*M*)}.

) from *M*

and σ *=* σ\*

}. They are called type I deadlocks.

*MQ*, *M*

such that *M* [*t* > *M*

*ML*, and *t*

*ML*, *M*

> , *M* [*t*> *M*,

*MQ* and a firing

*T* such

A Computationally Improved Optimal Solution

*r* 

) [*N*](•

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 59

*<sup>q</sup>* are two different quasi-dead markings if [*N*](• \*

). It hints the two event separation condition equations are different. As a result, both

one can infer that *M*

CMTSIs need to be controlled.

\* *s* 

*p* and *M*

**Figure 4.** A type I deadlocks associated with two CMTSIs.

**Figure 5.** Two CMTSIs connected to the same quasi-dead marking.

*Definition 12*: A legal marking *M ML* can be led to a quasi-dead marking *Mq* via a single transition firing. *Mq* must eventually evolve to a dead one *Md* (i.e. *Md MD*) after a sequence

*n* = *t1t2…tn* fires. Denote the set of all the markings on the path from *Mq* to *Md* as *Mq-d*.

**Figure 3.** The shorter path σ\* in Type II CMTSI given a dead marking.

*Theorem 2*: If a dead marking *M M<sup>D</sup>*, is associated with two CMTSIs whose markings can reach a same quasi-dead marking *M'* via their respective single transition's firing, only one CMTSI needs to be controlled.

*Proof*: Assume that a dead marking *M* is associated with Type II CMTSIs {*Mp*, *tr*} and {*Mq*, *ts*}. *Mp* and *Mq* reaches a quasi-dead markings *M'* via *tr* and *ts*'s firing, respectively as shown in Figure 5*.* 

According to the state equation, *Mp* + [*N*](•*tr*) + [*N*](• \* ) = *Mq* + [*N*](•*ts*) + [*N*](• \* ) *M*. Arranging the above equation, one can realize that *Mp* + [*N*](•*tr*) = *Mq* + [*N*](•*ts*). According to (4), realizing either CMTSI, e.g., {*Mp*, *tr*}, leads to *M*0 + [*N*] (• *<sup>M</sup>*<sup>0</sup> *Mp* ) + [*N*](•*tr*) -1, which in turn implies *M*0 + [*N*] (• *<sup>M</sup>*<sup>0</sup> *Mq* ) + [*N*](•*ts*) -1 and vice versa. Hence, only one CMTSI needs to be controlled.

*Theorem 3*: A dead marking *M M<sup>D</sup>*, is associated with two CMTSIs whose markings can reach two different quasi-dead markings *Mp* and *M<sup>q</sup>* via two different single transitions' firing. Both need to be controlled if [*N*](• \* *r* ) [*N*](• \* *s* ).

*Proof*: Assume that a dead marking *M* is associated with both Type II CMTSIs {*Mp*, *tr*} and {*Mq*, *ts*}. *Mp* and *Mq* reach two different quasi-dead markings *Mp* and *M<sup>q</sup>* via *tr* and *ts*'s firing, respectively as shown in Figure 6*.*

According to the state equation, *Mp* + [*N*](•*tr*) + [*N*](• \* *r* ) = *Mq* + [*N*](•*ts*) + [*N*](• \* *s* ) = *M"D*. Arranging the above equation, *M<sup>p</sup>* + [*N*](• \* *r* ) = *<sup>M</sup><sup>q</sup>* + [*N*](• \* *s* ). Since [*N*](• \* *r* ) [*N*](• \* *s* ),*<sup>M</sup>p* is not equal to *M<sup>q</sup>*. And also according to the definition of the event separation condition equation, the first set of CMTSI {*Mp*, *tr*} leads to the first event separation condition equation is *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mp* ) + [*N*](•*tr*) -1; and the second set of CMTSI {*Mq*, *ts*} leads to the another event separation condition equation is *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mq* ) + [*N*](•*ts*) -1. Hence, one can infer that *Mp* and *M<sup>q</sup>* are two different quasi-dead markings if [*N*](• \* *r* ) [*N*](• \* *s* ). It hints the two event separation condition equations are different. As a result, both CMTSIs need to be controlled.

**Figure 4.** A type I deadlocks associated with two CMTSIs.

58 Petri Nets – Manufacturing and Computer Science

**Figure 3.** The shorter path σ\*

Figure 5*.* 

\* *s* 

 ),*<sup>M</sup>*

*Theorem 2*: If a dead marking *M M*

which in turn implies *M*0 + [*N*] (• *<sup>M</sup>*<sup>0</sup> *Mq*

reach two different quasi-dead markings *M*

firing. Both need to be controlled if [*N*](• \*

CMTSI needs to be controlled.

CMTSI needs to be controlled.

*Theorem 3*: A dead marking *M M*

respectively as shown in Figure 6*.*

Arranging the above equation, *M*

equation is *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mp*

*p* is not equal to *M*

in Type II CMTSI given a dead marking.

reach a same quasi-dead marking *M'* via their respective single transition's firing, only one

*Proof*: Assume that a dead marking *M* is associated with Type II CMTSIs {*Mp*, *tr*} and {*Mq*, *ts*}. *Mp* and *Mq* reaches a quasi-dead markings *M'* via *tr* and *ts*'s firing, respectively as shown in

Arranging the above equation, one can realize that *Mp* + [*N*](•*tr*) = *Mq* + [*N*](•*ts*). According

*p* and *M*

*Proof*: Assume that a dead marking *M* is associated with both Type II CMTSIs {*Mp*, *tr*} and

*r* 

condition equation, the first set of CMTSI {*Mp*, *tr*} leads to the first event separation condition

) = *<sup>M</sup>*

) [*N*](• \*

*r* 

*s* 

*r* 

*<sup>q</sup>* + [*N*](• \*

) + [*N*](•*tr*) -1; and the second set of CMTSI {*Mq*, *ts*} leads to

*<sup>q</sup>*. And also according to the definition of the event separation

).

*<sup>D</sup>*, is associated with two CMTSIs whose markings can

) = *Mq* + [*N*](•*ts*) + [*N*](• \*

*<sup>q</sup>* via two different single transitions'

) + [*N*](•*ts*) -1 and vice versa. Hence, only one

*<sup>D</sup>*, is associated with two CMTSIs whose markings can

*p* and *M*

*s* 

) = *Mq* + [*N*](•*ts*) + [*N*](• \*

). Since [*N*](• \*

) + [*N*](•*tr*) -1,

*<sup>q</sup>* via *tr* and *ts*'s firing,

*s* 

*r* 

) + [*N*](•*ts*) -1. Hence,

) = *M"D*.

) [*N*](•

) *M*.

to (4), realizing either CMTSI, e.g., {*Mp*, *tr*}, leads to *M*0 + [*N*] (• *<sup>M</sup>*<sup>0</sup> *Mp*

{*Mq*, *ts*}. *Mp* and *Mq* reach two different quasi-dead markings *M*

the another event separation condition equation is *M*0 + [*N*](• *<sup>M</sup>*<sup>0</sup> *Mq*

*<sup>p</sup>* + [*N*](• \*

According to the state equation, *Mp* + [*N*](•*tr*) + [*N*](• \*

According to the state equation, *Mp* + [*N*](•*tr*) + [*N*](• \*

**Figure 5.** Two CMTSIs connected to the same quasi-dead marking.

*Definition 12*: A legal marking *M ML* can be led to a quasi-dead marking *Mq* via a single transition firing. *Mq* must eventually evolve to a dead one *Md* (i.e. *Md MD*) after a sequence *n* = *t1t2…tn* fires. Denote the set of all the markings on the path from *Mq* to *Md* as *Mq-d*.

A Computationally Improved Optimal Solution

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 61

*Theorem 4*: ( )

**Figure 8.** (a) A Petri net model.22 (b) Its reachability graph.

**3.3. Procedure of deadlock prevention policy** 

I CMTSI and only one type II.

algorithm is constructed as Figure 9.

proposed by Ghaffari et al.13

problem than that of MTSI13.

Here, Figure 8(a) taken from existing literatures22 is used to demonstrate how to identify two types of CMTSIs from its reachability graph (i.e. Figure 8(b)). Assume that all transitions of PN models are immediately in this case. Therefore, one can easy identify there are two dead markings *M'D* (i.e. *M*2) and *M"D* (i.e. *M*15) and four quasi-dead markings (i.e. *M*11, *M*12, *M*<sup>13</sup> and *M*14). Additionally, the markings *M*0, *M*1, *M*3-*M*10 are the legal markings. Based on the mentioned above, there are two sets of CTMSIs in the reachability graph system due to the two dead markings in the system. As a result, one can infer that {*M*0, *t*2} belongs to type I CMTSI and {*M*7, *t*1} belongs to type II. In this Petri net system model, there are only one type

Next, quasi-dead, dead, and legal markings are identified. Based on12-13, the maximally permissive behavior means all of legal markings (*ML*) and the number of reachability condition equations equals |*ML*|. Additionally, all CMTSIs can be obtained such that the legal markings do not proceed into the illegal zone. The proposed deadlock prevention

*Theorem 5*: The proposed deadlock prevention policy is more efficient than the method

*Proof:* The theory of regions is used to prevent the system deadlocks by both our deadlock prevention policy and the conventional one. All MTSIs can be controlled by the two control policies. Since ( ) , the use of CMTSI can more efficiently handle the synthesis

**Figure 6.** Two CMTSIs connected to two quasi-dead markings.

*Remark 3*: Based on Theorem 3, both CMTSIs still need to be controlled even if *MP* = *Mq* for the case shown in Figure 7.

**Figure 7.** Two CMTSIs connected to two quasi-dead markings *Mp* and *M<sup>q</sup>* with *<sup>r</sup>* \* = *<sup>s</sup>* \* = \* (*M<sup>D</sup>*).

Control places are then found after CMTSIs. They are used to keep all markings of the controlled system within the legal zone.

#### *Theorem 4*: ( )

60 Petri Nets – Manufacturing and Computer Science

*M***<sup>0</sup>**

the case shown in Figure 7.

Legal Zone

**Figure 6.** Two CMTSIs connected to two quasi-dead markings.

**Figure 7.** Two CMTSIs connected to two quasi-dead markings *M*

controlled system within the legal zone.

*Mp*

*Mq*

Dead Zone

*Remark 3*: Based on Theorem 3, both CMTSIs still need to be controlled even if *MP* = *Mq* for

Z"

*M"D*

*M*

s

r

*M*

*p* and *M<sup>q</sup>* with *<sup>r</sup>* \* = *<sup>s</sup>* \* = \* (*M<sup>D</sup>*).

Control places are then found after CMTSIs. They are used to keep all markings of the

*tr*

*ts*

Quasi-dead Zone

*q p*

*M*

**Figure 8.** (a) A Petri net model.22 (b) Its reachability graph.

Here, Figure 8(a) taken from existing literatures22 is used to demonstrate how to identify two types of CMTSIs from its reachability graph (i.e. Figure 8(b)). Assume that all transitions of PN models are immediately in this case. Therefore, one can easy identify there are two dead markings *M'D* (i.e. *M*2) and *M"D* (i.e. *M*15) and four quasi-dead markings (i.e. *M*11, *M*12, *M*<sup>13</sup> and *M*14). Additionally, the markings *M*0, *M*1, *M*3-*M*10 are the legal markings. Based on the mentioned above, there are two sets of CTMSIs in the reachability graph system due to the two dead markings in the system. As a result, one can infer that {*M*0, *t*2} belongs to type I CMTSI and {*M*7, *t*1} belongs to type II. In this Petri net system model, there are only one type I CMTSI and only one type II.

### **3.3. Procedure of deadlock prevention policy**

Next, quasi-dead, dead, and legal markings are identified. Based on12-13, the maximally permissive behavior means all of legal markings (*ML*) and the number of reachability condition equations equals |*ML*|. Additionally, all CMTSIs can be obtained such that the legal markings do not proceed into the illegal zone. The proposed deadlock prevention algorithm is constructed as Figure 9.

*Theorem 5*: The proposed deadlock prevention policy is more efficient than the method proposed by Ghaffari et al.13

*Proof:* The theory of regions is used to prevent the system deadlocks by both our deadlock prevention policy and the conventional one. All MTSIs can be controlled by the two control policies. Since ( ) , the use of CMTSI can more efficiently handle the synthesis problem than that of MTSI13.

62 Petri Nets – Manufacturing and Computer Science

A Computationally Improved Optimal Solution

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 63

*Example I:* An FMS is shown in Figure 1012. This PN is a system of simple sequential processes with resources (S3PR)*,* denoted by (*N*1*, M*0). To do our deadlock prevention policy,

Two dead markings (i.e. *M*7 and *M*12) can then be identified. Next, '1 = {(*M*3, *t*5)} and '2 = {(*M*15, *t*1)} are obtained. The event separation condition equations can be obtained through

 *M*12(*pc*) = *M*0(*pc*) + [*N*](*pc*, *t*1) + 2[*N*](*pc*, *t*5) + [*N*](*pc*, *t*6) -1 (6)

*M*7(pc) = *M*0(pc) + 2[*N*](*pc*, *t*1) + [*N*](*pc*, *t*2) + [*N*](*pc*, *t*5) -1 (5)

*R*(*N*1, *M*0) of the PN system can be constructed as shown in Figure 11.

**Figure 10.** An FMS PN Model12.

**Figure 11.** *R*(*N*, *M*0) of Example I.

Two cycle equations are as follows.

them as follows.

**Figure 9.** The Proposed Deadlock Prevention Flowchart.

## **4. Experimental results**

Two FMS examples are used to evaluate our deadlock prevention policy12-23.

A Computationally Improved Optimal Solution for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 63

**Figure 10.** An FMS PN Model12.

62 Petri Nets – Manufacturing and Computer Science

( ) [ ]( ,) [ ]( , ) <sup>1</sup> *<sup>M</sup>*<sup>0</sup> *pc <sup>N</sup> pc <sup>M</sup> <sup>N</sup> pc <sup>t</sup>*

*<sup>c</sup> <sup>c</sup> <sup>c</sup> <sup>M</sup> <sup>M</sup> ML <sup>M</sup>*(*<sup>p</sup>* ) *M*0(*<sup>p</sup>* )[*N*](*<sup>p</sup>* ,) 0,

*<sup>C</sup>*

[*N*](*pc*,*t*)(*t*) 0,

*t T*

Two FMS examples are used to evaluate our deadlock prevention policy12-23.

**Figure 9.** The Proposed Deadlock Prevention Flowchart.

**4. Experimental results** 

*Example I:* An FMS is shown in Figure 1012. This PN is a system of simple sequential processes with resources (S3PR)*,* denoted by (*N*1*, M*0). To do our deadlock prevention policy, *R*(*N*1, *M*0) of the PN system can be constructed as shown in Figure 11.

Two dead markings (i.e. *M*7 and *M*12) can then be identified. Next, '1 = {(*M*3, *t*5)} and '2 = {(*M*15, *t*1)} are obtained. The event separation condition equations can be obtained through them as follows.

$$M\mathbf{v}(\mathbf{p}\_{\uparrow}) = M\mathbf{u}(\mathbf{p}\_{\uparrow}) + 2[N](\mathbf{p}\_{\uparrow}, \mathbf{t}) + [N](\mathbf{p}\_{\uparrow}, \mathbf{t}) + [N](\mathbf{p}\_{\uparrow}, \mathbf{t}) \tag{5}$$

$$M1\mathbf{u}(p\_{\uparrow}) = M\mathbf{u}(p\_{\uparrow}) + [\mathbf{N}](p\_{\uparrow}, \mathbf{t}) + 2[\mathbf{N}](p\_{\uparrow}, \mathbf{t}) + [\mathbf{N}](p\_{\uparrow}, \mathbf{t}) \le -1\tag{6}$$

**Figure 11.** *R*(*N*, *M*0) of Example I.

Two cycle equations are as follows.

$$[N](p\_{\uparrow\prime},t\_{\uparrow}) + [N](p\_{\uparrow\prime},t\_{\uparrow}) + [N](p\_{\uparrow\prime},t\_{\uparrow}) + [N](p\_{\uparrow\prime},t\_{\uparrow}) = 0\tag{7}$$

$$[N](p\_{\uparrow}, t\_{\uparrow}) + [N](p\_{\uparrow}, t\_{\uparrow}) + [N](p\_{\uparrow}, t\_{\uparrow}) + [N](p\_{\uparrow}, t\_{\uparrow}) = 0 \tag{8}$$

After listing all reachability conditions, all legal markings can be determined. In detail, *M*0- *M*6, *M*8, and *M*13-*M*19 are legal. Hence, the following reachability conditions are obtained.

$$Mo(p\_i) \ge 0\tag{9}$$

A Computationally Improved Optimal Solution

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 65

*Cp*1 1 *t*2, *t*<sup>6</sup> *t*1, *t*<sup>5</sup> *Cp*2 1 *t*3, *t*<sup>6</sup> *t*2, *t*<sup>5</sup> *Cp*3 1 *t*2, *t*<sup>7</sup> *t*1, *t*<sup>6</sup>

Additional Control Places *M*0(*Cpi*) (*Cp*) (*Cp*)

*Example II*: This example is taken from23 and is used in 12, 16, 24. Here, the PN model of the

To prevent deadlock, 282 reachable markings (*M*1 to *M*282) are identified according to the software INA25. 16 dead markings *M*9, *M*19, *M*70, *M*71, *M*76, *M*77, *M*78, *M*8*<sup>3</sup>*, *M*84, *M*94, *M*99, *M*100, *M*105, *M*106, *M*112, and *M*113 are then located. Next, 61 quasi-dead markings *M*6, *M*7, *M*8, *M*14, *M*15, *M*16, *M*17, *M*18, *M*25, *M*48, *M*66, *M*67, *M*68, *M*69, *M*72, *M*73, *M*74, *M*75, *M*79, *M*80, *M*81, *M*82, *M*87, *M*101, *M*102, *M*103, *M*104, *M*108, *M*109, *M*110, *M*111, *M*124, *M*130, *M*135, *M*136, *M*141, *M*142, *M*143, *M*150, *M*162, *M*198, *M*203, *M*204, *M*210, *M*250, *M*251, *M*257, *M*258, *M*259, *M*260, *M*261, *M*262, *M*263, *M*265, *M*269, *M*270, *M*272, *M*273, *M*274, *M*277, and *M*278 are found based on Definition 3 in this paper. Hence, the number of legal markings (i.e. 288 – (16 + 61) = 205) can be determined. Type I and II CMTSIs can be

obtained as shown in Table 2. Notice that {(*M*56, *t*9)} in *M*77 is a redundant one.

**Table 1.** Control Places of the Net (*N*1*H, M*0)

**Figure 12.** The Petri nets model of example II.

system, denoted as (*N*2, *M*0), is shown in Figure 12.

$$M\mathbf{u}(p\_i) = M\mathbf{u}(p\_i) + [N](p\_i, \mathbf{t}) \ge 0 \tag{10}$$

$$M\mathbf{u}(p\_i) = M\mathbf{u}(p\_i) + [N](p\_i, \mathbf{t}) + [N](p\_i, \mathbf{t}\_i) \ge 0 \tag{11}$$

$$M\mathbf{u}(p\_i) = M\mathbf{u}(p\_i) + 2[\mathbf{N}](p\_i, t\_i) + [\mathbf{N}](p\_i, t\_i) \ge 0 \tag{12}$$

$$Mu(p\_{\bar{\cdot}}) = Mu(p\_{\bar{\cdot}}) + 2[N](p\_{\bar{\cdot}\cdot}, t\_{\bar{\cdot}}) + [N](p\_{\bar{\cdot}\cdot}, t\_{\bar{\cdot}}) + [N](p\_{\bar{\cdot}\cdot}, t\_{\bar{\cdot}}) \geq 0 \tag{13}$$

$$M\mathbf{u}(p\_i) = M\mathbf{u}(p\_i) + \mathbf{2}[N](p\_i, \mathbf{t}) + \mathbf{2}[N](p\_i, \mathbf{t}) + [N](p\_i, \mathbf{t}) \ge 0 \tag{14}$$

$$M\mathbf{u}(p\_{\ell}) = M\mathbf{u}(p\_{\ell}) + \Im[\mathbf{N}](p\_{\ell}, \mathbf{t}\_{\ell}) + \Im[\mathbf{N}](p\_{\ell}, \mathbf{t}\_{\ell}) + [\mathbf{N}](p\_{\ell}, \mathbf{t}\_{\ell}) \ge 0 \tag{15}$$

$$\text{Ms(p\_{\bar{\epsilon}})} = \text{Mu(p\_{\bar{\epsilon}})} + [\text{N](p\_{\bar{\epsilon}}, t\_{\bar{\iota}}) + [\text{N](p\_{\bar{\epsilon}}, t\_{\bar{\iota}}) + [\text{N](p\_{\bar{\epsilon}}, t\_{\bar{\iota}})} \ge 0} \tag{16}$$

 *M*13(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*5) 0 (17)

$$\mathbf{M}u(p\_i) = \mathbf{M}u(p\_i) + [\mathbf{N}](p\_i, t\mathbf{s}) + [\mathbf{N}](p\_i, t\mathbf{s}) \ge 0 \tag{18}$$

$$M u(p\_i) = M u(p\_i) + 2[N](p\_i, t\_i) + [N](p\_i, t\_i) \ge 0 \tag{19}$$

$$M\omega(p\_{\dot{\cdot}}) = M\omega(p\_{\dot{\cdot}}) + \mathcal{Z}[N](p\_{\dot{\cdot}\dot{\cdot}}, t\mathbf{s}) + [N](p\_{\dot{\cdot}\dot{\cdot}}, t\_{\dot{\cdot}}) + [N](p\_{\dot{\cdot}\dot{\cdot}}, t\mathbf{r}) \ge 0 \tag{20}$$

$$Mv(p\_i) = Mu(p\_i) + \mathcal{Q}[N](p\_i, t\_i) + \mathcal{Q}[N](p\_i, t\_i) + [N](p\_i, t\_i) \ge 0 \tag{21}$$

$$M1s(p\_i) = M u(p\_i) + \Im[N](p\_i, t\mathbf{t}) + \Im[N](p\_i, t\mathbf{t}) + [N](p\_i, t\mathbf{t}) \ge 0 \tag{22}$$

$$\text{Mov}(p\_\uparrow) = \text{Mo}(p\_\uparrow) + [\text{N}](p\_\uparrow, t\mathfrak{s}) + [\text{N}](p\_\uparrow, t\mathfrak{s}) + [\text{N}](p\_\uparrow, t\mathfrak{r}) \ge 0 \tag{23}$$

Furthermore, two optimal control places *CP*1 and *CP*2 can be obtained when (5) and (7)-(23) are solved. Their detailed information is: *M*0(*CP*1) *=* 1, *t*<sup>1</sup> *= t*<sup>5</sup> *=* -1, *t*<sup>2</sup> *= t*<sup>6</sup> *=* 1, *t*<sup>3</sup> *= t*<sup>4</sup> *= t*<sup>7</sup> *= t*8 *=* 0; and *M*0(*CP*2)*=*1, *t*<sup>2</sup> *= t*5 *=* -1, *t*3 *= t*<sup>6</sup> *=* 1, *t*<sup>1</sup> *= t*<sup>4</sup> *= t*<sup>7</sup> *= t*8 *=* 0. By the same way, using (6) and (7)-(23), one can find two optimal control places, *Cp*3 and *Cp*4. *M*0(*CP*3) *=* 1, *t*<sup>1</sup> *= t*<sup>6</sup> *=* -1, *t*<sup>2</sup> *= t*7 *=* 1, *t*3 *= t*<sup>4</sup> *= t*<sup>5</sup> *= t*<sup>8</sup> *=* 0; and *M*0(*CP*4) *=* 1, *t*1 *= t*<sup>5</sup> *=* -1, *t*2 *= t*6 *=* 1, *t*<sup>3</sup> *= t*<sup>4</sup> *= t*7 *= t*<sup>8</sup> *=* 0. Notably, *CP*1 and *CP*4 are the same. Therefore, a redundant control place (*CP*4) can be removed. As a result, the system net can be controlled with the three control places *CP*1, *CP*2 and *CP*3. The optimally controlled system net (*N*1H*, M*0) is obtained as shown in Table 1.

It is worthy to emphasize that the three control places are obtained by using two CMTSIs and 36 equations under our control policy. However, six MTSIs/ESSPs and 108 equations have to be solved in two existing literatures12, 24.

A Computationally Improved Optimal Solution for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 65


**Table 1.** Control Places of the Net (*N*1*H, M*0)

64 Petri Nets – Manufacturing and Computer Science

(*N*1H*, M*0) is obtained as shown in Table 1.

have to be solved in two existing literatures12, 24.

[*N*](*pc*, *t*1) + [*N*](*pc*, *t*2) + [*N*](*pc*, *t*3) + [*N*](*pc*, *t*4) = 0 (7)

 [*N*](*pc*, *t*5) + [*N*](*pc*, *t*6) + [*N*](*pc*, *t*7) + [*N*](*pc*, *t*8) = 0 (8) After listing all reachability conditions, all legal markings can be determined. In detail, *M*0- *M*6, *M*8, and *M*13-*M*19 are legal. Hence, the following reachability conditions are obtained.

 *M*0(*pc*) 0 (9)

 *M*1(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*1) 0 (10)

 *M*2(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*1) + [*N*](*pc*, *t*2) 0 (11)

 *M*3(*pc*) *= M*0(*pc*) + 2[*N*](*pc*, *t*1) + [*N*](*pc*, *t*2) 0 (12)

 *M*4(*pc*) *= M*0(*pc*) + 2[*N*](*pc*, *t*1) + [*N*](*pc*, *t*2) + [*N*](*pc*, *t*3) 0 (13)

 *M*5(*pc*) *= M0*(*pc*) + 2[*N*](*pc*, *t*1) + 2[*N*](*pc*, *t*2) + [*N*](*pc*, *t*3) 0 (14)

 *M*6(*pc*) *= M*0(*pc*) + 3[*N*](*pc*, *t*1) + 2[*N*](*pc*, *t*2) + [*N*](*pc*, *t*3) 0 (15)

 *M*8(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*1) + [*N*](*pc*, *t*2) + [*N*](*pc*, *t*3) 0 (16)

 *M*13(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*5) 0 (17)

 *M*14(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*5) + [*N*](*pc*, *t*6) 0 (18)

 *M*15(*pc*) *= M*0(*pc*) + 2[*N*](*pc*, *t*5) + [*N*](*pc*, *t*6) 0 (19)

 *M*16(*pc*) *= M*0(*pc*) + 2[*N*](*pc*, *t*5) + [*N*](*pc*, *t*6) + [*N*](*pc*, *t*7) 0 (20)

 *M*17(*pc*) *= M*0(*pc*) + 2[*N*](*pc*, *t*5) + 2[*N*](*pc*, *t*6) + [*N*](*pc*, *t*7) 0 (21)

 *M*18(*pc*) *= M*0(*pc*) + 3[*N*](*pc*, *t*5) + 2[*N*](*pc*, *t*6) + [*N*](*pc*, *t*7) 0 (22)

 *M*19(*pc*) *= M*0(*pc*) + [*N*](*pc*, *t*5) + [*N*](*pc*, *t*6) + [*N*](*pc*, *t*7) 0 (23)

Furthermore, two optimal control places *CP*1 and *CP*2 can be obtained when (5) and (7)-(23) are solved. Their detailed information is: *M*0(*CP*1) *=* 1, *t*<sup>1</sup> *= t*<sup>5</sup> *=* -1, *t*<sup>2</sup> *= t*<sup>6</sup> *=* 1, *t*<sup>3</sup> *= t*<sup>4</sup> *= t*<sup>7</sup> *= t*8 *=* 0; and *M*0(*CP*2)*=*1, *t*<sup>2</sup> *= t*5 *=* -1, *t*3 *= t*<sup>6</sup> *=* 1, *t*<sup>1</sup> *= t*<sup>4</sup> *= t*<sup>7</sup> *= t*8 *=* 0. By the same way, using (6) and (7)-(23), one can find two optimal control places, *Cp*3 and *Cp*4. *M*0(*CP*3) *=* 1, *t*<sup>1</sup> *= t*<sup>6</sup> *=* -1, *t*<sup>2</sup> *= t*7 *=* 1, *t*3 *= t*<sup>4</sup> *= t*<sup>5</sup> *= t*<sup>8</sup> *=* 0; and *M*0(*CP*4) *=* 1, *t*1 *= t*<sup>5</sup> *=* -1, *t*2 *= t*6 *=* 1, *t*<sup>3</sup> *= t*<sup>4</sup> *= t*7 *= t*<sup>8</sup> *=* 0. Notably, *CP*1 and *CP*4 are the same. Therefore, a redundant control place (*CP*4) can be removed. As a result, the system net can be controlled with the three control places *CP*1, *CP*2 and *CP*3. The optimally controlled system net

It is worthy to emphasize that the three control places are obtained by using two CMTSIs and 36 equations under our control policy. However, six MTSIs/ESSPs and 108 equations *Example II*: This example is taken from23 and is used in 12, 16, 24. Here, the PN model of the system, denoted as (*N*2, *M*0), is shown in Figure 12.

**Figure 12.** The Petri nets model of example II.

To prevent deadlock, 282 reachable markings (*M*1 to *M*282) are identified according to the software INA25. 16 dead markings *M*9, *M*19, *M*70, *M*71, *M*76, *M*77, *M*78, *M*8*<sup>3</sup>*, *M*84, *M*94, *M*99, *M*100, *M*105, *M*106, *M*112, and *M*113 are then located. Next, 61 quasi-dead markings *M*6, *M*7, *M*8, *M*14, *M*15, *M*16, *M*17, *M*18, *M*25, *M*48, *M*66, *M*67, *M*68, *M*69, *M*72, *M*73, *M*74, *M*75, *M*79, *M*80, *M*81, *M*82, *M*87, *M*101, *M*102, *M*103, *M*104, *M*108, *M*109, *M*110, *M*111, *M*124, *M*130, *M*135, *M*136, *M*141, *M*142, *M*143, *M*150, *M*162, *M*198, *M*203, *M*204, *M*210, *M*250, *M*251, *M*257, *M*258, *M*259, *M*260, *M*261, *M*262, *M*263, *M*265, *M*269, *M*270, *M*272, *M*273, *M*274, *M*277, and *M*278 are found based on Definition 3 in this paper. Hence, the number of legal markings (i.e. 288 – (16 + 61) = 205) can be determined. Type I and II CMTSIs can be obtained as shown in Table 2. Notice that {(*M*56, *t*9)} in *M*77 is a redundant one.


A Computationally Improved Optimal Solution

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 67

Finally, 205 reachability condition equations can be listed. They represent the sequence of all legal markings from the initial one. Moreover, control place *CP*1 can be computed, i.e., *M*<sup>0</sup> (*CP*1) = 2, *CP*<sup>1</sup> = {*t*6, *t*13}, and *CP*1 = {*t*1, *t*11}. Similarly, other control places are obtained as

> *M*0 + 4*t*1 + *t*2 + 2*t*3 + *t*4 + *t*6 + *t*9 + *t*<sup>10</sup> -1 *M*0 + 4*t*1 + 2*t*2 + *t*3 + *t*5 + *t*6 + *t*9 + *t*10 -1 *M*0 + 3*t*1 + *t*2 + 2*t*3 + *t*4 + *t*6 + 2*t*9 + *t*<sup>10</sup> -1 *M*0 + 3*t*1 + 2*t*2 + 2*t*3 + *t*5 + *t*6 + 2*t*9 + *t*10 -1

*M*0 + 3*t*1 + *t*2 + 2*t*3 + *t*4 + *t*6 + *t*9 + *t*10 + *t*<sup>11</sup> -1 *M*0 + 3*t*1 + 2*t*2 + *t*3 + *t*5 + *t*6 + *t*<sup>9</sup> + *t*10 + *t*<sup>11</sup> -1

*M*0 + 2*t*1 + *t*2 + *t*3 + *t*4 + *t*6 + *t*9 + *t*10 + *t*11 -1 *M*0 + 2*t*1 + 2*t*2 + *t*5 + *t*6 + *t*9 + *t*10 + *t*<sup>11</sup> -1 *M*0 + 3*t*1 + *t*2 + 2*t*3 + *t*<sup>4</sup> + *t*<sup>6</sup> + 2*t*9 + *t*<sup>10</sup> -1 *M*0 + 3*t*1 + 2*t*2 + *t*3 + *t*5 + *t*6 + 2*t*9+ *t*<sup>10</sup> -1

*M*0 + 2*t*1 + 2*t*3 + *t*4 + *t*6 + 3*t*9 + 2*t*<sup>10</sup> + 2*t*11 + *t*12 -1 *M*0 + 2*t*1 + *t*2 + *t*3 + *t*<sup>5</sup> + *t*6 + 3*t*9 + 2*t*10 + 2*t*<sup>11</sup> + *t*<sup>12</sup> -1

*M*<sup>0</sup> + *t*1 + *t*<sup>3</sup> + *t*4 + *t*6 + 3*t*<sup>9</sup> + 2*t*10 + 2*t*11 + *t*12 -1 *M*0 + *t*1 + *t*<sup>2</sup> + *t*5 + *t*<sup>6</sup> + 3*t*9 + 2*t*10 + 2*t*<sup>11</sup> + *t*12 -1

**Table 4.** The Dead Markings and Relative Event Separation Condition Equations of Type II CMTSI.

*<sup>D</sup>* 'C *M*0(*Cpi*) (*Cpi*) (*Cpi*) *M*<sup>9</sup> {(*M*65, *t*1)} 2 *t*6, *t*13 *t*1, *t*<sup>11</sup>

*M*<sup>71</sup> {(*M*51, *t*9)} 3 *t*7, *t*11 *t*4, *t*5, *t*<sup>9</sup> *M*<sup>78</sup> {(*M*171, *t*9)} 3 *t*7, *t*11 *t*4, *t*5, *t*<sup>9</sup> *M*<sup>94</sup> {(*M*93, *t*1)} 2 *t*6, *t*13 *t*1, *t*<sup>11</sup> *M*<sup>99</sup> {(*M*98, *t*1)} 4 *t*7, *t*11 *t*1, *t*<sup>9</sup> *M*<sup>100</sup> {(*M*98, *t*4)} 3 *t*7, *t*11 *t*4, *t5*, *t*<sup>9</sup>

Finally, the controlled net is obtained by adding the six control places as shown in Table 7. It is live and maximally permissive with 205 reachable markings. However, 59 ESSPs and nine control places are required in 12. It hints that 59 sets of inequalities are needed in 12, while only 18 sets of inequalities suffice using our algorithm. Hence, our policy is more efficient

3 *t*6, *t*11 *t*2, *t*4, *t*<sup>9</sup> 3 *t*5, *t*7, *t*11 *t*2, *t*6, *t*<sup>9</sup> 3 *t*7, *t*11 *t*4, *t*5, *t*<sup>9</sup>

*<sup>D</sup>* Event Separation Condition Equations

*M*76 *M*0 + 2*t*1 + *t*2 + *t*3 + 2*t*9 + *t*10 + *t*<sup>11</sup> -1

*M*83 *M*0 + *t*1 + *t*2 + 2*t*9 + *t*10 + *t*<sup>11</sup> -1

*M*105 *M*0 + *t*1 + *t*3 + 3*t*9 + 2*t*10 + 2*t*11 + *t*<sup>12</sup> -1

*M*112 *M*0 + 3*t*9 + 2*t*10 + 2*t*<sup>11</sup> + *t*<sup>12</sup> -1

shown in Tables 5-6.

*M*

*M*<sup>19</sup>

*M*<sup>77</sup>

*M*<sup>84</sup>

*M*<sup>106</sup>

*M*<sup>113</sup>

*M*

**Table 5.** Control Places from TYPE I CMTSI.

than that in 12.

*M*<sup>70</sup> {(*M*43, *t*9)}

**Table 2.** The Dead Markings and Their Relative CMTSIs.


**Table 3.** The Dead Markings and Relative Event Separation Condition Equations of Type I CMTSI.

Tables 3-4 show the event separation condition equations based on 18 CMTSIs. Here, the procedure of our method is introduced as follows. Due to the space limitation, we use only one example (i.e. dead marking *M*9) to illustrate how to prevent legal markings from leading to dead one *M9* by using a CMTSI. To do so, '*C*1 = {(*M*65, *t*1)} can be located due to *M*9. The event separation condition equation can then be identified as follows.

$$\text{Mo(Crv)} = \text{Mo(Crv)} + \text{St}\_1 + \text{t}\_2 + \text{t}\_3 + \text{Pt}\_1 + \text{t}\_1 \text{o} \le \text{-1} \tag{24}$$

Next, three different cycle equations are:

$$t\_1 + t\_2 + t\_3 + t\_4 + t\_5 + t\_6 = 0 \tag{25}$$

$$t\mathbf{v} + t\mathbf{v} + t\mathbf{v} + t\mathbf{v} + t\mathbf{v} + t\mathbf{s} = \mathbf{0} \tag{26}$$

$$\mathbf{t}\_{1}\mathbf{t}\_{1} + \mathbf{t}\_{1}\mathbf{u} + \mathbf{t}\_{11} + \mathbf{t}\_{12} + \mathbf{t}\_{13} + \mathbf{t}\_{14} = \mathbf{0} \tag{27}$$

Finally, 205 reachability condition equations can be listed. They represent the sequence of all legal markings from the initial one. Moreover, control place *CP*1 can be computed, i.e., *M*<sup>0</sup> (*CP*1) = 2, *CP*<sup>1</sup> = {*t*6, *t*13}, and *CP*1 = {*t*1, *t*11}. Similarly, other control places are obtained as shown in Tables 5-6.


**Table 4.** The Dead Markings and Relative Event Separation Condition Equations of Type II CMTSI.


**Table 5.** Control Places from TYPE I CMTSI.

66 Petri Nets – Manufacturing and Computer Science

*<sup>D</sup>* '*<sup>C</sup> M*

*M*<sup>9</sup> {(*M*65, *t*1)} *M*<sup>19</sup>

*M*<sup>71</sup> {(*M*51, *t*9)} *M*<sup>77</sup>

*M*<sup>94</sup> {(*M*93, *t*1)} *M*<sup>84</sup>

**Table 2.** The Dead Markings and Their Relative CMTSIs.

*M*

*M*<sup>70</sup>

*M*<sup>71</sup>

*M*<sup>78</sup>

*M*<sup>99</sup>

Next, three different cycle equations are:

*M*<sup>70</sup> {(*M*43, *t*9)} *M*<sup>76</sup> {(*M*65, *t*11)}

*M*<sup>78</sup> {(*M*171, *t*9)} *M*<sup>83</sup> {(*M*128, *t*11)}

*M*<sup>99</sup> {(*M*98, *t*1)} *M*<sup>105</sup> {(*M*93, *t*11)} *M*<sup>100</sup> {(*M*98, *t*4)} *M*<sup>106</sup> {(*M*98, *t*11)}

*<sup>D</sup>* Event Separation Condition Equations

*M*0 + 3*t*1 + *t*2 + 2*t*3 + 2*t*<sup>4</sup> + *t*6 + 2*t*<sup>9</sup> + *t*10 -1 *M*0 + 3*t*1 + 2*t*2 + *t*3 + *t*4 + *t*5 + *t*6 + 2*t*9 + *t*<sup>10</sup> -1

*M*0 + 3*t*1 + *t*2 + 2*t*3 + *t*4 + *t*5 + *t*6 + 2*t*9 + *t*<sup>10</sup> -1 *M*0 + 3*t*1 + 2*t*2 + *t*3 + 2*t*5 + *t*6 + 2*t*9 + *t*10 -1

*M*0 + 2*t*1 + *t*2 + *t*3 + *t*4 + *t*5 + *t*6 + 2*t*9 + *t*10 -1 *M*0 + 2*t*1 + 2*t*2 + 2*t*5 + *t*6 + 2*t*9 + *t*10 -1 *M*0 + 2*t*1 + 2*t*3 + 2*t*4 + *t*6 + 2*t*9 + *t*<sup>10</sup> -1

*M*0 + 3*t*1 + 2*t*3 + *t*4 + *t*6 + 3*t*9 + 2*t*<sup>10</sup> + *t*11 + *t*<sup>12</sup> -1 *M*0 + 3*t*1 + *t*2 + *t*3 + *t*5 + *t*6 + 3*t*9 + 2*t*<sup>10</sup> + *t*11 + *t*<sup>12</sup> -1

*M*9 *M*0 + 3*t*1 + *t*2 + *t*3 + 2*t*9 + *t*<sup>10</sup> -1

*M*<sup>94</sup> *M*0 + 2*t*1 + *t*3 + 3*t*9 + 2*t*10 + *t*11 + *t*<sup>12</sup> -1

event separation condition equation can then be identified as follows.

**Table 3.** The Dead Markings and Relative Event Separation Condition Equations of Type I CMTSI.

Tables 3-4 show the event separation condition equations based on 18 CMTSIs. Here, the procedure of our method is introduced as follows. Due to the space limitation, we use only one example (i.e. dead marking *M*9) to illustrate how to prevent legal markings from leading to dead one *M9* by using a CMTSI. To do so, '*C*1 = {(*M*65, *t*1)} can be located due to *M*9. The

 *M*9(*CP*1) = *M*0(*CP*1) + 3*t*1 + *t*2 + *t*3 + 2*t*9 + *t*<sup>10</sup> -1 (24)

 *t*1 + *t*2 + *t*5 + *t*6 + *t*7 + *t*8 = 0 (25)

 *t*1 + *t*3 + *t*4 + *t*6 + *t*7 + *t*8 = 0 (26)

 *t*9 + *t*10 + *t*11 + *t*12 + *t*13 + *t*14 = 0 (27)

*<sup>D</sup> <sup>C</sup>*

*M*<sup>112</sup> {(*M*122, *t*11)} *M*<sup>113</sup> {(*M*96, *t*11)}

{(*M*56, *t*1)} {(*M*56, *t*9)}

{(*M*56, *t*9)} {(*M*56, *t*11)}

{(*M*60, *t*9)} {(*M*60, *t*11)}

*M*

> Finally, the controlled net is obtained by adding the six control places as shown in Table 7. It is live and maximally permissive with 205 reachable markings. However, 59 ESSPs and nine control places are required in 12. It hints that 59 sets of inequalities are needed in 12, while only 18 sets of inequalities suffice using our algorithm. Hence, our policy is more efficient than that in 12.

Li *et al*. solve this problem by using elementary siphons controlled policy (ESCP) and the theory of region 16. A two-stage deadlock prevention method is used. First, ESCP is used to replace a siphon control method5. Therefore, the number of dead markings is reduced. Second, the theory of regions is used to obtain the optimal solution. Three elementary siphons (i.e. *S*1 = {*p*2, *p*5, *p*13, *p*15, *p*18}, *S2* = {*p*5, *p*13, *p*14, *p*15, *p*18} and *S*3 = {*p*2, *p*7, *p*11, *p*13, *p*16*p*19}) can be identified. As a result, three control places *VS*1*VS*3 as shown in Table 8 are needed to handle three elementary siphons. Then a partially controlled PN system, denoted as (*N*2*<sup>L</sup>*1, *M*0), can be obtained after the first stage.

A Computationally Improved Optimal Solution

for Deadlocked Problems of Flexible Manufacturing Systems Using Theory of Regions 69

their control policy16 does not seem efficiently enough when the MTSI at the second stage is

To compare the efficiency of the deadlock prevention methods, the proposed one is examined in the system net (*N*2*L1*, *M*0). One can realize that *M57* is the only deadlock marking in *R*(*N*2*L1*, *M*0). Based on our method, only the dead marking *M57* needed to be controlled. Here, only one = {(*M*44, *t*9)} is needed. Obviously, the involved necessary equations are much less than those of the conventional one. We can obtain the same controlled net as that in 16. Hence, the proposed concept of CMTSIs can be used in their approach 16 to improve its

Additional Control Places *M*0(C*pi*) (*Cpi*) (*Cpi*)

Additional Control Places *M*0(C*pi*) (*Cpi*) (*Cpi*)

*Vs*<sup>1</sup> 1 *t*5, *t*<sup>13</sup> *t*2, *t*<sup>11</sup>

*Vs*<sup>2</sup> 2 *t*4, *t*5, *t*<sup>13</sup> *t*1, *t*<sup>11</sup>

*Vs*<sup>3</sup> 3 *t*7, *t*<sup>11</sup> *t*4, *t*5,*t*<sup>9</sup>

*Cp*<sup>1</sup> 3 *t*6, *t*<sup>11</sup> *t*2, *t*4*,t*<sup>9</sup>

*Cp*<sup>2</sup> 3 *t*5, *t*7, *t*<sup>11</sup> *t*2, *t*6,*t*<sup>9</sup>

*Cp*<sup>3</sup> 4 *t*2, *t*4*, t*7, *t*<sup>11</sup> *t*1,*t*6, *t*<sup>9</sup>

used to obtain control places.

computational efficiency significantly as well.

**Figure 13.** A Partial Reachability Graph of the Net (*N*2*<sup>L</sup>*1, *M*0)16.

**Table 8.** Additional Control Places for the Net (*N*2*L1*, *M*0)

**Table 9.** Control Places for (*N*2*<sup>L</sup>*1, *M*0) by Two-Stage Method.


**Table 6.** Control Places from TYPE II CMTSI.


**Table 7.** Control Places for the Net (*N*2*<sup>H</sup>*, *M*0).

However, (*N*2*<sup>L</sup>*1, *M*0) has a dead marking. Figure 13 shows a partial reachability graph and the deadlock marking *M*57 is included. *M*57 is one of the 210 reachable markings (i.e. the reachable markings *M*1-*M*210 as denoted in 16. In 16, 210 reachable markings are divided into two categories: legal and illegal zones. The illegal zone consists of quasi-dead markings (i.e. *M*54, *M*55, *M*<sup>56</sup> and *M*60) and a dead marking (i.e. *M*57). Obviously, some legal markings (i.e. *M*43, *M*44, *M*47, *M*48, *M*49, *M*53, *M*59 and *M*74) can enter the illegal zone (i.e. *ZI* = *ZQ ZD*). One can realize that they use the theory of regions to prevent these legal markings from entering *ZI*. Therefore, they must resolve 8 MTSIs (i.e. {(*M*43, *t*9)}, {(*M*44, *t*9)}, {(*M*47, *t*9)}, {(*M*48, *t*9)}, {(*M*49, *t*9)}, {(*M*53, *t*4)}, {(*M*59, *t*1)}, {(*M*74, *t*2)}) and many equations in this example. Then the additional three control places can be obtained as shown in Table 9. Eight MTSIs are needed. Hence, their control policy16 does not seem efficiently enough when the MTSI at the second stage is used to obtain control places.

To compare the efficiency of the deadlock prevention methods, the proposed one is examined in the system net (*N*2*L1*, *M*0). One can realize that *M57* is the only deadlock marking in *R*(*N*2*L1*, *M*0). Based on our method, only the dead marking *M57* needed to be controlled. Here, only one = {(*M*44, *t*9)} is needed. Obviously, the involved necessary equations are much less than those of the conventional one. We can obtain the same controlled net as that in 16. Hence, the proposed concept of CMTSIs can be used in their approach 16 to improve its computational efficiency significantly as well.

**Figure 13.** A Partial Reachability Graph of the Net (*N*2*<sup>L</sup>*1, *M*0)16.

68 Petri Nets – Manufacturing and Computer Science

*M*0), can be obtained after the first stage.

*M*

*M*<sup>19</sup>

*M*<sup>84</sup>

**Table 6.** Control Places from TYPE II CMTSI.

**Table 7.** Control Places for the Net (*N*2*<sup>H</sup>*, *M*0).

Li *et al*. solve this problem by using elementary siphons controlled policy (ESCP) and the theory of region 16. A two-stage deadlock prevention method is used. First, ESCP is used to replace a siphon control method5. Therefore, the number of dead markings is reduced. Second, the theory of regions is used to obtain the optimal solution. Three elementary siphons (i.e. *S*1 = {*p*2, *p*5, *p*13, *p*15, *p*18}, *S2* = {*p*5, *p*13, *p*14, *p*15, *p*18} and *S*3 = {*p*2, *p*7, *p*11, *p*13, *p*16*p*19}) can be identified. As a result, three control places *VS*1*VS*3 as shown in Table 8 are needed to handle three elementary siphons. Then a partially controlled PN system, denoted as (*N*2*<sup>L</sup>*1,

*<sup>D</sup> <sup>C</sup> M*0(C*pi*) (*Cpi*) (*Cpi*)

*M*<sup>76</sup> {(*M*65, *t*11)} 1 *t*5, *t*13 *t*2, *t*<sup>11</sup> *M*<sup>77</sup> {(*M*56, *t*11)} 1 *t*5, *t*13 *t*2, *t*<sup>11</sup> *M*<sup>83</sup> {(*M*128, *t*11)} 1 *t*5, *t*13 *t*2, *t*<sup>11</sup>

*M*<sup>105</sup> {(*M*93, *t*11)} 1 *t*5, *t*13 *t*2, *t*<sup>11</sup> *M*<sup>106</sup> {(*M*98, *t*11)} 1 *t*5, *t*13 *t*2, *t*<sup>11</sup> *M*<sup>112</sup> {(*M*122, *t*11)} 1 *t*5*, t*13 *t*2, *t*<sup>11</sup> *M*<sup>113</sup> {(*M*96, *t*11)} 1 *t*5*, t*13 *t*2*, t*<sup>11</sup>

{(*M*56, *t*1)} 2 *t*6, *t*13 *t*1, *t*<sup>11</sup>

{(*M*56, *t*9)} 3 *t*5, *t*7, *t*11 *t*2, *t*6, *t*<sup>9</sup>

{(*M*60, *t*9)} 3 *t*5, *t*7, *t*11 *t*2, *t6*, *t*<sup>9</sup> {(*M*60, *t*11)} 1 *t*5, *t*13 *t*2, *t*<sup>11</sup>

Additional Control Places *M*0(C*pi*) (*Cpi*) (*Cpi*)

However, (*N*2*<sup>L</sup>*1, *M*0) has a dead marking. Figure 13 shows a partial reachability graph and the deadlock marking *M*57 is included. *M*57 is one of the 210 reachable markings (i.e. the reachable markings *M*1-*M*210 as denoted in 16. In 16, 210 reachable markings are divided into two categories: legal and illegal zones. The illegal zone consists of quasi-dead markings (i.e. *M*54, *M*55, *M*<sup>56</sup> and *M*60) and a dead marking (i.e. *M*57). Obviously, some legal markings (i.e. *M*43, *M*44, *M*47, *M*48, *M*49, *M*53, *M*59 and *M*74) can enter the illegal zone (i.e. *ZI* = *ZQ ZD*). One can realize that they use the theory of regions to prevent these legal markings from entering *ZI*. Therefore, they must resolve 8 MTSIs (i.e. {(*M*43, *t*9)}, {(*M*44, *t*9)}, {(*M*47, *t*9)}, {(*M*48, *t*9)}, {(*M*49, *t*9)}, {(*M*53, *t*4)}, {(*M*59, *t*1)}, {(*M*74, *t*2)}) and many equations in this example. Then the additional three control places can be obtained as shown in Table 9. Eight MTSIs are needed. Hence,

*Cp*<sup>1</sup> 1 *t*5, *t*<sup>13</sup> *t*2, *t*<sup>11</sup> *Cp*<sup>2</sup> 2 *t*6, *t*<sup>13</sup> *t*1, *t*<sup>11</sup> *Cp*<sup>3</sup> 3 *t*6, *t*<sup>11</sup> *t*2, *t*4,*t*<sup>9</sup> *Cp*<sup>4</sup> 3 *t*5, *t*7, *t*<sup>11</sup> *t*2, *t*6,*t*<sup>9</sup> *Cp*<sup>5</sup> 3 *t*7, *t*<sup>11</sup> *t*4, *t*5,*t*<sup>9</sup> *Cp*<sup>6</sup> 4 *t*7, *t*<sup>11</sup> *t*1, *t*<sup>9</sup>

4 *t*7, *t*11 *t*1, *t*<sup>9</sup>

4 *t*7, *t*11 *t*1, *t*<sup>9</sup>


**Table 8.** Additional Control Places for the Net (*N*2*L1*, *M*0)


**Table 9.** Control Places for (*N*2*<sup>L</sup>*1, *M*0) by Two-Stage Method.
