Abstract

This work develops an iterative deadlock prevention method for a special class of Petri nets that can well model a variety of flexible manufacturing systems. A deadlock detection technique, called mixed integer programming (MIP), is used to find a strict minimal siphon (SMS) in a plant model without a complete enumeration of siphons. The policy consists of two phases. At the first phase, SMSs are obtained by MIP technique iteratively and monitors are added to the complementary sets of the SMSs. For the possible existence of new siphons generated after the first phase, we add monitors with their output arcs first pointed to source transitions at the second phase to avoid new siphons generating and then rearrange the output arcs step by step on condition that liveness is preserved. In addition, an algorithm is proposed to remove the redundant constraints of the MIP problem in this paper. The policy improves the behavioral permissiveness of the resulting net and greatly enhances the structural simplicity of the supervisor. Theoretical analysis and experimental results verify the effectiveness of the proposed method.

1. Introduction

Deadlocks [1] always appear in the operations of a flexible manufacturing system (FMS). Hence, deciding how to reduce the impact of deadlocks is a very tricky problem that we have to cope with. Digraphs, automata, and Petri nets are three major mathematical tools to deal with deadlock problems in resource allocation systems.

Digraphs are used to deal with the deadlock detection and avoidance in [2, 3]. Researchers [4, 5] adopt automata as model tools to dispose the deadlock problem while Petri nets [6] are applied to model and analyze FMS. The main Petri net strategies are deadlock detection and recovery [7, 8], deadlock avoidance [911], and deadlock prevention [1219].

This paper focuses our attention on deadlock prevention problems. A Petri net based deadlock prevention approach utilizes an off-line computational mechanism to impose constraints on a system to prevent the system from reaching deadlock states. Monitors (control places) and their related arcs are used to achieve such purposes and collectively called a supervisor of the plant model.

The theory of regions, as a technique to design supervisors for a Petri net, is adopted in [13, 20, 21]. Generally, the theory can lead to an optimal supervisor [2228] if it exists. However, the theory is based on a reachability graph, which may cause state explosion with a net size increasing.

McMillan and Probst propose the concept of unfolding nets in [29] to describe the behavior of an FMS. A prefix of an unfolding net is adequate to completely describe the properties of a net, which is a concise but efficient method compared with the theory of regions. However, deciding how to find a complete and simple prefix is still worth consideration.

Siphons are special sets of places of a Petri net, by controlling which one can effectively prevent deadlocks. Ezpeleta et al. [12] propose a policy by enumerating siphons and impose constraints for the siphons to solve deadlock prevention problems. However, it is a time-consuming task with nets scale expansion [30]. In addition, behavioral permissiveness and structural complexity are tough issues that we have to face. Li and Zhou [14] propose elementary siphon theory, where enumerated siphons are divided into two parts: elementary and dependent. Monitors are only needed for the elementary siphons as long as the dependent siphons are controllable, which greatly reduces the structural complexity. Moreover, the computational complexity is reduced and the behavioral permissiveness is enhanced in the subsequent research [15, 3138].

Huang et al. [39] propose a two-stage deadlock prevention policy for System of Simple Sequential Processes with Resources (S3PR), a class of Petri nets that was proposed in [12]. The policy explores SMS based on the MIP technique, developed by Chu and Xie [40] for structurally bounded nets. For S3PR, at the first stage, by the MIP technique, maximal unmarked siphon is obtained first if there exist deadlocks. SMS can be derived from the maximal unmarked siphon and a corresponding constraint, imposed on the complementary set of the SMSs to prevent it from being unmarked, is obtained enforcing the constraint to the MIP problem to check the liveness of the plant net under the constraint. If there still exists a maximal unmarked siphon, repeat the above process till the plant net is live under the derived constraints. Thus, we can obtain one or more constraints and add corresponding monitors (including their related arcs) to the complementary sets of the SMSs. Hence, the resulting net obtained after the first stage is a net consisting of the plant net and the corresponding monitors. Control-induced siphons (composed by operation places, resource places, and the monitors) can possibly be generated due to the addition of the monitors. The second stage, similar to the first one, is still an iterative process in finding siphons and the difference is that the monitors of this stage are added with their output arcs pointed to source transitions, which makes the control-induced siphons controlled and no problematic siphons were generated. The policy can usually lead to a more permissive supervisor than that proposed in [12].

