Abstract

Deadlock prevention policies are used to solve the deadlock problems of FMSs. It is well known that the theory of regions is the efficient method for obtaining optimal (i.e., maximally permissive) controllers. All legal and live maximal behaviors of Petri net models can be preserved by using marking/transition-separation instances (MTSIs) or event-state-separation-problem (ESSP) methods. However, they encountered great difficulties in solving all sets of inequalities that is an extremely time consuming problem. Moreover, the number of linear programming problems (LPPs) of legal markings is also exponential with net size when a plant net grows exponentially. This paper proposes a novel methodology to reduce the number of MTSIs/ESSPs and LPPs. In this paper, we used the well-known reduction approach Murata (1989) to simply the construct of system such that the problem of LPPs can then be reduced. Additionally, critical ones of crucial marking/transition-separation instances (COCMTSI) are developed and used in our deadlock prevention policy that allows designers to employ few MTSIs to deal with deadlocks. Experimental results indicate that the computational cost can be reduced. To our knowledge, this deadlock prevention policy is the most efficient policy to obtain maximal permissive behavior of Petri net models than past approaches.

1. Introduction

Many deadlock prevention schemes are developed for solving deadlock problem of FMSs based on structural analysis [1]. Particulary, most of them employed the concept of siphons in their deadlock prevention methods [29]. The main advantage of siphon control just requires a few control places to rapidly revive the system. Further, Li and Zhou proposed elementary siphon [10] to reduce the problem of redundant minimal siphons. However, whatever how these experts [1114] make efforts in it, the siphon control algorithm cannot obtain a maximally permissive controlled system. On the other hand, some pioneers use reachability graph technology to achieve the goal of a live system behavior [1123]. Among them, the theory of regions [24] can not only obtain an optimal (i.e., maximally permissive states) deadlock prevention controller, but also without confining to a certain class of FMSs.

Uzam [16] followed the theory of regions to further define the deadlock zone (DZ) and the deadlock-free zone (DFZ) for preventing deadlocks. Based on the theory of regions, an optimal controller can be obtained when the concept of DZ and DFZ is used to solve ESSPs. However, it suffers from many redundant control places problems due to numerous ESSPs. Ghaffari et al. [20] proposed a unique interpretation of the theory of regions and defined forbidden marking, dangerous marking, legal marking, and the set of MTSI. Under the method of MTSI, an optimal PN controller synthesis method for FMSs is proposed. Unfortunately, the problem of the redundant control places cannot be entirely avoided in large FMSs. To solve the problem of state explosion, Uzam [18] uses the reduction technology to improve the previous ones based on the theory of regions. This technology is also used in this paper to simplify the structure of FMSs. For reducing the number of MTSIs, Li et al. [25] adopted a combined algorithm based on siphon control method and the theory of regions. However, it still fails to need to determine all sets of MTSIs in second stage, and its application seems to be limited in S3PR [1] nets. Wei and Li [26] also proposed a suboptimal deadlock prevention policy using structural analysis and the theory of regions. However, the maximally permissive behavior cannot be obtained once the initial markings of the controlled net are changed. Uzam and Zhou [11] use a simple iterative skill for removing all markings in the deadlock zone based on the theory of regions. However, the reachability graph must be generated at each iterative stage. As a result, as indicated by [27], the computational efficiency is lower than the conventional policy [16, 20].

It is worthy to notice that Piroddi et al. [28, 29] proposed combined selective siphons and critical markings in a reachability graph algorithm to obtain maximally permissive controllers via iterations. All uncontrolled siphons are needed first to be identified. And then the relation between uncontrolled siphons and critical markings is further located. However, the main drawback is that the reachability graph is still generated at each iterative stage until all critical markings are controlled. Nevertheless, the policy not only solves the deadlock problem successfully, but also obtains a maximally permissive controller. To our knowledge, the policy is the first deadlock prevention policy to achieve the goal that can obtain maximally permissive controllers for all S3PR models in the existing literature. On the other hand, CMTSI is proposed to enhance the computational efficiency of the conventional MTSI algorithm [12, 14, 30]. The three articles show the CMTSI policy is capable of obtaining an efficient and optimal controller in small S3PR nets. In this paper, the selective siphon method and reduction technology are merged in our new deadlock prevention policy. The advantage of the proposed method is that the number of two types CMTSI can then be simplified. And LPP is also reduced.

