Research Article  Open Access
A Multistep LookAhead Deadlock Avoidance Policy for Automated Manufacturing Systems
Abstract
For an automated manufacturing system (AMS), it is a computationally intractable problem to find a maximally permissive deadlock avoidance policy (DAP) in a general case, since the decision on the safety of a reachable state is NPhard. This paper focuses on the deadlock avoidance problem for systems of simple sequential processes with resources (S^{3}PR) by using Petri nets structural analysis theory. Inspired by the onestep lookahead DAP that is an established result, which is of polynomial complexity, for an S^{3}PR without oneunitcapacity resources shared by two or more resourcetransition circuits (in the Petri net model) that do not include each other, this research explores a multiplestep lookahead deadlock avoidance policy for a system modeled with an S^{3}PR that contains a shared oneunitcapacity resource in resourcetransition circuits. It is shown that the development of an optimal DAP for the considered class of Petri nets is also of polynomial complexity. It is indicated that the steps needed to look ahead in a DAP depend on the structure of the net model. A number of examples are used to illustrate the proposed method.
1. Introduction
Automated manufacturing systems (AMSs) are a burgeoning production mode so as to respond to the undulation of the market and the requirements of customization. Such a system is based on computer control, which is composed of a finite set of resources. In an AMS, the whole system or a portion of it cannot terminate its task and remains eventually blocked if deadlocks occur due to the interactional parts and the shared resources [1]. It is required to harmonize the shared resources to ensure that the AMS is deadlockfree, and then the system resources will be fully utilized [2–4].
The occurrences of deadlocks in highly automated systems may lead to serious problems or considerable economy loss. Deadlock problems in AMSs stem from the limited production, storage, and transportation resources, which may bring about a systemwide standstill. In [5], deadlocks will happen if the following four conditions are satisfied: no preemption, hold and wait, circular wait, and mutual exclusion. Mutual exclusion means that a resource can be utilized by one process and there is no other process that can use it at the same time. To break this condition, it is trivial to make all resources not shared by processes, which, however, may lead to a significant increase of system construction cost.
Petri nets [6] are an effective tool for modeling and control of discrete event systems [7, 8]. They become a popular mathematical formalism to deal with deadlock problems in discrete event systems [9, 10] as well as scheduling and supervisory control [11–18]. To manage the problem of deadlocks in a system, three methods have been developed by researchers and practitioners. They are prevention, detection and recovery, and avoidance [19–27]. By setting up an offline resource scheduling or allocation policy, a system can be deadlockfree with deadlock prevention. Detection and recovery methods make use of a monitoring controller for detecting the deadlock occurrence and then recover the production process by terminating some deadlocked processes such that some involved resources are released. The implementation of deadlock avoidance usually deploys an online control method, which is motivated by the traditional feedback control in linear timeinvariant systems. At each state, a controller decides to disable some enabled events such that a feasible event sequence, keeping the system being deadlockfree, is generated. This paper is devoted to the deadlock avoidance for a class of automated manufacturing systems by formulating a multistep lookahead DAP.
Currently, the research on deadlock control is mainly based on structural analysis techniques such as siphons [28, 29] and resource circuits or reachability graphs [30]. The work in [22] reports a siphonbased deadlock control policy by exploring the fact that an unmarked siphon at a reachable marking implies the occurrence of a deadlock or unsafe state. A control place, sometimes called a monitor, is designed for each siphon that can be empty at reachable markings. However, it suffers from the structural complexity problem, since the number of control places is in theory equal to that of siphons to be controlled. In 2004, Li and Zhou proposed the notion of elementary siphons. It proves that deadlocks can be prevented by adding a control place for each elementary siphon to ensure that, under some conditions, it is always marked at any reachable marking. This method requires less control places and thus is applicable to largesized Petri nets. In order to avoid a complete siphon enumeration, the work finds a mixed integer programming (MIP) based deadlock detection method that enumerates a portion of siphons only. A survey on a variety of deadlock control approaches in the Petri net formalism is reported in the studies from the standpoint of structural complexity, behavior permissiveness, and computational complexity of a livenessenforcing supervisor.
Based on the reachability graph analysis, many researchers develop plentiful approaches to control a system. Chen and Li [31] use a vector covering approach to reduce the legal markings and firstmet bad markings (FBMs) to two small sets. By designing control places, a maximally permissive control method can be established. Based on place invariants, Chen and Li [32] develop a deadlock prevention method that can find an optimal livenessenforcing Petri net supervisor with the minimal number of control places. The authors in [33] present a new notion of interval inhibitor arcs as well as their applications to deadlock prevention. An optimal Petri net supervisor that can prevent a system from reaching illegal markings is designed. Recently, a method about designing an optimal Petri net supervisor with data inhibitor arcs is developed [34]. Data inhibitor arcs can enhance the modeling and expression convenience of a Petri net such that an optimal livenessenforcing supervisor can be computed even if the legal state space of a plant is nonconvex.
Inspired by the work in [24, 25], this paper investigates the synthesis problem of an optimal DAP, with polynomial complexity, for AMSs in the framework of Petri nets. Deadlocks can be described as a perfect maximal resourcetransition circuit (MPRTcircuit). As its name suggests, a resourcetransition circuit in a Petri net modeling an AMS is a circuit consisting of resource places and transitions only. It is said to be perfect if the output transitions of the operation places associated with the circuit are exactly the transitions in this circuit. If a resourcetransition circuit is saturated at a reachable state in an S^{3}PR, then the state is not safe, implying that it does not belong to the legal state set. The concept of resources plays an important role in the development of the DAP in [24]. A resource is said to be a resource if its capacity is one and shared by two or more MPRTcircuits that do not include each other. With the utilization of deadlock characteristic description, it is first proved that there are only two types of reachable markings that are safe ones and deadlocks, in an AMS modeled with an S^{3}PR without resources [19]. Under the circumstance, a DAP only needs to prohibit the transitions whose firing leads a system to deadlocks. Consequently, an optimal DAP can be formulated by a onestep lookahead policy [19, 35] to check whether the forthcoming state is safe or not. Furthermore, the proposed optimal DAP is of polynomial complexity with respect to the system scale.
For the case that an S^{3}PR contains resources, the work in [35] indicates that it is worth exploring a multiplestep lookahead policy such that its computation remains tractable. The research conducted in the current paper initially provides a positive answer to this problem. Enlightened by the work in [19, 35], this paper investigates an optimal DAP for a class of S^{3}PR with a resource by formulating a multiplestep lookahead policy. It is shown that the number of steps to look ahead to check the safety of a state depends on the structure of a net model only. Furthermore, the optimal DAP is of polynomial complexity.
The rest of the paper is organized as follows. Section 2 reviews some basic notions and characterizations of Petri nets and S^{3}PR. Section 3 develops a multiplestep lookahead DAP for an S^{3}PR model with a resource. By demonstrating examples, a conservation law has been put forward. In Section 4, a step lookahead DAP for an S^{3}PR model with a resource is presented. Finally, some conclusions and future work are summarized in Section 5.
2. Basic Notions of Petri Nets and the S^{3}PR Models
This section briefly presents some definitions and notations with respect to Petri nets and the S^{3}PR net class.
2.1. Basic Definitions of Petri Nets
A Petri net is a fourtuple , where is called the set of the places and is called the set of the transitions, and are finite, nonempty, and disjoint sets, that is, , , and . is called the set of directed arcs from places to transitions or from transitions to places. is a mapping that assigns a weight to each arc, that is, if , ; otherwise, , where is a set of nonnegative integers. is called the weight function of a Petri net. From graph theory point of view, a Petri net is a bipartite digraph.
A marking of a Petri net is a mapping: . is referred to as a net system or marked net. is the initial marking of . The markings and vectors are usually described by using a multiset or formal sum notation for economy of space. For simplicity, a Petri net with initial marking can be written as () or (). Let be a place of a Petri net . Place is marked at if . A set of places is marked at if at least one place is marked; namely, . is the total number of tokens in at .
Let be a node of a Petri net . The preset of , denoted by , is defined as . The postset is defined as . Given a place (transition) , the elements in its preset are called the pretransitions (preplaces) of ; otherwise, they are named as posttransitions (postplaces).
Let be a Petri net. A transition is enabled at if , , denoted by . An enabled transition can fire. After firing, the Petri net will transit to another state, generating a new marking , that is, , , which is denoted as . A Petri net is said to be selfloopfree if there do not exist a place and a transition such that and . A selfloopfree Petri net can be represented by an incidence matrix with that is an integer matrix indexed by and .
Marking is reachable from if there exist a feasible firing sequence of transitions (transition sequence for the sake of simplicity) and markings such that holds. Given a Petri net , the set of all markings generated from the initial marking is called the reachability set of , denoted by .
A vector indexed by with being the set of integers is called a Pvector. is called a Pinvariant if . It is called a Psemiflow if , . Let be a Pvector. is called the support of Pvector . A nonempty place subset is a siphon if . A siphon is minimal if the removal of any place from makes the fallacy of . A siphon is strict if it does not contain the support of a Psemiflow. The set of strict minimal siphons in a Petri net is denoted by .
A path in a Petri net is a string of nodes, that is, , where , . A circuit is a path with . A simple circuit is a circuit where no node can appear more than once except for and .
2.2. S^{3}PR Models
This section reviews the primary notions and properties of the system of simple sequential processes with resources, which is called an S^{3}PR to be defined from the standpoint of Petri nets [22]. It represents an important net type that can model a large class of automated flexible manufacturing systems. This class of Petri nets has been extensively studied, in addition to its generality, because of its perfect structural and behavioral properties.
Definition 1. A simple sequential process (S^{2}P) is a Petri net , satisfying the following statements:(1) is called the set of the activity (operation) places;(2) is called the process idle place or idle place;(3) is a strongly connected state machine;(4)every circuit of contains the place .
Definition 2. An S^{2}P with resources (S^{2}PR) is a Petri net , satisfying the following:(1)The subnet generated from is an S^{2}P;(2);(3);(4); ;(5).
Definition 3. Given an S^{2}PR , an initial marking is called an acceptable initial marking for if(1);(2);(3).
Definition 4. An S^{3}PR, that is, a system of S^{2}PR, can be defined recursively as follows:(1)An S^{2}PR is an S^{3}PR.(2)Let be two , satisfying , . A Petri net composed of and , denoted as , through is still an S^{3}PR, defined as , , , , and .
Definition 5. Given an S^{3}PR , is an acceptably marked S^{3}PR if(1) is an acceptably marked S^{2}PR;(2), where () is an acceptably marked S^{3}PR. Moreover, , , ; , , ; , .
Given a resource in an S^{3}PR, the set of holders of is denoted as . For a siphon in an S^{3}PR, , where and .
3. DAP and Its Conservation Law in S^{3}PR
This section develops an optimal DAP for a class of S^{3}PR. The work in [19, 23] uses resourcetransition circuits (RTcircuits) to characterize deadlock markings. An RTcircuit is a circuit that contains resource places and transitions only. An RTcircuit is said to be perfect if the pretransitions of the resources in the RTcircuit are exactly their posttransitions. When a maximal perfect RTcircuit (MPRTcircuit) is saturated, deadlocks occur in a system. A resource is called a resource if it is of oneunit (capacity) shared by two or more MPRTcircuits that do not contain each other. In fact, it is proved that, in an S^{3}PR without resource, there only exist two types of reachable markings: safe and deadlock markings. The safe markings are states which belong to the live zone (LZ) that, from the viewpoint of the reachability graph, is the maximal strongly connected component including the initial marking. We need to prohibit the transitions whose firing leads to deadlock markings by a DAP.
Definition 6. Given an S^{3}PR , suppose that there exist two RTcircuits and that do not contain each other, such that . The resource is called a resource if .
For an S^{3}PR without resource, that is, there are no oneunit resources shared by two or more resourcetransition circuits that do not include each other, there is an algorithm with polynomial complexity to determine the safety of a state reachable from a safe one. Therefore, an optimal DAP with polynomial complexity can be constructed by a onestep lookahead method.
On the other hand, for an S^{3}PR containing resources, by means of the theory of regions [21] or the reachability graph analysis of the net, we can obtain the number of steps to look ahead and accordingly derive an optimal DAP. However, this will enumerate all the reachable states since the number of markings grows fast and even exponentially with respect to the system scale and the initial marking. In the rest of the paper, we discuss a special class of S^{3}PR that contains only one resource with some other structural constraints, which is called a unitary S^{3}PR (US^{3}PR).
Definition 7. Let be a strict minimal siphon in an S^{3}PR. Resource is said to be independent if , . Otherwise is said to be dependent. Let denote the set of independent resources in a siphon .
Definition 8. A holderresource circuit (HRcircuit) with respect to a resource in an S^{3}PR, denoted by , is a simple circuit if it contains only one resource with , an activity place , and transitions. If a resource corresponds to one holderresource circuit only, the holderresource circuit is said to be monoploid.
Definition 9. An S^{3}PR is said to be unitary if there is only one resource and , , and is associated with a monoploid holderresource circuit.
Different models may lead to different steps to look ahead in order to construct an optimal DAP. This paper shows that, in a unitary S^{3}PR, no matter how the tokens distribute in resource places, the number of steps looking ahead remains the same, which is called a conservation law with respect to the structure of an S^{3}PR. That is to say, in order to implement an optimal DAP for a US^{3}PR, the number of steps to look ahead is independent of the initial marking.
For example, Figure 1 demonstrates an S^{3}PR, where are resource places, are activity places, and and are idle places. There are three strict minimal siphons, that is, with , , and . Initially, the activity places are void of tokens and the idle places contain a certain amount of tokens. Except for the RTcircuits, there also exist HRcircuits. An HRcircuit consists of a holder place, a resource place, and some transitions. In Figure 1, and are monoploid HRcircuits. Let . As for the resource places, we assume that each of and has one token only at the initial marking since this resource configuration does not interfere with the steps to look ahead. We assume , implying that it is a resource. By Definition 9, the net is a US^{3}PR. Suppose that . It needs three steps to look ahead for an optimal DAP, as shown in Figure 2, which is analyzed in detail as follows.
In Figure 2, LZ represents the live zone and DZ denotes the dead zone [21]. Specifically, the markings in LZ form the set of legal states and those in DZ form the set of illegal states. An optimal DAP should ensure that all legal states are accessible while all illegal states are forbidden. , as a subzone of DZ, represents the markings at which no strict minimal siphon is empty. Specifically, since and are marked at the markings in , siphons , , and are marked in . In this case, a onestep lookahead DAP is not applicable due to the presence of such states in . That is to say, if is empty, an optimal onestep lookahead DAP can be employed for this example. In the case of no confusion, we use LZ (DZ) to denote set of the markings in LZ (DZ).
Definition 10. A marking DZ is said to be pseudosafe in an S^{3}PR if . The set of pseudosafe markings is denoted by .
To further confirm the results, we change the number of tokens in resource places. As and increase, it is found that the steps to look ahead remain three; that is to say, a threestep lookahead method is applicable when and increase. In fact, in an S^{3}PR, the allocation of resources in a system can be affected by idle places. We assume that and are big enough. In this sense, the removal of idle places does not affect the steps to look ahead. The simplified version of the S^{3}PR is visualized in Figure 3. We set the same parameters as in Figure 2, that is, . Figure 4 shows the simulation result.
To generalize the result, we assume that and , where and are arbitrary positive integers. However, it still needs three steps to look ahead in order to find an optimal DAP, as detailed in Figure 5. We could easily figure out that all of the six markings shown in Figure 4 increase by adding tokens in and tokens in .
By this reduced model, it shows that a threestep lookahead DAP is always optimal. By comparing and analyzing the reachability graph of the net in Figure 1 and its reduced model, it is proved that, in a US^{3}PR, the idle places initially with enough tokens will not affect the steps that are needed to look ahead. Thus, for convenience, we only consider its reduced version.
Let us consider a US^{3}PR shown in Figure 6, where are the resource places and are the activity places. We set to ensure that is a resource. Each of the places and has one token. Initial tokens in , , and can be variable to explore the relationship between the steps and their initial markings. Let each of them first contain only one token, respectively.
As shown in Figure 7, we need three or four steps to reach a marking in from a border marking in . Note that a border marking in means that it is the father of a marking in . In summary we need four steps to look ahead in a DAP, as the worst case should be considered. Next we propose a result on the initial tokens in monoploid HRcircuits, which is called a conservation law with respect to independent resources.
Definition 11. Given a Petri net , a marking is said to be a firstmet marking in if . The set of firstmet markings in is denoted as .
Definition 12. Given a Petri net , is defined as the set of the prestates of all firstmet markings in ; that is, .
Theorem 13. Given a unitary S^{3}PR , the initial marking of the resource in a monoploid holderresource circuit does not affect the maximal number of steps needed to look ahead in an optimal DAP.
Proof. We consider two cases: (1) a resource in a monoploid holderresource circuit is not included in a strict minimal siphon and (2) a resource in a monoploid holderresource circuit is included in a strict minimal siphon. It is apparent that a resource not in a strict minimal siphon does not contribute to deadlocks in an S^{3}PR. We hence consider the second case next.
Let be a US^{3}PR with a resource, namely, , which is, without loss of generality, shown in Figure 8. Let , and represent the numbers of monoploid HRcircuits topologically associated with , where .
Let and represent the set of resource places and holder places of monoploid HRcircuits ( , resp.). The node set of the monoploid HRcircuits is , where we assume and .
As shown in Figure 8, the holder places are initially unmarked. Then the simplest initial marking iswhere is a resource place in Figure 8, and . Note that, at , each resource place contains only one token. It is apparent that we need several steps to reach the prestates of the markings in , which belong to . We use to denote such a number in the worst case.
For a more general case, let us assume that contain resource units at some initial marking , respectively, where for (). In this case, we haveOn the other hand, suppose that there is a marking with By comparing the reachability graphs of and , we conclude that, through the same steps, that is, steps, both and can reach the markings in and then move to other markings. That is to say, the parts of the reachability graphs with respect to and can both reach all the markings in along the same path; that is, it generates the same steps that are needed to look ahead. This is because the emptiness of a siphon depends on the last transition whose firing empties it. The length of a path from a marking in to depends on the steps of firing transitions in HRcircuits; that is, it depends on the number of HRcircuits associated with the siphon. By the definitions of and , a feasible transition sequence can be constructed such that , that is, . We conclude that the initial number of tokens in the resource places of the monoploid holderresource circuits does not affect the maximal number of steps needed to look ahead in an optimal DAP.
In this section, we overview the step lookahead method that can help us to find out the deadlock markings. The conservation law shows that, in the considered S^{3}PR model, the steps lookahead are irrelevant to the resources capacity of the specific resource places. In fact, it is related to the structure of a US^{3}PR only. Different US^{3}PR structures may generate steps lookahead differently for an optimal DAP, and the steps lookahead may be the same for different S^{3}PR structures. Nevertheless, once the structure of a US^{3}PR remains unchanged, the steps lookahead remain unchanged. It can be regarded as an inherent nature of the model.
4. A Multistep LookAhead Method for a US^{3}PR
Section 3 indicates that the steps lookahead depend on the S^{3}PR structure. In this section, our attention is restricted to specific relationship between the steps and the structure of an S^{3}PR. Some laws behind the multiplestep lookahead method of an optimal DAP for an S^{3}PR model with a resource are discovered. We classify US^{3}PR into two types: those whose structure is a linear S^{3}PR, that is, LS^{3}PR [36], and those whose structure is a general S^{3}PR. Note that an LS^{3}PR (linear system of simple sequential processes with resources), strictly speaking, is not an extended but a restrictive version of an S^{3}PR. Their difference is that a special constraint is imposed on the state machines in an LS^{3}PR. A state machine in it does not contain choices at internal states that are not the idle states. Note that idle states represent job requests. For economy of space, the definition of an LS^{3}PR is not presented here. For details, one can refer to the work in [36]. Some examples and experimental results are provided to illustrate the laws. Finally, a step lookahead DAP is formulated.
4.1. LS^{3}PR Models with a Resource
In this section, an LS^{3}PR model with a resource is investigated. Figure 9 shows the symmetrical structures of two reduced LS^{3}PR models. According to the reachability graph analysis, Figure 9(a) needs three steps lookahead to avoid deadlocks, while Figure 9(b) needs two. Although the two nets seem to be totally symmetric, different from our imagination, the steps needed are distinct. Unless otherwise stated, a US^{3}PR in this subsection refers to as a unitary LS^{3}PR.
(a)
(b)
Let us consider a Petri net in Figure 10. In order to make a comparison, its four variants are demonstrated in Figures 11 and 12. Some HRcircuits in Figure 10 are removed. It is shown that the net in Figure 10 needs four steps to look ahead. The reduced models in Figures 11(a) and 12(a) need four steps to look ahead. However, Figure 11(b) needs three steps to look ahead and Figure 12(b) needs two steps only. Lemmas 14 and 15 are derived from Figure 8.
(a)
(b)
(a)
(b)
Lemma 14. Let be a US^{3}PR and , and represent the numbers of monoploid holderresource circuits associated with the resource, as shown in Figure 8. The numbers and determine the steps of an optimal DAP to look ahead.
Proof. Without loss of generality, suppose that a unitary S^{3}PR with a resource contains two RTcircuits: and , where and . Let , and represent the numbers of monoploid HRcircuits structurally associated with the resource. For () HRcircuits, the set of nodes in the HRcircuits is , where and . and represent the sets of resource and holder places in the HRcircuits, respectively.
By analyzing the reachability graph, all the markings in the are divided into two parts: Part I associated with and Part II with . In Part I, a resource will transmit only from to in sequence and then reach , that is, the intersection of and as well as the resource place. On the other hand, for Part II, a resource will transmit from to in order and then reach as well. This resource transmission can generate several pseudosafe markings, that is, markings that belong to , which causes multistep to look ahead in a DAP. Thus, the numbers and determine the steps needed to look ahead in a US^{3}PR model.
Lemma 15. Let be a unitary S^{3}PR and represent the numbers of monoploid holderresource circuits structurally associated with the resource. Let . , the number of steps to look ahead in an optimal DAP is . Let . , the number of steps to look ahead in an optimal DAP is .
Proof. For a unitary S^{3}PR with a resource, means that consists of only a pair of resource places and transitions. Based on Lemma 14, only generates one pseudosafe marking, which can lead to a twostep lookahead process. For Part II, there is at least one pseudosafe marking and the steps lookahead depend on only. Therefore, steps are necessary in an optimal DAP. On the other hand, means that consists of a pair of resource places and transitions only. Similar to the abovementioned reasoning, steps are required to look ahead in an optimal DAP.
Lemma 14 proposes the relationship between the number of steps to look ahead and that of resource places. Lemma 15 shows that the number of steps relates to and only. In fact, and have no effect on the final results. As a matter of fact, these two cases, that is, and , are the reverse patterns. The part of HRcircuits corresponds to that of HRcircuits if the net structure is totally inverted and vice versa, which is demonstrated in Figure 8. The resource places in the two RTcircuits may be increased. For the US^{3}PR in Figure 6, there may exist two or more kinds of steps lookahead methods. However, the laws abovementioned are also valid. The overall step lookahead method can be a recombination of two or more basic kinds of step lookahead processes. It is noted that the applicable lookahead steps in an optimal DAP should be the maximal one generated form all step lookahead processes.
In Figure 6, the S^{3}PR with a resource consists of two RTcircuits. One needs three steps to look ahead, while the other needs four steps. Therefore, four steps should be an effective strategy for an optimal DAP, which is shown in Figure 7 in detail. According to the aforementioned conclusions, a step lookahead method based S^{3}PR structure with a resource is presented.
Theorem 16. Let be a US^{3}PR. A step lookahead optimal DAP satisfies .
Proof. Consider a US^{3}PR with a resource shared by two RTcircuits: and , where , and . Let , and represent the numbers of monoploid HRcircuits associated with the resource. According to Lemmas 14 and 15, in the part, the resource transmission process will generate pseudosafe markings. From the steps lookahead point of view, it takes steps from a border legal marking to a marking in which unmarks a strict minimal siphon. For the part, similarly, states in DZ will lead to a step lookahead procedure. Throughout the whole system and considering the worst case, steps will be necessary to look ahead in an optimal DAP.
If we want to find an S^{3}PR with a fourstep lookahead DAP, that is, , by Theorem 16, . There are two situations.(1), that is, .(2), that is, .
Theoretically speaking, since and HRcircuits make no difference to the consequence, there are innumerable structures that can be acceptable. We choose the first case. Let , ; , . According to Figure 8, we can generate the structure in Figure 13, where the initial marking of the net is set as . It needs four steps lookahead, as seen in Figure 14. By introducing the step lookaheadbased structure, it is easy to find a step lookahead S^{3}PR model. Indeed, this structure is obviously not unique.
4.2. US^{3}PR Model
The model considered in this subsection is not restricted to a US^{3}PR that is an LS^{3}PR. Figure 15 shows a typical S^{3}PR model with a resource. In this model, resource places , , , and are shared by the process . Let us suppose a new initial marking with = 1. The related result is demonstrated in Figure 16. To exactly explore the relationship between the steps and the net structure, the set of is divided into a number of subsets that are disjoint.
Definition 17. Given an US^{3}PR , let be a partition of , that is, and , . is said to be a critical subset of firstmet markings in if the subgraph derived from in the reachability graph of is connected and any node in and any node in are not connected.
Definition 18. Given a Petri net , a critical group of states, or simply group, derived by , denoted as , contains and their father nodes in and their leaf nodes in , that is, .
From Figure 16, there are two groups in the reachability graph. As it shows, each group contains two states belonging to . That is, each of them contains a threestep lookahead procedure; that is, it needs three steps to look ahead. As shown in Table 1, and remain unchanged, as being one, since they do not affect the steps to look ahead in an optimal DAP. To ensure that the system contains a resource, we set . By changing and , some laws can be identified. Through this table, it is clear that a threestep lookahead method is always acceptable for the net in Figure 15. On the other hand, makes no difference on the steps lookahead and the number of groups for threestep lookahead procedures. Finally, it is easy to recognize that is related to the number of groups.