However, there exist the following defects in [39]. First, the SMS obtained after an iteration is nondeterministic due to the following two reasons. The first is that the solution (corresponds to a maximal unmarked siphon) of the MIP problem is not unique and the second is that we can find different SMSs from the same maximal unmarked siphon via different place selection sequences. Thus, the sequence of the generation of SMSs is uncertain. Sometimes, SMS can be controlled if the subsequent SMSs are controlled. Hence, adding a monitor for the SMS is redundant and makes the control structure complex.

Second, at the second stage in [39], the constraint, mentioned at Step  17 of Algorithm of [39] and used for exploring the condition of liveness in the considered MIP problem, is imposed on the complementary set of new generated SMSs (derived from a control-induced siphon) while the output arcs of the constraint corresponding monitor are pointed to source transitions. It causes the fact that the constraints obtained at the second stage are always more than the necessary monitors. However, the number of added monitors for SMSs is requested consistent with that of the obtained constraints in terms of the policy, which leads to the fact that redundant monitors are generated and the behavioral permissiveness is generally restricted.

This work improves [39] in terms of structural complexity and behavioral permissiveness by the following three points. First, for removing the redundant constraints, an algorithm is developed that checks the redundancy of a constraint by deciding whether the liveness is preserved after its removal. This operation markedly reduces the structural complexity. Second, a new type of constraints is constructed to replace the one that emerged at Step  17 of Algorithm   in [39] to reduce structural complexity and enhance behavioral permissiveness. The generation of redundant monitors is avoided by imposing the new constraint on the complementary set of newly generated SMSs and the set of its upstream places (defined in Definition 14), which makes the constraint have the same effect with the monitors added at the second stage on preventing the newly generated SMS from being unmarked. Third, for each output arc of the monitors added at the second stage, it is led from the source transition step by step to release more legal states on condition that the liveness is preserved. In summary, the improvements largely enhance the performance of a supervisor for a plant net.

The rest of this paper is organized as follows. Preliminaries used in this paper are presented in the next section. In Section 3, we introduce a deadlock prevention policy that mainly contains two phases: siphon control phase and extended siphon control phase. The specific method is shaped to an algorithm in Section 4. By experimental analysis, the performance of the proposed method is shown in Section 5. Finally, Section 6 concludes this paper.

2. Preliminaries

2.1. Basics of Petri Nets

A Petri net is a four-tuple , where and are the sets of places and transitions, respectively. is called a flow relation, represented by arcs with arrows from transitions to places or from places to transitions. is a mapping that assigns a weight to an arc: if , where ,   (or , ), and . If , , the net is called an ordinary Petri net; otherwise, it is called a generalized Petri net.

A marking (also called a state) is a mapping from to . The number of tokens in place is denoted by . A place is marked at a marking if . denotes the sum of tokens of all places in ; that is, , where . is marked at if . is unmarked at if . is called a net system and is called an initial marking of .

Let be a node of . is called the preset of and is called the postset of . Similar notation extended to a set of nodes is as follows: given , , , , and .

A nonempty set is called a siphon if . is minimal if there is no siphon in as a proper subset. is strict if .

A transition is enabled at a marking if, , and denoted as . Firing yields a new marking that can be denoted by and is called an immediately reachable marking from . A marking is said to be reachable from if there exists a sequence of transitions and markings , and such that holds. The set of markings reachable from in is called the reachability set of Petri net and denoted as . The set of legal states of net is defined as follows: .

A transition is live at if, , , . is live if, , is live at . It is dead at if , . It is deadlock-free if , , .

A -vector is a column vector indexed by and a -vector is a column vector indexed by , where is the set of integers. The column vectors where every entry equals are denoted by . is a integer matrix with . is the transposed versions of vector . -vector is called a -invariant if and and is the support of . is minimal if its support is not contained in the support of any other and its components are mutually prime. -invariant is a -semiflow if its every element is nonnegative.

2.2. S3PR