The rest of this paper is organized as follows. Section 2 presents the basic definitions, properties of PNs, and the theory of regions. Section 3 then describes the proposed deadlock prevention policy. Next, Section 4 presents the experimental results. Section 5 gives the comparison results. Conclusions are made in Section 6.

2. Preliminaries [23]

A PN is a 5-tuple, , where is a finite set of places; is a finite set of transitions, with and ; is the set of all directed arcs, is the weight function where and : is the initial marking. is said to be ordinary, denoted as , if for all . is the input function that means the multiplicity of a directed arc from to if . is the output function that means the multiplicity of a directed arc from to if . The set of input (resp., output) transitions of a place is denoted by (resp., ). Similarly, the set of input (resp., output) places of a transition is denoted by (resp., ). A PN structure is denoted by . A PN with a given initial marking is denoted by . A PN is said to be pure if no places are both input and output places of the same transition. The so-called incidence matrix [] of a pure PN is defined as . A transition is said to be enabled at marking if, for all ,   or is marked with at least tokens, as denoted by . A transition may fire if it is enabled. In an ordinary net, it is enabled if and only if for all , . Firing at gives a new marking such that, for all ,  . It is denoted as . indicates the number of tokens in each place, which means the current state of the modeled system. When marking can be reached from by firing a sequence of transitions , this process is denoted by and satisfies the state equation . Here, is a vector of nonnegative integers, called counting vector, and indicates the algebraic sum of all occurrences of in . The set of all reachable markings for a PN given is denoted by . In this paper, we only focus on the reachable markings. The spurious ones are not under consideration. A transition is said to be live if for any there exists a sequence of transitions whose firing leads to that enables . A PN is said to be live if all the transitions are live. Liveness of a PN means that for each marking reachable from it is finally possible to fire , for all through some firing sequence. is said to be reversible if for each marking is reachable from . Thus, in a reversible net it is always possible to go back to initial marking (state) . A marking is said to be a home state if for each marking is reachable from . Reversibility is a special case of the home state property; that is, if the home state , then the net is reversible. A PN contains a deadlock if there is a marking at which no transition is enabled. Such a marking is called a dead marking. Deadlock situations are as a result of inappropriate resource allocation policies or exhaustive use of some or all resources.

On the other hand, a conventional MTSI [21]/ESSP [16] is proposed to prevent deadlock PN systems. The two methods concerned about the forbidden state problem for liveness requirements. It is assumed that is the set of forbidden markings. For convenience, we employed its several definitions which are related with our approach as follows.

Definition 1. Let the set of legal/admissible markings be the maximal set of reachable markings in .
Clearly, . To solve the control problem, one has to identify the set of MTSI from a legal/admissible marking to a nonadmissible marking. The additional monitors are used to prevent these transitions from occurring in order to keep the state space of the controlled system in the set of legal markings.

Definition 2. The set of MTSI that the supervisor has to disable     . An optimal controller is the one that ensures the reachability of all markings in and that forbids all state transitions in .
Additionally, the theory of regions is proposed for the synthesis of pure nets given a finite transition system [22], which can be adopted to synthesize the liveness-enforcing net supervisor (LENS) for a plant model. Ghaffari et al. [20] give a new interpretation of the theory of regions using net notations and show how to adopt it to synthesize the liveness-enforcing net supervisor for a PN modeled net. This theory is briefly introduced below.
Let be a set of transitions and a finite directed graph whose arcs are labeled by transitions in . Assume that there exists a node in such that there exists a path from it to any node. The objective of the theory of regions is to find a pure   (i.e.,  ), having as its set of transitions and characterized by its incidence matrix and its initial marking , such that its reachability graph is and the marking of node is . In the following, denotes both a reachable marking and its corresponding node in .