Compared with an LS^{3}PR, the appearance of such multiple groups stems from multiple processes in a system. There should exist some relation between the number of groups and that of processes, which is to be explored further. The obtained results are also in accord with the condition of the step lookahead model; that is, it only relates to and . In this model, obviously we have and . According to , the steps that are needed to look ahead are exactly three. Theorem 19 presents the step lookahead law based on this kind of type.
Theorem 19. Let be a US^{3}PR. and represent the numbers of the HRcircuits as shown in Figure 17. A step lookahead optimal DAP satisfies .
Proof. It is similar to the proof of Theorem 16.
Note that and determine the number of steps lookahead. However, because of the presence of the extra processes in a unitary S^{3}PR, the resource transmitting procedure in holder places and resource places will be enlarged. Therefore, in this kind of model, the steps lookahead may not be only one. It depends on the number of the extra processes in the model and the tokens distribution of the resource places.
5. Conclusion
Based on S^{3}PR models, this paper shows that, in an S^{3}PR with a resource, there is a kind of markings that belong to . These markings in do not empty the strict minimal siphons of a Petri net but belong to the dead zone. Due to their presence, the onestep lookahead method is not applicable. By multiplestep lookahead, the states in can be identified and an optimal DAP with polynomial complexity can be obtained. Then, by introducing a conservation law of the steps lookahead, it is proved that the steps to look ahead in an optimal DAP merely depend on the structure of the considered net class, which is the inherent nature of the model. Finally, a step lookahead method is presented through the analysis of the considered models. By following the laws, an S^{3}PR structure with a resource needing step to look ahead can be obtained. A significative question is whether these results can be extended to more general cases such as an S^{3}PR model with multiple resources or more general types of Petri nets.
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.
Acknowledgments
This work is supported by the National Natural Science Foundation of China under Grant no. 61374068, the 111 Project B14042, and the Science and Technology Development Fund, MSAR, under Grant no. 078/2015/A3. The authors extend their appreciation to the International Scientific Partnership Program ISPP at King Saud University for funding this research work through ISPP#0079.
References
 E. G. Coffman, M. Elphick, and A. Shoshani, “System Deadlocks,” ACM Computing Surveys (CSUR), vol. 3, no. 2, pp. 67–78, 1971. View at: Publisher Site  Google Scholar
 L. Piroddi, R. Cordone, and I. Fumagalli, “Selective siphon control for deadlock prevention in Petri nets,” IEEE Transactions on Systems, Man, and Cybernetics Part A, vol. 38, no. 6, pp. 1337–1348, 2008. View at: Publisher Site  Google Scholar
 L. Piroddi, R. Cordone, and I. Fumagalli, “Combined siphon and marking generation for deadlock prevention in Petri nets,” IEEE Transactions on Systems, Man, and Cybernetics, Part A, vol. 39, no. 3, pp. 650–661, 2009. View at: Publisher Site  Google Scholar
 J. Park and S. A. Reveliotis, “Deadlock avoidance in sequential resource allocation systems with multiple resource acquisitions and flexible routings,” Institute of Electrical and Electronics Engineers. Transactions on Automatic Control, vol. 46, no. 10, pp. 1572–1583, 2001. View at: Publisher Site  Google Scholar  MathSciNet
 E. R. Chopra, in Operating System (A Practical Approach), S. Chand, Ed., pp. 219220, 2009.
 T. Murata, “Petri nets: properties, analysis and applications,” Proceedings of the IEEE, vol. 77, no. 4, pp. 541–580, 1989. View at: Publisher Site  Google Scholar
 P. J. Ramadge and W. M. Wonham, “Supervisory control of a class of discrete event processes,” SIAM Journal on Control and Optimization, vol. 25, no. 1, pp. 206–230, 1987. View at: Publisher Site  Google Scholar  MathSciNet
 P. J. C. Ramadge and W. Murray Wonham, “The Control of Discrete Event Systems,” Proceedings of the IEEE, vol. 77, no. 1, pp. 81–98, 1989. View at: Publisher Site  Google Scholar
 K. Yamalidou, J. Moody, M. Lemmon, and P. Antsaklis, “Feedback control of Petri nets based on place invariants,” Automatica. A Journal of IFAC, the International Federation of Automatic Control, vol. 32, no. 1, pp. 15–28, 1996. View at: Publisher Site  Google Scholar  MathSciNet
 H. Liu, J. You, Z. Li, and G. Tian, “Fuzzy petri nets for knowledge representation and reasoning: a literature review,” Engineering Applications of Artificial Intelligence, vol. 60, pp. 45–56, 2017. View at: Publisher Site  Google Scholar
 H. Liu, W. Wu, H. Su, and Z. Zhang, “Design of optimal Petrinet controllers for a class of flexible manufacturing systems with key resources,” Information Sciences, 2014. View at: Publisher Site  Google Scholar
 H. Lei, K. Xing, Z. Gao, and F. Xiong, “A hybrid discrete differential evolution algorithm for deadlockfree scheduling with setup times of flexible manufacturing systems,” Transactions of the Institute of Measurement and Control, vol. 38, no. 10, pp. 1270–1280, 2016. View at: Publisher Site  Google Scholar
 Y. Du, N. Gu, and X. Zhou, “Accelerating reachability analysis on petri net for mutual exclusionbased deadlock detection,” IEICE Transactions on Information and Systems, vol. E99D, no. 12, pp. 2978–2985, 2016. View at: Publisher Site  Google Scholar
 G. Liu and K. Barkaoui, “A survey of siphons in Petri nets,” Information Sciences, vol. 363, pp. 198–220, 2016. View at: Publisher Site  Google Scholar
 Z. Jiang, H. Wang, X. Chen, M. Tang, and J. Ye, “An enhanced supervisory control strategy for periodicity mutual exclusions in discrete event systems based on Petri nets,” Discrete Dynamics in Nature and Society. An International Multidisciplinary Research and Review Journal, Art. ID 1395142, 14 pages, 2017. View at: Publisher Site  Google Scholar  MathSciNet
 X. L. Li, K. Y. Xing, Y. C. Wu, X. N. Wang, and J. C. Luo, “Total energy consumption optimization via genetic algorithm in flexible manufacturing systems,” Computers and Industrial Engineering, vol. 104, pp. 188–200, 2017. View at: Publisher Site  Google Scholar
 X. Han, Z. Chen, Z. Liu, and Q. Zhang, “Calculation of siphons and minimal siphons in Petri nets based on semitensor product of matrices,” IEEE Transactions on Systems, Man and Cybernetics: Systems, vol. 47, no. 3, pp. 531–536, 2017. View at: Publisher Site  Google Scholar
 Y.S. Huang, M. Jeng, X. Xie, and D.H. Chung, “Siphonbased deadlock prevention policy for flexible manufacturing systems,” IEEE Transactions on Systems, Man, and Cybernetics Part A:Systems and Humans, vol. 36, no. 6, pp. 1248–1256, 2006. View at: Publisher Site  Google Scholar
 K. Xing, M. C. Zhou, H. Liu, and F. Tian, “Optimal Petrinetbased polynomialcomplexity deadlockavoidance policies for automated manufacturing systems,” IEEE Transactions on Systems, Man, and Cybernetics Part A:Systems and Humans, vol. 39, no. 1, pp. 188–199, 2009. View at: Publisher Site  Google Scholar
 M. Lawley and S. Reveliotis, “Deadlock avoidance for sequential resource allocation systems: Hard and easy cases,” International Journal of Flexible Manufacturing Systems, vol. 13, no. 4, pp. 385–404, 2001. View at: Publisher Site  Google Scholar  MathSciNet
 M. Uzam, “An optimal deadlock prevention policy for flexible manufacturing systems using petri net models with resources and the theory of regions,” The International Journal of Advanced Manufacturing Technology, vol. 19, no. 3, pp. 192–208, 2002. View at: Google Scholar  MathSciNet
 J. Ezpeleta, J. M. Colom, and J. Martinez, “A Petri Net Based Deadlock Prevention Policy for Flexible Manufacturing Systems,” IEEE Transactions on Robotics and Automation, vol. 11, no. 2, pp. 173–184, 1995. View at: Publisher Site  Google Scholar
 K. Y. Xing, M. C. Zhou, F. Wang, H. X. Liu, and F. Tian, “Resourcetransition circuits and siphons for deadlock control of automated manufacturing systems,” IEEE Transactions on Systems, Man, and Cybernetics Part A, vol. 41, no. 1, pp. 74–84, 2011. View at: Publisher Site  Google Scholar
 S. A. Reveliotis, M. A. Lawley, and P. M. Ferreira, “Polynomialcomplexity deadlock avoidance policies for sequential resource allocation systems,” Institute of Electrical and Electronics Engineers. Transactions on Automatic Control, vol. 42, no. 10, pp. 1344–1357, 1997. View at: Publisher Site  Google Scholar  MathSciNet
 K.Y. Xing, B.S. Hu, and H.X. Chen, “Deadlock avoidance policy for Petrinet modeling of flexible manufacturing systems with shared resources,” Institute of Electrical and Electronics Engineers. Transactions on Automatic Control, vol. 41, no. 2, pp. 289–295, 1996. View at: Publisher Site  Google Scholar  MathSciNet
 M. P. Fanti, “Deadlock Resolution Strategy for Automated Manufacturing Systems Including Conjunctive Resource Service,” IEEE Transactions on Systems, Man, and Cybernetics Part A:Systems and Humans., vol. 34, no. 1, pp. 80–92, 2004. View at: Publisher Site  Google Scholar
 Y. Chen, Z. Li, A. AlAhmari, N. Wu, and T. Qu, “Deadlock recovery for flexible manufacturing systems modeled with Petri nets,” Information Sciences. An International Journal, vol. 381, pp. 290–303, 2017. View at: Publisher Site  Google Scholar  MathSciNet
 K. Barkaoui and I. B. Abdallah, “A deadlock prevention method for a class of FMS,” in In Proceedings of the IEEE International Conference on Systems, Man and Cybernetics, vol. 5, pp. 4119–4124, Intelligent Systems for the 21st Century, 1995. View at: Google Scholar
 K. Barkaoui, A. Chaoui, and B. Zouari, “Supervisory control of discrete event systems based on structure theory of Petri nets,” in Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, Computational Cybernetics and Simulation, pp. 3750–3755, October 1997. View at: Google Scholar
 M. Uzam, Z. Li, G. Gelen, and R. S. Zakariyya, “A divideandconquermethod for the synthesis of liveness enforcing supervisors for flexible manufacturing systems,” Journal of Intelligent Manufacturing, vol. 27, no. 5, pp. 1111–1129, 2016. View at: Publisher Site  Google Scholar
 Y. Chen and Z. Li, “Design of a maximally permissive livenessenforcing supervisor with a compressed supervisory structure for flexible manufacturing systems,” Automatica. A Journal of IFAC, the International Federation of Automatic Control, vol. 47, no. 5, pp. 1028–1034, 2011. View at: Publisher Site  Google Scholar  MathSciNet
 Y. Chen and Z. Li, “On structural minimality of optimal supervisors for flexible manufacturing systems,” Automatica. A Journal of IFAC, the International Federation of Automatic Control, vol. 48, no. 10, pp. 2647–2656, 2012. View at: Publisher Site  Google Scholar  MathSciNet
 Y. F. Chen, Z. W. Li, K. Barkaoui, and M. Uzam, “New Petri net structure and its application to optimal supervisory control: Interval inhibitor arcs,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 44, no. 10, pp. 1384–1400, 2014. View at: Publisher Site  Google Scholar
 Y. Chen, Z. Li, K. Barkaoui, N. Wu, and M. Zhou, “Compact supervisory control of discrete event systems by petri nets with data inhibitor arcs,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 47, no. 2, pp. 364–379, 2017. View at: Publisher Site  Google Scholar
 N. Wu, M. Zhou, and G. Hu, “Onestep lookahead maximally permissive deadlock control of AMS by using petri nets,” Transactions on Embedded Computing Systems, vol. 12, no. 1, article no. 10, 2013. View at: Publisher Site  Google Scholar
 J. Ezpeleta, F. Garc\'\i aVall\'es, and J. M. Colom, “A class of well structured PETri nets for flexible manufacturing systems,” in Application and theory of PETri nets 1998 (Lisbon), vol. 1420 of Lecture Notes in Comput. Sci., pp. 64–83, Springer, Berlin, 1998. View at: Publisher Site  Google Scholar  MathSciNet
Copyright
Copyright © 2017 Chao Gu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.