In this subsection, we introduce a class of Petri nets, called S3PR, first defined in [12], which stands for Systems of Simple Sequential Processes with Resources and can model real-life automated FMSs.

Definition 1 (see [12]). An ordinary Petri net is called a state machine if, ,  . It is strongly connected if, , there is a sequence of nodes , and such that , and , where .

Definition 2 (see [12]). A simple sequential process (S2P) is a Petri net , where is the set of operation places, is the idle process place, is a strongly connected state machine, and the circuit of contains .

Definition 3 (see [12]). A simple sequential process with resources (S2PR) is a Petri net such that (1)the subnet generated by is S2P,(2) and , where is called the set of resource places,(3), , , , ,(4)(a) , and (b), , ,(5).

Definition 4 (see [12]). S3PR is a system of S2PR, defined as follows: (1)An S2PR is an S3PR.(2)Let , , be two S3PR such that , , and . Then, combine and via into a net . is also an S3PR, defined as follows: (1) , (2) , (3) , (4) , and (5) .

Transitions in are called source transitions, which represent the entry of raw materials when FMS is modeled with an S3PR.

Definition 5 (see [12]). For , is called the set of holders of , which represent the operation places that use . Let be siphon and ; is called the complementary set of .

Theorem 6 (see [12]). An S3PR is live if, , , .

Let be the set of SMSs in an S3PR. The above theorem indicates that an S3PR is live if there is no siphon that can be emptied.

2.3. MIP Technique

Let be an ordinary net with and let be the maximal unmarked siphon at ; that is, , . In the sequel, we introduce a technique, first proposed in [40], to find in by exploring the solution of a mixed integer programming (MIP) problem. , let and, , let .

Since is a siphon and, , , any with and any with should be removed from the solution. Furthermore, , implies and, , implies the truth of . This leads to

For a structurally bounded net, we havewhere denotes the structural bound of place . Therefore, the maximal unmarked siphon can be determined by the following MIP problem and there exist siphons unmarked in if :subject to constraints (1)-(2) and

Although MIP problems are NP-hard, it is shown in [40] that its computational efficiency is relatively insensitive to the initial marking and more efficient than state enumeration methods.

Theorem 7 (see [40]). Let be an ordinary Petri net with . is live if .

Theorem 7 is used to check S3PR whether liveness is enforced or not. If equals the cardinality of the place set of , it implies that is live.

However, the classical MIP problem to determine a maximal unmarked siphon in [40] only applies to ordinary Petri nets. As for a generalized Petri net, deadlocks may occur due to insufficiently marked siphons. Hence, the new conditions for checking whether there exist a maximal unmarked siphon in a generalized Petri net with are presented in [41], where a new constraint (5) is used to replace constraint (2):

The maximal unmarked siphon of a generalized Petri net can be determined by the following MIP problem and there exist unmarked siphons if :subject to constraints (1) and (5) and

Theorem 8 (see [41]). Let be a generalized Petri net with . is live if .

For a generalized Petri net , if equals the cardinality of the place set of , we can conclude that is live.

3. Siphon Control Approach

In general, the presented method mainly contains two phases: siphon control phase and extended siphon control phase. The two phases are similar in finding siphons and the difference between them is the fashion of adding monitors for the siphons.

First, we apply the MIP technique to a plant net to obtain a maximal unmarked siphon (if there exists one), derive a minimal siphon from the maximal one by the minimal siphon extraction algorithm in [42], and check liveness by solving an MIP problem of the plant net after enforcing a constraint imposed on the complementary set of the minimal siphons. Repeat the above process until the plant net is live under a set of constraints. After removing redundant constraints by a proposed algorithm, we add monitors to the complementary sets of the minimal siphons according to the remaining constraints. If in the resulting net there still exists a deadlock, we conduct the next phase.

At the second phase, a newly presented constraint, different from the one claimed at Step  17 of Algorithm in [39], is enforced to the MIP problem of the resulting net of the first phase for preventing the system from reaching deadlock states. After iterations, we obtain a set of constraints and implement the constraints by adding monitors with the output arcs (with weights) pointing to the source transitions to avoid the generation of new problematic siphons. Then the output arcs of the monitors are rearranged to obtain a more permissive supervisor.