Consider any place of the net we look for. Because is pure, can be fully characterized by its corresponding incidence vector , where is the counting vector of path . For any transition that is enabled at , that is, is the label of an outgoing arc of the node in , Consider now any oriented cycle of a reachability graph. Applying the state equation to a node in and summing them up give the following cycle equation: where is an oriented cycle of is a T-vector, denotes the algebraic sum of all occurrences of in , and is the set of oriented cycles of .

According to the definition of , there exists an oriented path from to . Applying (1) along the path leads to . There are several paths from to . Under the cycle equations, the product is the same for all these paths. As a result, can be arbitrarily chosen. The reachability of any marking in implies that The above equation is called the reachability condition. Notably, (3) is necessary but not sufficient. Here spurious markings may be generated. However, their consideration is beyond this study.

It is now clear that the cycle equations and reachability conditions hold for any place . For each pair such that is a reachable marking of and is a transition not enabled at , should be prevented from happening by some place . Since the net is pure, is prevented from happening at by a place if and only if The above is called the event separation condition of . The set of all possible pairs where is a reachable marking and is not enabled at is called the set of event separation instances or marking/transitions-separation instance (MTSI). To solve the control problem, the set of MTSI needed to be identified firstly. The corresponding control places can then be located to prevent transitions of the controlled system from firing in order to keep the state space of legal markings only.

Accordingly, every marking in the legal behavior of the reachability graph must still be reachable after the control place is added. It implies that must satisfy reachability condition of the legal behavior, cycle equations, and the event separation condition of . The three conditions are listed below: Equation (5) is used to determine the additional control place . Notably, different MTSIs may obtain the same solutions. As a result, the number of control places will be much smaller than the sets of MTSIs. In the following section, a more efficient method to reduce the number of MTSIs will be introduced. For convenience, our proposed new deadlock prevention method will follow the above interpretation of the theory of regions.

3. Optimal Control Methodology for Linear Programming Problems

We suppose that a deadlock-prone PN model contains at least a dead marking in its reachability graph at which no transitions are enabled. Therefore, the dead marking is defined formally as follows.

Definition 3. The dead markings at , no transitions are enabled}.

Definition 4. A zone consisting of all dead markings is called dead zone, denoted by .
Once reachable markings enter the dead zone, the system is deadlock. If there is no marking in the dead zone for a reachability graph, the system is called a live one. Therefore, the final goal of this research is to control a deadlock-prone system and then it can become live. For this purpose, the markings in a deadlocked system must be identified. All markings of a reachability graph can be divided into three groups: legal markings (), quasi-dead markings (), and dead markings ().

Definition 5. The quasi-dead markings must eventually evolve to a dead one regardless of transition firing sequences}.

Definition 6. A zone consisting of all quasi-dead markings is called the quasi-dead zone, denoted by .
Markings except quasi-dead markings and dead markings are legal ones. Once a legal marking is enforced into the quasi-dead zone, the net will eventually become deadlock.

Definition 7. A zone consisting of all legal markings is called legal zone, that is, .
Ramadge and Wonham [31] have demonstrated that a system has maximally permissive behavior if exists and the system behavior cannot be led outside . Therefore, all quasi-dead and dead markings are needed to remove and all legal markings are reverse in the reachability graph if one wants to obtain the maximally permissive behavior.

In our previous work [12], we first proposed the concept of CMTSI. Only one type CMTSI is identified to replace with all MTSIs. And also it can make the dead-prone PN model alive. In [14, 30], two types of CMTSIs are introduced. For detailed information please refer to [14, 30]; this work just shows the main definitions.

Definition 8. Type I CMTSI: ,  , and , such that . Denote the set of all the dead markings related to as , that is, such that .

Definition 9. is defined as a transition firing sequence starting in a quasi-dead marking () and ending in a deadlock marking in , where is the number of transitions in , called its length. Denote a firing sequence with the shortest length (i.e., smallest ) from any quasi-dead marking to as given .

Definition 10. Type II CMTSI: , and a firing sequence from to such that   and  . The set of dead markings associated with type II CMTSI is denoted as , called type II deadlocks. ,  , and a firing sequence from to such that and .

