Discrete Dynamics in Nature and Society

Volume 2016, Article ID 8219424, 12 pages

http://dx.doi.org/10.1155/2016/8219424

## An Efficient Siphon-Based Deadlock Prevention Policy for a Class of Generalized Petri Nets

^{1}School of Electro-Mechanical Engineering, Xidian University, Xi’an 710071, China^{2}Machinery and Electricity College, Shihezi University, Xinjiang 832003, China^{3}College of Electronics and Information, Xi’an Polytechnic University, Xi’an 710048, China

Received 13 October 2015; Revised 14 January 2016; Accepted 17 January 2016

Academic Editor: Manuel De la Sen

Copyright © 2016 YiFan Hou 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.

#### Abstract

We propose a new deadlock prevention policy for an important class of resource allocation systems (RASs) that appear in the modeling of flexible manufacturing systems (FMSs). The model of this class in terms of generalized Petri nets is, namely, S^{4}PR. On the basis of recent structural analysis results related to the elementary siphons in generalized Petri nets on one hand and an efficient deadlock avoidance policy proposed for the class of conjunctive/disjunctive (C/D) RASs on the other hand, we show how one can generate monitors to be added to a net system such that all its strict minimal siphons are -controlled and no insufficiently marked siphon is generated. Thereby, a new, simple, and more permissive liveness-enforcing supervisor synthesis method for S^{4}PR is established.

#### 1. Introduction

A flexible manufacturing system (FMS) is characterized by flexibility, concurrent operations, and mainly automated elements, such as production controllers, machines, automated guided vehicles, and conveyors. In an FMS, raw parts are processed in a preestablished sequence to compete for a limited number of system resources. Deadlocks may occur when some processes keep waiting indefinitely for other processes to release resources, which can lead to catastrophic results in highly automated systems. One way of dealing with deadlock problems is to model an FMS with Petri nets [1]. Deadlock prevention is considered to be one of the most effective methods in deadlock control [2–9], which is usually achieved by either designing an effective system or using an off-line mechanism to control the requests for resources to ensure that deadlocks never occur in a system. To achieve this purpose, monitors and related arcs are added to the net system. One of the most interesting past developments is the use of structural objects to design liveness-enforcing Petri net supervisors [10–16]. Above all, the concept of elementary siphons provides an efficient and effective avenue for designing structurally simple supervisors [17, 18]. Elementary siphons have been maturely applied for a class of ordinary Petri nets such as S^{3}PR [19], as well as some classes of generalized ones [16]. Since a siphon is a set of places that does not carry the weight information and the complex allocations of shared resources in a generalized Petri net, elementary siphons in [17] are not well suitable for generalized Petri nets. By fully investigating the topological structure and the requirements of multiple resource types of S^{4}PR [20–22], the concept of augmented siphons is recently proposed in [23, 24]. Indeed, since the role of weight of arcs in determining the liveness of generalized Petri nets cannot be neglected, the notion of elementary siphons is redefined by considering augmented siphons, from which a compact and suitable set of elementary siphons can be obtained.

For automated operation of modern technological systems that involve resource sharing, deadlock avoidance is also an essential control requirement. Broadly speaking, a deadlock avoidance policy tries to restrict the operation of an FMS to its reachable and safe sub-state-space. It is worth noting that we can translate the enforcement of liveness into a forbidden state problem in essence. Mutual exclusion constraints are a natural way of expressing the concurrent use of a finite number of resources, shared among different processes. In the framework of Petri nets formalisms, the work in [25] defines a generalized mutual exclusion constraint (GMEC) as a condition that limits a weighted sum of tokens contained in a subset of places. Based on this concept, the problem of forbidden state specification can be represented by GMECs. Many constraints that deal with exclusions between states and events can be transformed into the form of GMECs.