3.1. Siphon Control Phase

At this phase, for modeling a maximally permissive supervisor as much as possible, a monitor for an SMS is designed to be imposed on the complementary set of the SMSs.

Definition 9 (see [39]). Let be an SMS in an S3PR . A monitor for is added to to prevent from being unmarked such that(1); ,(2); , ,(3),where and denote the weights of related arcs of and denotes the initial number of tokens in .

Theorem 10 (see [43]). The addition of for minimally restricts the behavior of a plant net.

Definition 9 shows the fashion of adding a monitor for an SMS at the first phase. In the sequel, we should identify SMSs that need to be controlled.

In this study, the MIP technique is applied to iteratively find SMSs to avoid a complete siphon enumeration. For an S3PR , an SMS can be found in by the MIP technique if it is not live. A constraint is enforced to the MIP problem of , which implies that cannot be unmarked any more in the MIP problem while the constraint minimally restricts the behavior of the plant net, where is a variable of the MIP problem and denotes the number of tokens in and is the number of tokens in at the initial marking. If is live under the constraint, we just need to enforce the constraint by adding a corresponding monitor to and end the first phase. Otherwise, we need to iterate and will obtain a set of constraints in the MIP problem, under which can never reach deadlock states.

However, if the number of constraints is more than one, there may be the case that not all the constraints are necessary. As mentioned in Introduction, some constraints can be replaced by the combination of other constraints and therefore they are redundant. Here, we propose an algorithm to exclude redundant constraints and the remaining ones are necessary.

Algorithm 1 eliminates redundancy by excluding a constraint each time. If the liveness is preserved after removing the constraint, we can conclude that the constraint is redundant and should be removed. Otherwise, it should be considered as necessary.

Input: A Petri net , and a set of constraints .
Output: A set of necessary constraints .
(1) begin
(2) .    denotes a set of necessary constraints
(3) while  
  (3.1) Choose a constraint from ; .
  (3.2) Enforce to the MIP problem of .
  (3.3) if  {there exists a maximal unmarked siphon}
    (3.3.1) .
(4) Output .
(5) end

A necessary constraint corresponds to an SMS that needs to be controlled. The constraint is achieved by adding a monitor and related arcs to the plant net to prevent the corresponding SMS from being unmarked. Hence, a necessary constraint requires a monitor.

Given an S3PR with , we enforce the necessary constraints by adding monitors according to Definition 9 and denote the resulting net as (), where and denotes the set of monitors . Then,(1) and(2); ,(3), ,(4), is the same as in Definition 9.

Theorem 11 (see [39]). is live if no siphon in can be emptied.

Now, the S3PR net depicted in Figure 1(a) is taken as an example. It has 11 places, where is the set of idle places, is the set of operation places, and is the set of resource places. Applying the MIP technique to the net, a maximal unmarked siphon is found. An SMS can be derived from the maximal one, denoted as , where and are resource places and and denote their holder sets, respectively. According to the definition of complementary sets, we have and . Constraint is enforced to the MIP problem of the plant net to check whether the plant net is live under the constraint. If it is not live, we need to continue to find an SMS and enforce a corresponding constraint to the MIP problem of the plant net. After three iterations, the plant net is live under three derived constraints. We find that there exists no redundant constraint by applying Algorithm 1. Three monitors are added by Definition 9 and shown in Figure 1(b).

We find that all of the above three constraints are necessary. However, if we change the initial marking of the net in Figure 1(a) to the one shown in Figure 2(a), we may find three constraints in turn:

If constraint (8) can be found first, we still require constraints (9) and (10) to guarantee liveness, which makes constraint (8) redundant. Consequently, Algorithm 1 becomes an essential tool to deal with this condition. The controlled net is shown in Figure 2(b).

In fact, the condition of Theorem 11 is not always met. Newly added monitors and resource places may coproduce new siphons. Therefore, the second phase is proposed to solve this problem.

3.2. Extended Siphon Control Phase