Definition 11. A dead marking is always with its corresponding CMTSI. As a result, the corresponding CMTSI is of either type I or II. Note that type I may be regarded as a special case of type II CMTSI by defining (no need to enter but directly to ), and type I CMTSI should be processed first.

In [33], the selective siphon with critical marking control approach [28] is merged in the new deadlock prevention. Based on [33], we propose critical ones of crucial marking/transition-separation instance (COCMTSI) that allows us to locate one COCMTSI from CMTSI. Once the COCMTSIs are controlled, all the paths from legal markings to critical markings are accordingly forbidden. In other words, one selective siphon can control two (or above two) critical markings if those critical markings are in the same minimal siphon. In the following, uncontrolled siphons, critical markings, and selected siphons are defined.

Definition 12. Uncontrolled siphons and critical markings [28].
Let the set of minimal siphons of PN.(i) The set , where , is the set of uncontrolled siphons.(ii) The set denotes the set of empty siphons in the marking .(iii) For any is the set of markings where at least one siphon in is empty.(iv) The set denotes the set of critical markings.(v)A covering set of uncontrolled siphons (CSUS) is a subset of siphons , such that .

Definition 13. The set CMTSI (type I and type II) belong to COCMTSI () once they can be included in same selective siphons.

Definition 14. The set CMTSI (type I and type II) belongs to COCMTSI () once they can be included in the same selective siphons.
For example, based on Table 1, there are five CMTSIs needed to process. Further, it is obvious that CMTSI and CMTSI are included in selective siphon I. Similarly, CMTSI and CMTSI are included in selective siphon II. According to Definition 14, CMTSI and CMTSI can be considered as the same set of the COCMTSI . Similarly, CMTSI and CMTSI are the same set of the COCMTSI . Therefore, one can just choose anyone CMTSI (i.e., CMTSI or CMTSI ) to calculate since both belong to COCMTSI . As a result, only three CMTSIs needed to process if the COCMTSI algorithm is used.

Definition 15. One CMTSI which is not included in any selective siphon needs to be processed.
Petri nets reduction approach is a well-known method to derive the properties of a complex PN model, while preserving the concerned properties, such as boundedness, liveness, and reversibility [31]. By simplifying the PN structure, it is an efficient analysis way to derive the properties of a complex PN model. Here, six simple reduction rules are used. They are (a) fusion of series places; (b) fusion of series transitions; (c) fusion of parallel places; (d) fusion of parallel transitions; and (e) elimination of self-loop places; (f) Elimination of self-loop transitions. Besides, if we assume that is an original PN, and is the simplified PN then is live, safe, and bounded if and only if is live, safe, and bounded.

4. Our New Deadlock Prevention Algorithm

For convenience, we employ a flowchart (i.e., shown in Figure 1) to present our new deadlock prevention algorithm that consists of six stages. The detailed steps are as follows. First of all, the reduction technology is used to simply the construct of Petri net system. Second, we have to locate all reachable markings. Then, we need to identify CMTSIs. Next, we have to check all dead/quasi-dead markings of CMTSIs whether they are included in selective siphons or not. It is worthy to notice that if CMTSIs are included in the same siphons, they are called COCMTSIs. Additionally, we can choose any CMTSI to be processed if the CMTSI belongs to COCMTSIs. Finally, control places can be obtained to control the deadlock problem.

Obviously, the reduction approach is able to reduce the number of LPPs. According to the conventional theory of regions, every MTSI is needed to process with all reachability condition equations and cycle equations. Hence, COCMTSIs can reduce the number of LPPs. It means that less MTSI needs less LPPs to be handled. Since COCMTSI , the number of LPPs will be reduced. Based on the above discussion, we can infer that our proposed deadlock prevention policy is more efficient than the relative methods in [12, 14, 16, 20]. For instance, a classical FMS (i.e., shown in Figure 2) which is taken from [32] is employed as an example. In this case, it is with 16 dead markings, 61 quasi-dead markings, and 205 legal markings. One can realize that there are 205 LPPs needed to process since 205 legal markings will generate 205 reachability condition equations. Our new deadlock prevention policy will be introduced as follows.