The work in [26] generalizes the deadlock avoidance policy (DAP) of conjunctive/disjunctive resource upstream neighbourhood (C/D RUN) for resource allocation systems with multiple resource acquisitions and flexible routings, namely, S^{4}PR, and this policy is of polynomial complexity. Motivated by the DAP of C/D RUN policy, a deadlock prevention policy is developed in this work by combining this method with the concept of augmented and elementary siphons in S^{4}PR net. First, the concept of augmented siphons is proposed. Among augmented siphons, a set of improved elementary siphons can be derived. After that, we obtain a set of linear inequality constraints expressed by state vectors from elementary siphons. After modifying them by the proposed policy, we find a set of GMECs expressed by marking vectors. Then monitors are added to the plant model such that the elementary siphons in S^{4}PR are all -controlled and no insufficiently marked siphon is generated due to the addition of the monitors. Finally, it can usually lead to a highly permissive liveness-enforcing supervisor by using the elementary siphon-based deadlock control policy.

The rest of the paper is organized as follows. Section 2 introduces the definition of S^{4}PR. Section 3 elaborates the concept of augmented siphons and the method of deriving a set of elementary siphons in S^{4}PR. The deadlock control policy for S^{4}PR is proposed in Section 4, and a typical example is introduced to show the applicability and efficiency of the proposed method, while Section 5 concludes the paper. Some basics of Petri nets and elementary siphons used throughout this paper are listed in the Appendix.

#### 2. S^{4}PR

This section gives the definition of a class of generalized Petri nets, namely, S^{4}PR [13, 26, 27]. Note that, in [26], an S^{4}PR is called S^{3}PGR^{2}: the definition of these two subclasses of nets are in fact identical. S^{4}PR nets include some well known classes of Petri nets such as S^{3}PR, ES^{3}PR, and WS^{3}PR. Indeed, an S^{4}PR concerns the modeling of concurrently cyclic sequential processes sharing common resources where an operation place can use simultaneously multiple resources of different types. Also sequential processes (state machines) mean that an operation place can be shared (flexible routings) but assembly and disassembly operations, for which synchronization is required, cannot be considered.

*Definition 1. *An S^{4}PR net is a generalized and self-loop free net , where(1), ;(2) is a partition such that (i) is called the set of operation places, where and , (); (ii) is called the set of resource places; (iii) is called the set of idle places; and (iv) the output transitions of idle places are called source transitions;(3) is called the set of transitions, where , , , and ;(4), where such that , , , and ;(5), the subset generated by is a strongly connected state machine such that every cycle contains ;(6), there exists a unique minimal -invariant such that , , , and , where is a set of -dimensional nonnegative integer vectors. Furthermore, ;(7) is strongly connected.

In the special case where S^{4}PR net corresponds to an asymmetric-choice (AC) net with non-blockingness (, ) and homogeneous valuation (, , ), then it is well known that liveness property is equivalent to controlled-siphon property [2]. In this paper we extend this structural liveness characterization by dealing with S^{4}PR nets in the general case.

*Definition 2. *Let be an S^{4}PR net. An initial marking is acceptable for if , , , , and , .

*Example 3. *The net shown in Figure 1(a) is an S^{4}PR (it is also an AC net but with no homogeneous valuation), where is the set of operation places, is the set of idle places, and is the set of shared resource places. Each operation place in S^{4}PR can simultaneously require multiple units of different resource types. For instance, operation place needs one unit in place and two in place simultaneously for its operation. And the S^{4}PR net model consists of two parallel sequential processes as shown in Figure 1(b), that is, process : and process : . These two parallel sequential processes compete for the limited resources represented by four resource places . For example, the operation place in process 1 requests one unit in resource place , whereas the resource units may be held by operation place in process 2. The competition of the limited resources may lead to deadlocks of the net model, which is an undesired phenomenon and must be prevented by some effective instruments.

and are the minimal -semiflows associated with idle places and . , , , and are the minimal -semiflows associated with resources , , , and , respectively. Let us consider the following acceptable initial marking . The net has seven strict minimal siphons (SMSs): , , , , , , and . The strict minimal siphons are closely related to the deadlocks of a net model. Once an SMS is insufficiently marked in an S^{4}PR, the net model will trap into deadlock.