In this subsection, we still utilize the MIP-based deadlock detection method to find siphons (if there exist ones). In order to avoid the case that the added monitors take part in generating new siphons (i.e., control-induced siphons), the output arcs of monitors (with weighted arcs) added at this phase are pointed to source transitions first. Then the output arcs are rearranged to be far away from the source transitions to release legal states. The following definitions are presented to introduce the fashion of adding a monitor for an SMS at the second phase.

Definition 12. Let be an S3PR, let be the idle place of a process, and let and be different operation places in the process. If can be found in the process path (in accordance with the direction of the arrows of the process flow) from to ( and are not included), is called a downstream place of , denoted as , and is called an upstream place of , denoted as .

Definition 13. Let be an operation place of an S3PR. is called the set of downstream places of and is called the set of upstream places of .

Definition 14. Let be an SMS of an S3PR, let be the complementary set of , and let be an operation place in . is called the set of upstream places of and is called the set of upstream places of in process , where denotes the set of operation places in process .

Take the S3PR net depicted in Figure 1(a) as an example. is a downstream place of , denoted as . is an upstream place of , denoted as . Moreover, and are the downstream places of , denoted as . and are the upstream places of , denoted as . It is supposed that and . and are two SMSs in . , , and . Similarly, , , and .

Definition 15. Let be an SMS of with . The complementary set of is defined as , where and . can be written in the multiset form and represents the coefficient of .

Suppose that , and we have , , and .

Definition 16. Let be an SMS of . is called the maximum demand for resources of on .

Next, we illustrate the definition with the example . Suppose that is a set of operation places in a process with while is a set of operation places in another process, and we have , , , and .

Definition 17 (see [39]). Let be an SMS in . A monitor for is added to to prevent from being unmarked such that(1),(2),(3),where and denote the weights of related arcs of and denotes the initial number of tokens in .

If is not live, we can find an SMS containing monitors added at the first phase. In [39], at the second stage, a constraint is enforced to the MIP problem of to prevent from being unmarked in the MIP problem, where is a variable of the MIP problem and denotes the number of tokens in , is the number of tokens in at . By exprimental analysis, it is found that the constraint is imposed on the complementary set of while the output arcs of monitors are pointed to source transitions to prevent the generation of control-induced siphons, which makes redundant constraints emerged. Hence, in the following, a new type of constraints is proposed to solve the problem.

Based on Definitions 1216, we propose a new constraint, , to replace , where is a variable of the MIP problem and denotes the number of tokens in and is the number of tokens in at . Similar to the first phase, for controlling the derived SMSs in the MIP problem, we can obtain one or a set of such constraints, under which is live. Applying Algorithm 1 to the constraints, we find a set of necessary constraints and each of them corresponds to an SMS that needs to be controlled.

For the net with obtained after the first phase, the necessary constraints are enforced by adding monitors to according to Definition 17 and the resulting net is denoted as (), where and denotes the set of monitors . Then,(1),(2), , and are the same as and in Definition 17, respectively,(3),(4), is the same as in Definition 17.

Theorem 18 (see [44]). is live.

The fashion of adding monitors in Definition 17 restricts the behavioral permissiveness while avoiding the generation of control-induced siphons. Hence, we utilize Algorithm 2 to release legal states.

Input: Net , with .
Output: A more permissive supervisor , .
(1) begin
(2) .    denotes the set of monitors with rearranged output arcs
(3) while  
  (3.1) Choose a monitor from ; ; .
    The resulting net is denoted by , , where .
  (3.2) Find , where and is the total number of processes.
        is the SMS controlled by   
  (3.3) foreach  ,
    (3.3.1) ; ; .
             and denote two sets of operation places
    (3.3.2) while  
      (3.3.2.1) Choose ; .
      (3.3.2.2) ; .
      (3.3.2.3) with rearranged output arcs is added to ,
            such that is a -invariant of the resulting net,
            denoted by , , where and .
      (3.3.2.4) if  
        (3.3.2.4.1) .
      (3.3.2.5) else
        (3.3.2.5.1) ; ; .
      (3.3.2.6) Remove from , and obtain , .
    (3.3.3) if  
      (3.3.3.1) ; ; go to (3.3.2)
  (3.4) with rearranged output arcs is added to , such that is a -invariant
    of the resulting net, denoted by , ; .