In reduction approach stage, one can then obtain the reduced model shown in Figure 3 due to fusion of series transitions rule.

In reachability graph stage, one can locate 176 reachable markings (i.e., ) by PNTOOL [34]. Then 16 dead markings (i.e., ,  ,  , ,  ,  ,  , ,  ,  ,  ,  ,  ,  ,  , and ) can be identified. Additionally, according to Definition 3, 41 quasi-dead markings (i.e., , ,  ,  , , ,  , ,  ,  ,  , ,  , , , , , , , , , , , ,  , , , , , , , , , , , , , , , , and ) can be obtained. For convenience, the detailed information of the dead markings and the quasi-dead markings is listed in Tables 2 and 3.

In identification CMTSI stage, according to Definitions 8 and 10, one can identify all CMTSIs from MTSIs. The detailed information of identifying process please refers to [14, 30]. Table 4 shows all MTSIs.

Hence, the number of legal markings can then be determined. Additionally, types I and II CMTSIs can be obtained that are listed in Tables 5 and 6.

In siphon classification stage, according to the definition in [28], there are three sets of selective siphons , , and in this example. Please note that there are six sets of minimal siphons in it initially.

In identification COCMTSI stage, all CMTSIs need to identify whether CMTSIs belong to COCMTSIs or not. Therefore, we just need to identify the markings , , , , , , and (i.e., type I CMTSI) and , ,  ,  , , , , , , , and (i.e., type II CMTSI) if they are included in , , and or not. After this stage, the identified COCMTSIs are listed in Tables 7 and 8. From Tables 7 and 8, it is obvious that ,  , , , , , , and are included in ; , , , and are included in ; and , , , and are included in . In addition, the other two markings and are not included in any selective siphons. Therefore, ,  , , , , , , and belong to same COCMTSI group. Similarly, , , , and belong to the same COCMTSI group, and , , , and belong to the same COCMTSI group. Just one CMTSI is picked up from same COCMTSI group. Conveniently, the type I CMTSI from the three sets of COCMTSI. They are , , and , shown in Table 9. Besides, the two sets of CMTSI and are necessarily considered. In sum, there are five sets of COCMTSIs needed to be calculated.

In control places stage, six control places can then be obtained by using the theory of regions. The detailed information of the six control places is listed in Table 10.

5. Comparison with Previous Methods

This section compares this work with the past deadlock prevention policies [13, 14, 16, 18, 22, 33].

Obviously, based on Table 11, this work presents a computationally improved optimal control algorithm among the existing literature. The reason is that five sets MTSIs and 119 LPPs are needed to be handled by using our new policy.

6. Conclusion

Linear programming is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear relationships. Our proposed policy can be implemented for simplifying the number of LPPs for solving deadlock prevention for FMSs. The underlying notion of the conventional work is that many MTSIs and LPPs must be solved to prevent legal markings from entering the illegal zone in the original PN model. For this purpose, one must generate all MTSIs and LPPs in a reachability graph such that they need to pay for the high computation cost. However, this work proposed an efficient way which used CMTSIs, the reduction technology, and COCMT to reduce the computation cost. The proposed method can reduce numerous MTSIs and LPPs such that only a few CMTSIs and LPPs are required in this new deadlock prevention policy. Based on the experimental results, our new policy is more efficient than the existing optimal policies as mentioned above. Additionally, our control policy can obtain simplified controlled Petri nets because less control places are needed and also the controlled nets are ordinary.

In the future work, the existing literature [3537] which first investigates the deadlock resolution in the paradigm of Petri nets allowing assembly operations, multiple-type and multiple-quantity resource acquisition, and production ratio among jobs maybe can be considered in our future work.

Acknowledgments

This work was partially supported by the National Science Council of Taiwan under Grant NSC 101-2221-E-013-001. This work is also supported in part by the Open Research Project of the State Key Laboratory of Industrial Control Technology, Zhejiang University, China (no. ICT1318).