(4) Output , with .
(5) end

Algorithm 2 aims to construct a more permissive supervisor, which releases most legal states. For each monitor added by Definition 17, move each of its output arcs that originally points to a source transition step by step away from the source transition. Note that all the movements are implemented on condition that the liveness is preserved and the liveness is checked by the MIP problem for generalized Petri nets.

Theorem 19. is live.

Proof. is obtained based on the rearrangements of the output arcs of monitors in . By Theorem 18, it is found that is live. In addition, each movement of the output arcs is implemented on condition that ( denotes the resulting net of each movement) equals the cardinality of the place set of , which implies that there is no unmarked siphon. According to Theorem 8, is live.

For the S3PR shown in Figure 3, the number of its maximally permissive states is 891. The first phase leads to 12 monitors, as shown in Table 1. The resulting net is denoted as . However, there still exist maximal unmarked siphons rendering deadlocks. Two minimal siphons and , can be derived. The multisets of and are presented as below. is live under constraints (12) and (13).

Multisets are as follows:

Constraints are as follows:

It is found that constraint (10) is redundant by applying Algorithm 1. According to constraint (12), with its output arcs pointed to source transitions, as shown in Figure 4(a), is added to by Definition 17. The resulting net is live and it has 870 reachable states. Finally, we find with rearranged output arcs by Algorithm 2, as depicted in Figure 4(b). We denote the resulting net as . It is live and has 878 reachable states that are very close to the number of maximally permissive states.

4. Deadlock Prevention Algorithm

In this section, the proposed method is shaped to an algorithm to show how to synthesize a liveness-enforcing supervisor and a supporting example is given in Algorithm 3.

Input: An S3PR , with .
Output: A liveness-enforcing net , with .
(1) begin
(2) ; .     and denote the sets of constraints in the MIP problem and monitors obtained
       at the first phase, respectively
(3) Apply MIP to to obtain a maximal unmarked siphon.
(4) if  {there exists such a siphon}  then
   (4.1) Obtain a minimal siphon from the maximal one.
   (4.2) Enforce a constraint , , to the MIP problem of ; ; go to step (3).
(5) if    then  ; ; go to step (17).
(6) Apply Algorithm 1 to , obtain a set of necessary constraints .
(7) foreach  ,
   (7.1) Add a corresponding monitor to by Definition 9.
   (7.2) .
(8) Obtain (, ) and .
(9) ; .     and denote the sets of constraints in the MIP problem and monitors obtained
    at the second phase, respectively
(10) Apply MIP to to obtain a maximal unmarked siphon.
(11) if  {there exists such a siphon}  then
   (11.1) Obtain a minimal siphon from the maximal one.
   (11.2) Enforce a constraint , , to the MIP problem of ;
      ; go to step (10).
(12) if    then  ; ; go to step (17).
(13) Apply Algorithm 1 to to obtain a set of necessary constraints .
(14) foreach  ,
   (14.1) Add a corresponding monitor to by Definition 17.
   (14.2) ; .
(15) Obtain , and .
(16) Apply Algorithm 2 to , to find , .
(17) Output , .
(18) end

The supervisor synthesized by Algorithm 3 preserves the legal states of a plant net to a large extent on a basis of low computational complexity. The MIP-based deadlock detection approach is iteratively used to find unmarked siphons, which avoids a complete siphon enumeration and saves computational time. The first phase is optimal or maximally permissive in the sense that no legal states are excluded since a monitor is added to the complementary set of SMSs. However, it always makes the generation of control-induced siphons unavoidable while minimally restricting the behavior of a plant net. To accelerate the convergence, the output arcs of the monitors added at the second phase are first pointed to the source transitions of the plant net and subsequently rearranged away from the source transitions to release legal states on condition that the liveness is preserved. It guarantees the liveness as well as largely enhances the behavioral permissiveness. Hence, the policy in Algorithm 3 can synthesize a liveness-enforcing supervisor with low computational complexity.

The Petri net shown in Figure 5 is a well-known model of FMS [12]. We can define this Petri net model as an S3PR if , , and .

The MIP technique is applied to and a maximal unmarked siphon can be obtained. A minimal siphon can be derived from . Thus, we have and . Constraint is enforced to the MIP problem of . Unfortunately, there still exists a maximal unmarked siphon. The above process proceeds until we find seven constraints under which is live. There is no redundant constraint acquired by Algorithm 1 implying that there are seven SMSs to be controlled. Then we add seven monitors to by Definition 9, as shown in Table 2, and denote the resulting net as .

Applying the MIP technique to , we can still find a maximal unmarked siphon . A minimal siphon can be extracted from , and the multisets form of its complementary set are . We have . Then constraint is enforced to the MIP problem of . However, there still exists a maximal unmarked siphon and requires another constraint to guarantee liveness. It is found that both constraints are necessary by Algorithm 1 and we add two monitors, , as shown in Figure 6, to by Definition 17. The resulting net is denoted as .

excludes many legal states although it is live. The number of maximally permissive states of this plant model is 21581 while preserves 19773 ones. Then we apply Algorithm 2 to to rearrange the output arcs of monitors added at the second phase. The two monitors with rearranged output arcs are shown in Figure 7. The final net, denoted by , is live and it has 20444 reachable states.

5. Comparison and Discussion

The performance of the proposed policy is shown in Table 3 by calculating the example in Figure 5 compared with the existing methods. The first column represents the policies and the second column shows the number of reachable states. The third and fourth list the numbers of the added monitors and the related arcs, respectively. The fifth exhibits whether a complete siphon enumeration is necessary in a policy. Similarly, the sixth points out the necessity of a complete state enumeration. The seventh indicates the computational complexity.

The performance analysis of the policies is conducted by considering the following three criteria: behavioral permissiveness, computational complexity, and structural complexity. The advantage of the proposed policy can be analyzed in terms of the three criteria. The obtained supervisor by the proposed method of the net in Figure 5 is suboptimal. However, the number of its reachable states is nearly maximally permissive, only a bit smaller than those of the policies in [45, 46] while the computational complexity of these policies is exponential, their supervisors have more monitors and arcs, and they need either a complete siphon enumeration or a complete reachability graph. The proposed policy, compared with the policies in [15, 17, 32, 39], can provide more reachable states.

Among the policies listed in Table 3, we choose four representative ones to compare with the proposed policy in Table 4 through ten examples (obtained by an S3PR-generating program of our work group except examples 7, 8, and 10), where number of RS and number of M denote the numbers of reachable states and the additonal monitors, respectively. The 12th and the last column indicate the maximally permissive behavior and the ratio of the reachable states of supervisors obtained by the proposed policy to the maximally permissive behavior, respectively. By the experimental study, we can find that the supervisor, synthesized by the proposed policy, has less monitors and is more permissive than the existing ones.

6. Conclusions

The deadlock prevention problem is always a tough and fussy task in FMSs. Behavioral permissiveness, computational complexity, and structural complexity are three criteria for checking the performance of supervisors. This work presents a deadlock prevention method for an S3PR. A siphon is a special set of places that can lead a system to a deadlock state. The MIP technique is iteratively used to find maximal unmarked siphons. Due to the high computational efficiency of the MIP method, we can save computation time substantially. At the first phase, in order to find a more permissive supervisor, monitors are added to the complementary sets of the derived minimal siphons. Unfortunately, the added monitors are always involved in the generation of control-induced siphons. Hence, at the second phase, a new fashion of adding monitors such that the output arcs of the monitors are pointed to source transitions is adopted to avoid generating control-induced siphons. Then the output arcs are moved from the source transitions along the opposite direction to the work flow for releasing legal states on condition that the liveness is preserved. In addition, this work proposes a redundant constraint removal algorithm that greatly reduces the structural complexity and enhances the behavioral permissiveness.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work was supported in part by the National Natural Science Foundation of China under Grant nos. 61301276, 61403296, and 61202128, the Natural Science Basic Research Plan in Shaanxi Province of China under Grant no. 2015JQ6258, the Discipline Construction Funds of Xi’an Polytechnic University under Grant no. 107090811, and the Doctoral Research Startup Funds of Xi’an Polytechnic University.