You are on page 1of 17

Int J Adv Manuf Technol (2002) 19:192208

2002 Springer-Verlag London Limited


An Optimal Deadlock Prevention Policy for Flexible
Manufacturing Systems Using Petri Net Models with Resources
and the Theory of Regions
M. Uzam
Nigde U

niversitesi, Muhendislik-Mimarlik Fakultesi, Elektrik-Elektronik Muhendisligi Bolumu, Nigde, Turkey


In this paper, an optimal deadlock prevention policy for exible
manufacturing systems (FMSs) is proposed. In an FMS, dead-
locks can arise because of a limited number of shared
resources, i.e. machines, robots, buffers, xtures etc. Deadlock
is a highly undesirable situation, where each of a set of two
or more jobs keeps waiting indenitely for the other jobs in
the set to release resources. The proposed optimal deadlock
prevention policy is based on the use of reachability graph
analysis of a Petri net model (PNM) of a given FMS and the
synthesis of a set of new net elements, namely places with
initial marking and related arcs, to be added to the PNM, using
the theory of regions, which is a formal synthesis technique to
derive Petri nets from automaton-based models. The policy
proposed is optimal in the sense that it allows the maximal
use of resources in the system according to the production
requirements. Two examples are provided for illustration.
Keywords: Deadlock; Flexible manufacturing systems (FMS);
Optimal deadlock prevention; Petri nets; Petri net synthesis;
Shared resources
1. Introduction
In a exible manufacturing system (FMS), different types of
raw part enter the system at discrete points of time and are
processed concurrently, sharing a limited number of resources
such as machines, automated guided vehicles (AGVs), robots,
buffers, xtures, etc. In an FMS, every raw part follows a pre-
established production sequence through the set of system
resources. These production sequences are executed concur-
rently and therefore they have to compete for the set of shared
resources. This competition for shared resources can cause
deadlock, which is a highly undesirable situation, where each
Correspondence and offprint requests to: M. Uzam, Nigde U

niversitesi,
Muhendislik-Mimarlik Fakultesi, Elektrik-Elektronik Muhendisligi
Bolumu, Kampus, 51100, Nigde, Turkey. E-mail: muratFuzam@
hotmail.com
of a set of two or more jobs keeps waiting indenitely for the
other jobs in the set to release resources [1]. Deadlock usually
arises as the nal state of a complex sequence of operations
on jobs owing concurrently through the system and it is
generally difcult to predict. Therefore, it is necessary for an
effective FMS control policy to make sure that deadlock will
never occur in the system. Effective handling of the deadlock
arising in various FMSs has turned out to be a major concern
in the operation of these systems. Several efforts have been
focused on the problem of deadlock in an FMS [117]. There
are three main approaches to deal with deadlocks in FMSs [15]:
1. Deadlock detection and recovery.
2. Deadlock avoidance.
3. Deadlock prevention.
The deadlock detection and recovery approach permits the
occurrence of deadlocks. As soon as a deadlock occurs, it is
detected and then the system is put back to a deadlock-free
state, by simply reallocating the resources. The efciency of
this approach depends upon the response time of the
implemented algorithms for deadlock detection and recovery.
In general, these algorithms require a large amount of data and
may become complex when several types of shared resource are
considered [15]. Examples of the deadlock detection and recov-
ery approach may be found in [3,4,7]. In the deadlock avoid-
ance approach, at each system state an on-line control policy
is used to determine the correct system evolution among the
feasible ones. The main purpose of this approach is to keep
the system away from deadlock states. Although this approach
usually leads to better use of resources and throughput, it does
not totally eliminate all deadlocks. Rather, it makes the dead-
lock occurrence infrequent [1]. Therefore, in this case, if
a deadlock arises, suitable recovery strategies are necessary.
Examples of the deadlock avoidance approach may be found
in [1,2,5,812,1417]. In the deadlock prevention approach, a
suitable design for inherently deadlock-free systems is
developed. The goal of the deadlock prevention approach is to
add to the system a control policy preventing the system from
reaching deadlock states. In this case, the computations are
An Optimal Deadlock Prevention Policy for FMSs 193
carried out off-line in a static way and once the control policy
is established, the system can no longer reach undesirable
deadlock states. Examples of this kind of approach may be
found in [1,6,13,15,18]. In this paper, we focus our attention
on the third approach, i.e. deadlock prevention.
For deadlock detection and recovery, avoidance, and preven-
tion, several tools have been adopted: graph-based techniques
[7,10,12], scheduling-based approaches [19], nite state
machine based models [20] and Petri net models
[1,2,5,6,8,15,16,18]. Petri nets have been used widely to
describe FMSs, as they are well suited to represent FMS
characteristics such as presendence relations, concurrency, con-
ict, and synchronisation. A powerful feature of Petri nets is
their ability to detect good behaviour properties of the system
such as deadlock freeness and boundedness [15]. If the Petri
net model of a system is kept live, by preventing some enabled
transitions from ring, then the model is deadlock-free [16].
Some classes of FMSs are modelled by subclasses of Petri
nets such as production Petri nets (PPN) [2,5,8], systems of
simple sequential processes with resources (S
3
PR) [6,15],
extended systems of simple sequential processes with resources
(ES
3
PR) [13], systems of sequential systems with shared
resources (S
4
PR) [15], and generalised stochastic Petri nets
(GSPN) [1]. PPN models a set of sequential processes sharing
common resources. At each operation, only one resource is
used and there is no alternative resource routeing, which may
lead to resource allocation conict. A deadlock prevention
policy was proposed in [9] for this type of FMS (PPN). S
3
PR
is a generalisation of PPN as choices are allowed in the
production sequences. Deadlock prevention policies were pro-
posed in [6] and [15] for this type of FMS (S
3
PR). ES
3
PR
nets are extensions of the S
3
PR nets and they are composed
of a set of state machines holding and releasing a set of shared
resources. An example of a deadlock prevention policy was
proposed in [13] for this type of FMS (ES
3
PR). S
4
PR concerns
the modelling of concurrently cyclic sequential processes shar-
ing common resources and major synchronisation patterns;
generalised parallel and sequential mutual exclusion can be
represented in this class [15]. GSPNs can model a special
class of FMSs in which it is necessary to consider the concept
of time in the model [1].
Two Petri net analysis techniques are mainly used to deal
with the deadlock prevention in FMSs: structural analysis and
reachability graph analysis. In the former, a relationship
between the behavioural properties of the Petri net model of
the system, such as liveness and boundedness, and its structure
is captured. The deadlock prevention control policy is then
obtained based on the characterisation of the liveness in terms
of Petri net items (siphons). In this case, the control policy
can be implemented by adding some new net elements, namely
places with initial marking and related arcs, to the initial Petri
net model of the FMS. The idea is to stop some transitions
from ring by means of these new net elements in order not
to reach into a deadlock state. Examples of these kinds of
technique may be found in [6,15,18] for different classes of
FMSs. The problem with these techniques is that they spoil
some good states of the system for the sake of obtaining a
live, i.e. deadlock-free, Petri net model and therefore the
resulting controlled model of the system is not maximally
permissive. That is, the solutions obtained it this case are
suboptimal [18]. Deadlock problems can cause unnecessary
costs owing to long down-time and low use of some critical
and expensive resources. Therefore, it is important to develop
efcient deadlock prevention policies which optimise the use
of system resources, while preventing deadlocks from occur-
ring. In the latter, the reachability graph of the Petri net model
of an FMS is used to obtain deadlock-free system behaviour.
A straightforward (brutal) deadlock prevention approach based
on the exclusion of deadlock states from the reachability graph
of Petri net markings was investigated in [1]. However, in [1]
the implementation of the deadlock prevention policy was not
addressed in terms of adding some new net elements, namely
places with initial marking and related arcs, to the initial Petri
net model of the FMS as in the former techniques. The size
of the reachability graph was another inherent barrier for
applying such an approach to large Petri nets owing to the
state explosion problem. In fact there are several well-known
techniques to avoid the state explosion problem [2124]. The
use of one of these techniques, called unfoldings, to avoid the
state explosion problem for deadlock prevention in computer
science using Petri nets has recently been proposed [25].
Another well-known method to derive the properties of a
complex Petri net model is to use a reduction approach, which
simplies a subnet or structure while preserving the concerned
properties, such as boundedness, liveness, and reversibility [26].
The objective of this paper is to propose an optimal deadlock
prevention policy for FMSs. We aim to obtain live, i.e. dead-
lock-free, controlled Petri net models of FMSs, and at the
same time to ensure the optimal use of the system resources.
Note that our approach is not conned to a limited class of
Petri nets and can be applied to either of the above-mentioned
Petri net models of FMSs. Therefore, in this sense our approach
is general. The reachability graph (RG) analysis of the Petri
net model (PNM) of an FMS is the starting point for the
denition of a control policy, whose goal is optimal deadlock
prevention. From the RG, we identify what we call the dead-
lock-zone (DZ) of the RG, which may contain deadlock states
(markings), partial deadlock states, and states which inevitably
lead to deadlocks. The remaining states of the RG constitute
the deadlock-free zone (DFZ), which represents the optimal
system behaviour. Our approach is based on the exclusion of
the deadlock zone from the RG of the PNM. The control
policy is to prevent the system from entering this DZ, while
making sure that every state within the DFZ can still be
reached. It is therefore an optimal deadlock prevention control
policy. Using the RG with its DZ and the theory of regions
[27], which is a formal synthesis technique to derive Petri nets
from automaton-based models, we then synthesise new net
elements, namely places with initial marking and related arcs.
Finally, the control policy can be implemented by adding these
synthesised net elements to the initial Petri net model of
the FMS.
The remainder of the paper is organised as follows. The
next section denes and explains Petri nets and some related
concepts. In Section 3, we recall the related part of the theory
of regions. The denition of an optimal deadlock prevention
control policy for FMSs is given in Section 4. Section 5
introduces two example FMSs and illustrates the application
194 M. Uzam
of the proposed optimal control policy. Finally, some con-
clusions are presented in Section 6.
2. Basic Petri Net Denitions and Related
Concents
In this paper, Petri nets are used to model the ow of products
in an FMS. Petri nets as a mathematical tool have a number
of properties. When interpreted in the context of a modelled
manufacturing system, these properties allow us to identify the
presence or absence of the functional properties of the system.
The reader is referred to [26,28] for the fundamentals of Petri
net theory. In this section, only the denitions and concepts
which are related to this paper are briey reviewed.
A Petri net is a ve-tuple, PN = (P, T, F, W, M
0
) where:
P = {p
1
, p
2
, %, p
m
} is a nite set of places, where m 0;
T = {t
1
, t
2
, %, t
n
} is a nite set of transitions, where n 0,
with P T and P T ; F (P T) (T
P) is the set of all directed arcs, where P T N is the
input function that denes the set of directed arcs from P to
T, and T P N is the output function that denes the set
of directed arcs from T to P, where N = {0, 1, 2, %}, W: F
N is the weight function. M
0
: P N is the initial marking.
The set of input (output) transitions of a place p is denoted
by

p (p

). Similarly, The set of input (output) places of a


transition t is denoted by

t (t

). A Petri net structure (P, T,


F, W) without any specic initial marking is denoted by G. A
Petri net with the given initial marking is denoted by (G, M
0
).
A transition t is said to be enabled or rable if each input
place p

t is marked with at least w(p, t) tokens, where
w(p, t) is the weight of the arc from p to t. A transition may
re if it is enabled. A ring of an enabled transition t removes
w(p, t) tokens from each input place p

t, and adds w(t, p)
tokens to each output place p t

, where w(t, p) is the weight


of the arc from t to p. This process is denoted by M [t
M. The marking M of a Petri net indicates the number of
tokens in each place which is the current state of the modelled
system. When a marking M can be reached from a marking
M by executing a ring sequence of transitions = t
0
, t
1
, t
2
,
%, t
k
, this process is then denoted by M [ M. The set
of all reachable markings for a Petri net with initial marking
M
0
is denoted by RM(G, M
0
).
A pair consisting of a place p and a transition t is called a
self-loop if p is both p t

and p

t. A Petri net is said
to be pure if it has no self-loops. A Petri net is said to be
ordinary if all of its arc weights are 1. A Petri net G is called
k-bounded, or simply bounded if for every reachable marking
M RM(G, M
0
), the number of tokens in any place p, p
P, is not greater than a nite number k, i.e. M(p) k. A
place p is called k-bounded, if the number of tokens in it is
not greater than k. A Petri net G is called safe, if it is 1-
bounded. A 1-bounded place p is called a safe place. Places
are frequently used to represent buffers for parts, tools, pallets,
and AGVs in manufacturing systems. Boundedness is used to
identify the existence of overows in the modelled system.
When a place models an operation, its safeness guarantees that
the controller will not attempt to initiate an ongoing process.
A transition t is said to be live if for any M RM(G, M
0
),
there exists a sequence of transitions rable from M which
contains t. A Petri net G is said to be live if all the transitions
are live. A Petri net G contains a deadlock if there is a
marking M RM(G, M
0
) at which no transition is enabled.
Such a marking is called a dead marking. Deadlock situations
are a result of inappropriate resource allocation policies or
exhaustive use of some or all resources. Liveness of a Petri
net means that for each marking M RM(G, M
0
) reachable
from M
0
, it is nally possible to re any transition t, t T,
in the Petri net through some ring sequence. This means that
a live Petri net guaranties deadlock-free operation, no matter
what ring sequence is chosen, i.e. if a Petri net is live, then
it has no deadlock [26]. A Petri net (G, M
0
) is said to be
reversible, if for each marking M RM(G, M
0
), M
0
is
reachable from M. Thus, in a reversible net it is always
possible to go back to the initial marking (state) M
0
. Many
systems are required to return from the failure states to the
preceding correct states. Thus, the reversibility property is
important to manufacturing system error recovery. This pro-
perty also guarantees cyclic behaviour for all repetitive manu-
facturing systems. Moreover, if a net contains a deadlock, then
it is not reversible [29]. A marking M is said to be a home
state, if for each marking M RM(G, M
0
), M is reachable
from M. Reversibility is a special case of the home state
property, i.e. if the home state M = M
0
, then the net is revers-
ible.
3. Theory of Regions
In this section, we recall the related part of the theory of
regions from [27] in order to facilitate the better understanding
of our policy. The synthesis problem for nets consists in
deciding whether a given graph is isomorphic to the marking
graph of some net and then constructing it. This problem has
been solved in the literature for various types of net ranging
from elementary nets to Petri nets. The problem of synthesising
nets equivalent to a given nite automaton was rst addressed
by Ehrenfeucht and Rozenberg, who showed [30,31] the feasi-
bility of this problem for elementary nets, using the crucial
concept of regions. A (Boolean) region in an automaton is a
subset of states such that this set is entered or exited uniformly
by all transitions with a common label (exactly as if it were
the set of reachable cases of a net that hold a xed condition
or place). Regions may be interpreted as and give rise to
atomic nets with a single place, lled by incoming transitions
and emptied by outgoing transitions. By considering the many
nitely different subset of regions of a nite automaton, and
gluing atomic nets on transitions, a nite number of nets may
be derived in this way from a nite automaton, but it may
well be that none of them has a case graph isomorphic to the
given automaton. Those automata which are isomorphic to a
reachable case graph of elementary nets are characterised by
two separation axioms, one stating that any two different states
are separated by some region containing exactly one of them,
and the other stating that for any event e, each state disabling
e can be separated from all states enabling e by some region
exited by e. When these two axioms are satised, the automaton
is isomorphic to the reachable case graph of the elementary
An Optimal Deadlock Prevention Policy for FMSs 195
net assembled from the whole set of regions (viewed as atomic
subnets). The same holds for any smaller net assembled from
a subset of regions large enough to satisfy both separation
axioms.
It was shown [32] that the synthesis problem for pure Petri
nets is decidable, because the set of integral regions of a nite
automaton forms a module of nite dimension, a linear basis
of which may be effectively computed. This decision result
was later extended to general Petri nets accommodating self-
loops in [33]. In both cases, deciding on the synthesis problem
for Petri nets, or on the realisation problem for nite automata,
takes a time polynomial in the size of the automata. Note that
in this paper we use the synthesis problem for pure Petri nets,
therefore that part of the theory is considered.
3.1. The Synthesis Problem for Pure Petri Nets
In the sequel, let A = (S, E, T, s
0
) be a loop-free, reachable
and reduced nite deterministic automaton, with a set of states
S, a set of events E, a set of transitions T, and an initial state
s
0
S and let A denote the underlying transition system (S,
E, T).
Denition 1. A region in an automaton A or in the underlying
transition system is a subset of states R S such that

e
E s
1
, s
2
, s
3
, s
4
S s
1
J
e
s
2
s
3
J
e
s
4

s
1
R s
2
R s
3
R s
4
R
s
1
R s
2
R s
3
R s
4
R
Let R
A
denote the set of (non-trivial) regions of A, and for s
S let R
A
(s) = {R R
A
s R}.
Thus, R is a region if and only if the label e of a transition
sufces to determine whether the transition is incident to R
inwards (R is then termed an output region for e, noted e

R),
or it is incident to R outwards (R is then termed an input
region for e, noted R

e), or it is not incident to R ( it is not


internal to R or external to R). In particular, if R is reachable
and reduced, then non-trivial regions of A may be represented
as maps
R
: E {1, 0, 1} such that
R
(e) = 1 if e

R,
R
(e)
= 1 if R

e, and
R
(e) = 0 otherwise; the characteristic function
of R, let
R
: S {0, 1}, where
R
(s) = 1 s R, is then
the unique map such that s J
e
s
R
(e) =
R
(s)
R
(s).
The synthesis problem for pure Petri nets (PPN) consists of:
1. Deciding whether an automaton A, given as input, is isomor-
phic to the marking graph (i.e. reachability graph) N* of
some net system N = (P, E, W, M
0
) of type
PPN
, with a
set of places P, a set of events E, an incidence matrix W,
and an initial marking M
0
, and if so,
2. Producing as output a net system N such that A N* and
no proper subnet system of N satises this property.
We recall from [27] that
PPN
= (N, Z, ) with transitions
nJ
z
n iff n = n + z. This amounts to:
1. Deciding whether all instances of separation problems in A
can be solved by corresponding regions, and if so,
2. Synthesising the desired net system N = A
*
R
from a minimal
admissible subset of regions R, where A
*
R
= (R, E, W, M
0
)
with W((, ),e) = (e) and M
0
(, ) = (s
0
).
Now there are at most S
2
S possible inputs for the states
separation problem (SSP):
SSP A(s, s): construct from A and s s a region (,
) s.t. (s) (s)
and at most S E instances of the event/state separation
problem (ESSP):
ESSP A(s, e): construct from A and (s J/
e
) a region
(, ) s.t. ((s) J/
(e)
)
Part 1 of the problem will therefore be solved in time poly-
nomial (in S and E) as soon as SSP A(s, s) and ESSP A(s,
e) are solved in polynomial time. Part 2 consists of extracting
from a set of regions with size polynomial in S and E a
minimal admissible subset, and this certainly can be done in
polynomial time.
3.2 The Structure of Pure Petri Nets
Let R
PPN
(A) denote the set of pure Petri regions of A, i.e. the
set of morphisms (, ): A
PPN
. Before investigating the
algebraic properties of R
PPN
(A), let us recall some terminology
borrowed from algebraic topology. In the xed transition sys-
tem A = (S, E, T), let
0
,
1
: T S and l: T E denote
the respective source, target, and labelling functions given by

0
(t) = s,
1
(t) = s, and l(t) = e for t = s J
e
s T. A 0-
chain of A is a vector in the free Z-module C
0
(A) = ZT.
A 1-chain of A is a vector in the free Z-module C
1
(A) = ZT.
The boundaries of the 1-chains are the 0-chains computed by
the operator : C
1
(A) C
0
(A) such that (z
j
.t
j
) = z
j
(
1
(t
j
)

0
(t
j
)). The co-boundaries of the 0-chains are the 1-chains
computed by the operator *: C
0
(A) C
1
(A) such that *(z
i
s
i
) = z
i
*(s
i
) where *(s
i
) = {t
j

1
(t
j
) = s
i
} {t
j

0
(t
j
)
= s
i
}. A cycle of A is a 1-chain with a null boundary, and
a co-cycle is a 0-chain with a null co-boundary. The cycles
of A (co-boundaries of A), form submodules V
B
, V
Q
, of C
1
(A),
which are orthogonal complements. Linear bases for V
B
and
V
Q
are supplied by the respective sets of fundamental cycles
and fundamental cutsets of the underlying graph (S, T) with
respect to some spanning tree U T. Thus, every cycle may
be written as a linear combination z
i
.B
i
of fundamental cycles
B
i
: T {1, 0, 1}, and every co-boundary may be written as
a linear combination z
i
.C
i
of fundamental cutsets C
i
: T
{1, 0, 1}, with integral coefcients z
i
Z. The Parikh images
We recall that the free Z-module generated by a nite set X = {x
1
,
x
2
, %, x
n
} of generators is the set of maps from X to Z, viewed
as vectors indexed by X with entries in Z and represented as formal
sums =
i

i
x
i
where (x
i
) =
i
.
The dual linear operators and * are associated respectively with
A and its transpose A
t
, where A is the incidence matrix of the
underlying graph. This change of sign is not technically signicant
and comes from different usages in the literature on graphs: the
denition of the incidence matrix of a directed graph that we gave
corresponds to that in [3436].
196 M. Uzam
of the cycles form in turn a submodule of the free Z-module
ZE, where the Parikh mapping : ZT ZE is the
linear transformation given by (z
i
.t
i
) = z
i
.l(t
i
). In the sequel,
the maps : E Z are represented accordingly as formal
sums = z
i
.e
i
where z
i
= (e
i
). For any two vectors =

i
.x
i
and =
i
.x
i
in a nite dimensional free Z-module
ZX, we let . denote the scalar product
i
.
i
Z.
Proposition 1. (, ) R
PPN
(A) if and only if .(c) =
.(c) for all c C
1
(A).
Proof. By linearity, the condition c C
1
(A) (c) =
(c) is equivalent to the condition t T (t) = (t),
where t is identied with the chain (1 t). Now the equation
(t) = (t) is valid if and only if (
1
(t)) (
0
(t)) =
(l(t)), if and only if (
0
(t)) (
1
(t)) w.r.t. the type
PPN
, if
and only if (, ) R
PNN
(A) by denition of regions.
Proposition 2. A map : E Z is the second projection of
some region (, ) R
PPN
(A) if and only if .(B) = 0 for
every cycle B V
B
; the regions (, ) R
PPN
(A) which
project on are then characterised by the condition: (s
0
) +
(.(c)) 0 for every 1-chain such that (c) = s s
0
for
some s S.
Proof. From Proposition 1, the condition on must hold and
whenever it does, the scalar product (c) takes an identical
value for all 1-chains c with an identical boundary. From the
denition of regions, the condition on (s
0
) must hold because
the local states specied for type
PPN
are the non-negative
integers. Now the two conditions taken together guarantee that
we can always complete the data ((s
0
), ) to a pure region
by selecting for each state s S a corresponding 1-chain c
s
such that (c
s
) = s s
0
and then setting (s) = (s
0
) +
(c
s
), which is always possible since A is reachable.
Let R
abs
(A) denote the set of maps : E Z characterised
by Proposition 2, henceforth called abstract regions. It appears
from this characterisation that the abstract regions of A are in
bijective correspondence with the co-boundaries of A which
are compatible with the kernel of the labelling function l: T
E. Actually, for every abstract region : E Z, the map
= l: T Z is a co-boundary of A, since for every cycle
B, .B =
t
(l(t)).B(t) =
e
(e).
l(t)=e
B(t) = .(B) = 0.
Conversely, every co-boundary : T Z such that l(t) = l(t)
(t) = (t) determines a unique abstract region : E Z
such that e = l(t) (e) = (t), since l: T E is subjective
and A is reduced.
An abstract region determines a unique region (, ) such
that (s) = 0 for some state s, called a strict region and given
by (s
0
) = min{ (c) s S, (c) = s s
0
}, and an
innite family of non-strict regions ( + h, ) for h N {0}.
Now any instance of separation problems SSP A(s, s) or ESSP
A(s, e) solved by ( + h, ) is also solved by (, ). For this
reason, let us concentrate on strict regions, or equivalently on
abstract regions.
The set R
abs
(A) of abstract regions of A is obviously a Z-
module. From Proposition 2, a linear basis for this module
may be computed as follows. Let S = {s
1
, s
2
, %, s
n
}, T = {t
1
,
t
2
. %, t
m
}, and E = {e
1
, e
2
, %, e
p
}. Let U T be a spanning
tree of the underlying graph G = (S, T), and let {B
1
, B
2
, %,
B
mn+1
} be the set of fundamental cycles of G w.r.t. U. Thus
{B
1
, B
2
, %, B
mn+1
} is a basis for V
B
and R
abs
(A) is the kernel
of the linear transformation M
A
: Z
P
Z
mn+1
dened by the
(m n + 1) p matrix M
A
with integral coefcients
M
A
(i, j) = {B
i
(t
k
) 1 k m l(t
k
) = e
j
}
Let k be the dimension of Ker(M
A
). The algorithm of von
zur Gathen and Sieveking (see [37]), given M
A
as input,
produces in time polynomial in m n + 1 and p (or S = n
and E = p, because m n p, follows from determinism
of A) a basis {
1
,
2
, %,
k
} for Ker(M
A
) = R
abs
(A).
We have in hand all the elements needed for solving prob-
lems SSP A(s,s) and ESSP A(s, e) relative to the type of pure
Petri nets. The data required are the spanning tree U, or more
exactly the application c
(.)
that maps each state s S to the
unique chain c
s
from s
0
to s in U, and the basis of abstract
regions {
1
,
2
, %,
k
}.
3.3 Solving the Separation Problems
Let s and s be two distinct states. From Propositions 1 and
2, SSP A(s,s) has a solution in R
PPN
(A) iff (c
s
c
s
)
0 for some abstract region R
abs
(A) iff
i
(c
s
c
s
) 0
for some i {1, 2, %, k}, and the strict region (
i
,
i
)
determined from the basic abstract region
i
by setting
i
(s
0
)
= min{
i
(c
s
)s S} is then a solution. Therefore, deciding
whether SSP A(s,s) has a solution, and producing it, takes
time polynomial in S and E.
Given s S and e E such that s J/
e
, let us now
consider the separation problem ESSP A(s, e). From Prop-
osition 2, this problem has a solution in R
PPN
(A) iff there
exists (s
0
) N and R
abs
(A) such that
s S (s
0
) + .(c
s
) 0 (1)
(s
0
) + .(c
s
) + (e) 0 (2)
iff there exists R
abs
(A) satisfying the condition
s S .((c
s
) (c
s
)) + (e) 0 (3)
Whenever satises condition 3, the strict region (, )
dened from satises conditions 1 and 2 and therefore solves
ESSP A(s, e). Let =
k
i=1
x
i

i
where {
1
,
2
, %,
k
} is
the basis of abstract regions, and x
i
Z. For every s S,
let
s
i
=
i
.((c
s
) (c
s
)) +
i
(e). With these notations,
condition 3 may be rewritten to the system of linear in equation
{
k
i=1

s
i
.x
i
0s S} in the variables x
i
Z. Now a system
of linear in equation
MX (1)
n
(4)
where M is an integral matrix and (1)
n
= 1, %, 1 (
Z
n
) has an integral solution iff it has a rational solution. The
method of Khachiyan (see [37], p. 170) may be used to decide
upon the feasability in Eq. (4) and to compute a rational
solution, if it exists, in polynomial time. Thus, every instance
of the problem ESSP A(s, e) is solved up to a multiplicative
factor, or shown to be infeasible, in time polynomial in S
and E.
An Optimal Deadlock Prevention Policy for FMSs 197
4. An Optimal Deadlock Prevention
Control Policy in Petri Net Models
In this section, we dene our optimal deadlock prevention
policy for FMSs. We aim to obtain live, i.e. dealock-free,
controlled Petri net models of FMSs, and at the same time to
ensure the optimal use of the system resources. We dene a
control policy as the addition of new constraints to the system
such that its initial behaviour is restricted to a set of states
that we consider as good states, which allow the system to
evolve without reaching a deadlock state. When doing this, we
also make sure that all possible good states of the system can
still be reached. Our control policy can be characterised by
the following six steps:
Step 1. Model the FMS as a Petri net, taking into account
the production sequences and the shared resources.
Step 2. Generate the reachability graph (RG) of the Petri net
model (PNM) of the FMS and identify the deadlock-zone (DZ)
and the deadlock-free-zone (DFZ) of the RG.
Step 3. Specify the bad transitions of the DFZ which take
the system from the DFZ to the DZ.
Step 4. Consider the bad transitions as events to be separated
from the states of the DFZ and use the theory of regions to
solve these event-state-separation-problems (ESSPs).
Step 5. Add the synthesised atomic nets, which solve the
ESSPs, to the PNM to obtain the controlled PNM.
Step 6. Implement the controlled PNM.
The rst step is the modelling of a given FMS according
to the production sequences and the shared resources. We
assume that we are given a Petri net model (PNM) of an
FMS. Therefore, in this paper we will not concentrate on the
modelling issues. Different types of FMSs may require different
models such as production Petri nets (PPN), systems of simple
sequential processes with resources (S
3
PR), extended systems
of simple sequential processes with resources (ES
3
PR), systems
of sequential systems with shared resources (S
4
PR), and gener-
alised stochastic Petri nets (GSPN). For more information on
how to obtain a PNM of a given FMS, the reader is referred
to [2,5,6,8,13,15,38]. Note that our approach is not conned
to a limited class of Petri nets and can be applied to either of
these mentioned Petri net models of FMSs. Therefore, in this
sense, our approach is general.
In the second step, the reachability graph (RG) of the PNM
of the FMS is generated and the deadlock-zone (DZ) and the
deadlock-free-zone (DFZ) of the RG are identied. From the
RG, we identify the DZ of the RG, which may contain
deadlock states (markings), partial deadlock states, and states
which inevitably lead to deadlocks. All states included in the
DZ are regarded as bad states. The remaining states of the
RG constitute the DFZ, which represents the optimal system
behaviour. All states included in the DFZ are regarded as
good states. The DZ (grey section), and the DFZ (white
section) of a RG is shown in Fig. 1. In order to obtain the
DZ in an RG, rst, all deadlock states and partial deadlocks,
if any, are identied. (Note that in a partial deadlock, although
the liveness of the system is realised by ring of a limited set
of transitions, the reversibility is not possible, i.e. it is not
Fig. 1. A reachability graph (RG), consisting of the deadlock-zone
(DZ) and the deadlock-free-zone (DFZ).
possible to reach the initial state (marking) from the partial
deadlock states.) Recall that in a deadlock state there are no
transitions to re. The deadlock state(s) is the starting point
in obtaining the DZ. From the deadlock state(s), we backtrack
one step and obtain what we call the 1st-degree-prestates of
the deadlock state(s). From each 1st-degree-prestate, we check
whether or not it is possible to reach the initial state. If it is
not possible, then we include it in the DZ. If it is possible,
then we declare this state as being one of the 2nd-degree-
prestates. We continue this backtracking until we reach states
from which it is possible to reach the initial state. The states
included in the DZ are called bad states of the RG. The
states staying outside the DZ constitute the DFZ and they are
called good states of the RG. Of course, it is not possible
to identify the DZ and the DFZ of a very large RG easily.
This process requires a Petri net analysis tool. Therefore, in
this paper to obtain the DZ and the DFZ of the RGs, we used
a freely available Petri net analysis tool, called PN-tools [39].
In the third step, the bad transitions of the DFZ, which
take the system from the DFZ to the DZ, are specied. Our
approach is based on the exclusion of the DZ from the RG
of a PNM. The bad transitions can re at some critical good
states of the DFZ and can take the system into the DZ. Based
on the information about the DZ and the DFZ obtained in the
second step, we provide a table, one row of which denes the
critical good states of the DFZ and the other row of which
denes the bad transitions to be stopped from these critical
states. In a sense, this table provides us with a list of events
to be separated from the states of the DFZ.
In the fourth step, the bad transitions to be stopped are
considered as events to be separated from the states of the
DFZ, and the theory of regions [27] is used to solve these
event-state-separation-problems (ESSPs). The theory of regions
is a formal synthesis technique to derive Petri nets from
automaton-based models. To synthesise a Petri net from an
automaton-based model, there are two separation problems to
be solved: the states-separation-problem (SSP), and event-state-
separation-problem (ESSP). From a given automaton-based
model, one may synthesise a Petri net model, whose reach-
ability graph is isomorphic to the given automaton-based
model. However, in this paper as we already have the uncon-
trolled Petri net model of an FMS, we need not synthesise the
controlled net from scratch. We need only synthesise the
related new net elements, namely places with initial marking
198 M. Uzam
and related transitions, which solve the ESSPs related to the
problem considered. Note that, in this paper, we considered
only the synthesis of pure Petri nets from automaton-based
models. It may well be the case that for a given class of FMS
the synthesis of pure Petri nets cannot solve an ESSP related
to the problem considered. In such a case, it may be possible
to solve the same ESSP using the synthesis of general Petri
nets, accommodating self-loops, from automaton-based
models [33].
In the fth step, the synthesised new net elements, namely
places with initial marking and related transitions, i.e. the
atomic nets, which solve the ESSPs, are added to the initial
(uncontrolled) PNM to obtain the controlled PNM. If all ESSPs
are solved by using the theory of regions, then this means that
when the synthesised new net elements are added to the initial
(uncontrolled) PNM we obtain a live, i.e. deadlock-free, and
maximally permissive, i.e. optimal, controlled PNM of the
system. Our control policy is to prevent the system from
entering the DZ, while making sure that every state within the
DFZ can still be reached. It is therefore an optimal deadlock
prevention control policy. That is to say that with our optimal
deadlock prevention policy, we do not sacrice any good state
of the system for the sake of obtaining a deadlock-free system.
The last step is about the implementation of the controlled
PNM. The design phase is only the rst step towards the
control of FMSs. After designing a controlled PNM, it is
necessary to have an automatic means for the generation of
the control code from the controlled PNM. The control policy
can be enforced by implementing the controlled PNM on an
industrial computer. The implementation can be done by using
high-level languages, such as C or low-level languages, such
as machine language. Alternatively, programmable logic con-
trollers (PLCs) can be used with a graphical symbolic program-
ming language, called ladder logic diagrams (LLDs), as the
most popular implementation tools in todays automated mod-
ern factories. A technique, called the token passing logic
(TPL), can be used for converting the controlled PNM (i.e.
the supervisor) into an LLD code for implementation on a
PLC. The details of this technique can be found in [40,41].
In brief, to convert a controlled PNM into an LLD code,
counters are assigned to the places, whose token capacity is
bigger than or equal to 1, and ags are assigned to the places,
whose token capacity is equal to 1. The simulated movement
of tokens is achieved by incrementing and decrementing the
counters (or setting and resetting the ags). Note that in this
paper we will not go into details of the implementation of the
controlled PNMs considered.
5. Examples
In this section, two examples are considered. The rst example
is used to show the details of how an optimal deadlock
prevention control policy can be obtained for a simple FMS.
The second example is taken from [15]. In this example, an
S
4
PR net model of an FMS was considered. The purpose of
this example is to show the applicability of our method to
realistic FMSs.
Fig. 2. An example FMS.
5.1 Example 1
As the rst example, let us consider the FMS (shown in Fig.
2) with two machines M1 and M2, each of which can process
only one part at a time, and one robot, which can hold one
part at a time. Parts enter the FMS through input/output buffers
I/O1 and I/O2. We consider two parts: P1 and P2. Initially, it
is assumed that there are no parts in the system. The production
sequences are:
P1: M1 Robot M2
P2: M2 Robot M1
Let us now consider the design steps as described before.
Step 1. Model the FMS as a Petri net, taking into account
the production sequences and the shared resources.
Figure 3 shows the Petri net model (PNM) of the FMS for
these production sequences. In this model there are eleven
places, P = {p
1
, p
2
, %, p
11
} and eight transitions, T = {t
1
, t
2
,
%, t
8
}. Places p
2
, p
5
and p
8
represent the operation of M1,
Robot, and M2, respectively, for the rst production sequence.
The number of tokens in p
1
, i.e. M(p
1
) = 3, represents the
number of concurrent activities that can take place for P1.
Similarly, places p
10
, p
7
, and p
4
represent the operation of M2,
Robot, and M1, respectively, for the second production
sequence. The number of tokens in p
11
, i.e. M(p
11
) = 3,
represents the number of concurrent activities that can take
place for P2. Places p
3
, p
6
, and p
9
denote the shared resources
M1, Robot, and M2, respectively. In order to have a correct
system behaviour, it is desirable that each production sequence
can nish.
Step 2. Generate the reachability graph (RG) of the Petri net
model (PNM) of the FMS and identify the deadlock-zone (DZ)
and the deadlock-free-zone (DFZ) of the RG.
We obtain the related information about the deadlock(s) of
the system, by using the reachability graph (RG) analysis of
Fig. 3. Petri net model (PNM) of the FMS for the two production
sequences.
An Optimal Deadlock Prevention Policy for FMSs 199
Table 1. Analysis results of dynamic properties of the PNM, produced by Pn-tools [39]
Nodes Arcs
Node 1 2 3 4 5 6 7 8 9 10 11 Node 1 2 3 4 5 6 7 8
0 3 0 1 0 0 1 0 0 1 0 3 0 1 . . . 2 . . .
1 2 1 0 0 0 1 0 0 1 0 3 1 . 3 . . 4 . . .
2 3 0 1 0 0 1 0 0 0 1 2 2 4 . . . . 5 . .
3 2 0 1 0 1 0 0 0 1 0 3 3 6 . 7 . 8 . . .
4 2 1 0 0 0 1 0 0 0 1 2 4 . 8 . . . 9 . .
5 3 0 1 0 0 0 1 0 1 0 2 5 9 . . . 11 . 10 .
6 1 1 0 0 1 0 0 0 1 0 3 6 . . 12 . 13 . . .
7 2 0 1 0 0 1 0 1 0 0 3 7 12 . . 0 . . . .
8 2 0 1 0 1 0 0 0 0 1 2 8 13 . . . . . . .
9 2 1 0 0 0 0 1 0 1 0 2 9 . . . . 14 . . .
10 3 0 1 0 0 0 1 0 0 1 1 10 . . . . 15 . . 0
11 3 0 0 1 0 1 0 0 1 0 2 11 14 . . . . . 15 .
12 1 1 0 0 0 1 0 1 0 0 3 12 . 16 . 1 . . . .
13 1 1 0 0 1 0 0 0 0 1 2 13 . . . . . . . . dead
14 2 1 0 0 0 0 1 0 0 1 1 14 . . . . . . . . dead
15 3 0 0 1 0 1 0 0 0 1 1 15 . . . . . 17 . 2
16 1 0 1 0 1 0 0 1 0 0 3 16 18 . . 3 . . . .
17 3 0 0 1 0 0 1 0 1 0 1 17 . . . . 19 . . 5
18 0 1 0 0 1 0 0 1 0 0 3 18 . . . 6 . . . .
19 3 0 0 1 0 0 1 0 0 1 0 19 . . . . . . . 11
The liveness: The net is not live. The following markings are dead: 13, 14.
The following nodes are not full: 4, 8, 9, 13, 14.
the PNM. In this example, the RG and the states of the RG
that are within the DZ are obtained from PN-tools [39], as
shown in Table 1. The RG is shown in Fig. 4. As can be
seen from Fig. 4 and Table 1, there are ve states, namely s
4
,
s
8
, s
9
, s
13
, and s
14
, within the DZ, two of which, namely s
13
and s
14
, are pure deadlocks and three of which, namely s
4
, s
8
,
and s
9
, are states that inevitably lead to deadlocks. The other
states are within the DFZ.
Step 3. Specify the bad transitions of the DFZ which take
the system from the DFZ to the DZ.
Our control policy is to stop the system from entering the
DZ, while ensuring that all other states within the DFZ can
Fig. 4. The reachability graph (RG) of the PNM, shown in Fig. 3.
still be reached. To do this we will add some new places with
an initial marking into the PNM such that the bad transitions,
shown in Table 2 can no longer occur from the critical good
states of the DFZ.
Step 4. Consider the bad transitions as events to be separated
from the states of the DFZ and use the theory of regions to
solve these event-state-separation-problems (ESSPs).
In order to synthesise the new net elements, i.e. atomic
places with their initial markings and related arcs, the problem
is considered as ESSP and it is solved by using the theory of
regions. To solve these ESSPs, the data required are the
spanning tree U, or more exactly the application c
(.)
that maps
200 M. Uzam
Table 2. The critical good states of the DFZ and their bad transitions,
which must be stopped in order not to get into the DZ.
Critical good states Bad transitions to be stopped
s
1
t
5
s
2
t
1
s
3
t
5
s
5
t
1
s
6
t
5
s
11
t
1
each state s S to the unique chain c
s
from s
0
to s in U,
and the basis of abstract regions {
1
,
2
, %,
k
}. As can be
seen from Fig. 5, in this example (the number of states) n =
15, (the number of chords, except for those in solid thin lines)
m = 24, and (the number of events) p = 8. The spanning tree
U, indicated in solid bold lines, contains n 1 = 14 transitions,
the module V
B
is generated from the m n + 1 = 10
fundamental cycles B
i
by the respective chords
i
indicated by
dashed lines. Note that in order to distinguish transitions of
RG from those in PNM, we use the symbol instead of t.
Let
1
= s
7
J
t
4
s
0
,
2
= s
7
J
t
1
s
12
,
3
= s
10
J
t
8
s
0
,
4
= s
10
J
t
5
s
15
,
5
= s
12
J
t
4
s
1
,
6
= s
15
J
t
8
s
2
,
7
= s
16
J
t
4
s
3
,

8
= s
17
J
t
8
s
5
,
9
= s
18
J
t
4
s
6
,
10
= s
19
J
t
8
s
11
.
The chord
1
= s
7
J
t
4
s
0
induces the closed path
s
0
J
t
1
s
1
J
t
2
s
3
J
t
3
s
7
J
t
4
s
0
and gives rise to the
fundamental cycle B
1
= (s
0
J
t
1
s
1
) + (s
1
J
t
2
s
3
) +
(s
3
J
t
3
s
7
) + (s
7
J
t
4
s
0
), whose Parikh image is (B
1
) = t
1
+
t
2
+ t
3
+ t
4
.
Fig. 5. The good states of the RG, representing the deadlock-free-zone (DFZ), considered as the automaton A with its one of the spanning trees
U (in solid bold lines).
The chord
2
= s
7
J
t
1
s
12
induces the closed path
s
3
J
t
3
s
7
J
t
1
s
12
J
t
3
s
6
J
t
1
s
3
and gives rise to the funda-
mental cycle B
2
= (s
3
J
t
3
s
7
) + (s
7
J
t
1
s
12
) (s
12
J
t
3
s
6
)
(s
6
J
t
1
s
3
), whose Parikh image is (B
2
) = 0.
We can verify that
(B
1
) = (B
5
) = (B
7
) = (B
9
) = t
1
+ t
2
+ t
3
+ t
4
(B
3
) = (B
6
) = (B
8
) = (B
10
) = t
5
+ t
6
+ t
7
+ t
8
(B
2
) = (B
4
) = 0
The Z-module of abstract regions consists of those vectors :
E Z such that
(t
1
) + (t
2
) + (t
3
) + (t
4
) = 0
(t
5
) + (t
6
) + (t
7
) + (t
8
) = 0
It is a 6D Z-module with basis as follows

1
= t
1
t
2
,
2
= t
2
t
3
,
3
= t
3
t
4

4
= t
5
t
6
,
5
= t
6
t
7
,
6
= t
7
t
8
These basic abstract regions are given in Table 3.
In this example the spanning tree U is rooted at the initial
state s
0
of the automaton. Let c
s
denote the branch of the U
Table 3. The basic abstract regions in example 1.
t
1
t
2
t
3
t
4
t
5
t
6
t
7
t
8

1
1 1 0 0 0 0 0 0

2
0 1 1 0 0 0 0 0

3
0 0 1 1 0 0 0 0

4
0 0 0 0 1 1 0 0

5
0 0 0 0 0 1 1 0

6
0 0 0 0 0 0 1 1
An Optimal Deadlock Prevention Policy for FMSs 201
from s
0
to s and let
s
= (c
s
) be its Parikh image. Thus,
we have:

s0
= 0
s6
= 2t
1
+ t
2

s15
= 2t
5
+ t
6
+ t
7

s1
= t
1

s7
= t
1
+ t
2
+ t
3

s16
= 2t
1
+ 2t
2
+ t
3

s2
= t
5

s10
= t
5
+ t
6
+ t
7

s17
= 2t
5
+ 2t
6
+ t
7

s3
= t
1
+ t
2

s11
= 2t
5
+ t
6

s18
= 3t
1
+ 2t
2
+ t
3

s5
= t
5
+ t
6

s12
= 2t
1
+ t
2
+ t
3

s19
= 3t
5
+ 2t
6
+ t
7
These are given in Table 4.
States s S represented by vectors (
i

s
)
i
indexed by the
set of basic abstract regions
i
, i.e. the corresponding scalar
products
i
.
s
, are given in Table 5.
Solving the Event/State Separation Problems (ESSP)
Note that the ESSPs related to this example are as follows:
ESSP
A
(s
1
, t
5
) = s
1
J/
t
5
, ESSP
A
(s
2
, t
1
) = s
2
J/
t
1
,
ESSP
A
(s
3
, t
5
) = s
3
J/
t
5
ESSP
A
(s
5
, t
1
) = s
5
J/
t
1
, ESSP
A
(s
6
, t
5
) = s
6
J/
t
5
,
ESSP
A
(s
11
, t
1
) = s
11
J/
t
1
Let us now consider each separation instance.
Solving the ESSP
A
(s
1
, t
5
) = s
1
J/
t
5
. The system of linear
inequations which express the separation problem ESSP
A
(s
1
,
t
5
) is the following:
.(
s1

s0
) + (t
5
) 0: x
1
+ x
4
0
.(
s1

s1
) + (t
5
) 0: x
4
0
.(
s1

s2
) + (t
5
) 0: x
1
0
.(
s1

s3
) + (t
5
) 0: x
1
x
2
+ x
4
0
.(
s1

s5
) + (t
5
) 0: x
1
+ x
4
x
5
0
.(
s1

s6
) + (t
5
) 0: x
2
+ x
4
0
.(
s1

s7
) + (t
5
) 0: x
1
x
3
+ x
4
0
.(
s1

s10
) + (t
5
) 0: x
1
+ x
4
x
6
0
.(
s1

s11
) + (t
5
) 0: x
1
x
5
0
.(
s1

s12
) + (t
5
) 0: x
3
+ x
4
0
.(
s1

s15
) + (t
5
) 0: x
1
x
6
0
.(
s1

s16
) + (t
5
) 0: x
1
x
2
x
3
+ x
4
0
.(
s1

s17
) + (t
5
) 0: x
1
+ x
4
x
5
x
6
0
.(
s1

s18
) + (t
5
) 0: x
2
x
3
+ x
4
0
.(
s1

s19
) + (t
5
) 0: x
1
x
5
x
6
0
Table 4. All ss obtained from the spanning tree U.

s0

s1

s2

s3

s5

s6

s7

s10

s11

s12

s15

s16

s17

s18

s19
t
1
0 1 0 1 0 2 1 0 0 2 0 2 0 3 0
t
2
0 0 0 1 0 1 1 0 0 1 0 2 0 2 0
t
3
0 0 0 0 0 0 1 0 0 1 0 1 0 1 0
t
4
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
t
5
0 0 1 0 1 0 0 1 2 0 2 0 2 0 3
t
6
0 0 0 0 1 0 0 1 1 0 1 0 2 0 2
t
7
0 0 0 0 0 0 0 1 0 0 1 0 1 0 1
t
8
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
This system of linear inequations is solvable and admits in
particular the solution x
1
= x
4
= 1, x
2
= x
3
= x
5
= x
6
=
0. Therefore,

7
=
k
i=1
x
i
.
i
= x
1
.
1
+ x
2
.
2
+ x
3
.
3
+ x
4
.

4
+ x
5
.
5
+ x
6
.
6
=
1

4
= t
1
+ t
2
t
5
+ t
6

7
(s
0
) = min {
7

s
s S} =
min (0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1) = 1

7
satises condition 3 and (
7
,
7
) solves ESSP
A
(s
1
, t
5
). The
synthesised region
7
with its initial marking
7
(s
0
) = 1 and
related arcs is given in Table 10.
Graphically, the region
7
is the atomic net shown in Fig.
6(a) and it is to be included in the Petri net model.
Solving the ESSP
A
(s
2
, t
1
) = s
2
J/
t
1
. The system of linear
inequations which express the separation problem ESSP
A
(s
2
,
t
1
) is the following:
.(
s2

s0
) + (t
1
) 0: x
1
+ x
4
0
.(
s2

s1
) + (t
1
) 0: x
4
0
.(
s2

s2
) + (t
1
) 0: x
1
0
.(
s2

s3
) + (t
1
) 0: x
1
x
2
+ x
4
0
.(
s2

s5
) + (t
1
) 0: x
1
+ x
4
x
5
0
.(
s2

s6
) + (t
1
) 0: x
2
+ x
4
0
.(
s2

s7
) + (t
1
) 0: x
1
x
3
+ x
4
0
.(
s2

s10
) + (t
1
) 0: x
1
+ x
4
x
6
0
.(
s2

s11
) + (t
1
) 0: x
1
x
5
0
.(
s2

s12
) + (t
1
) 0: x
3
+ x
4
0
.(
s2

s15
) + (t
1
) 0: x
1
x
6
0
.(
s2

s16
) + (t
1
) 0: x
1
x
2
x
3
+ x
4
0
.(
s2

s17
) + (t
1
) 0: x
1
+ x
4
x
5
x
6
0
.(
s2

s18
) + (t
1
) 0: x
2
x
3
+ x
4
0
.(
s2

s19
) + (t
1
) 0: x
1
x
5
x
6
0
This system of linear inequations is solvable and admits in
particular the solution x
1
= x
4
= 1, x
2
= x
3
= x
5
= x
6
= 0. It
Fig. 6. Synthesised atomic nets: (a) The region
7
with (s
0
) = 1.
(b) The region
8
with (s
0
) = 1. (c) The region
9
with (s
0
) = 1.
202 M. Uzam
can be seen that in this case the solution to the separation
problem ESSP
A
(s
2
, t
1
) coincides with the previously obtained
region
7
.
Solving the ESSP
A
(s
3
, t
5
) = s
3
J/
t
5
. The system of linear
inequations which express the separation problem ESSP
A
(s
3
,
t
5
) is the following:
.(
s3

s0
) + (t
5
) 0: x
2
+ x
4
0
.(
s3

s1
) + (t
5
) 0: x
1
+ x
2
+ x
4
0
.(
s3

s2
) + (t
5
) 0: x
2
0
.(
s3

s3
) + (t
5
) 0: x
4
0
.(
s3

s5
) + (t
5
) 0: x
2
+ x
4
x
5
0
.(
s3

s6
) + (t
5
) 0: x
1
+ x
4
0
.(
s3

s7
) + (t
5
) 0: x
2
x
3
+ x
4
0
.(
s3

s10
) + (t
5
) 0: x
2
+ x
4
x
6
0
.(
s3

s11
) + (t
5
) 0: x
2
x
5
0
.(
s3

s12
) + (t
5
) 0: x
1
+ x
2
x
3
+ x
4
0
.(
s3

s15
) + (t
5
) 0: x
2
x
6
0
.(
s3

s16
) + (t
5
) 0: x
3
+ x
4
0
.(
s3

s17
) + (t
5
) 0: x
2
+ x
4
x
5
x
6
0
.(
s3

s18
) + (t
5
) 0: x
1
x
3
+ x
4
0
.(
s3

s19
) + (t
5
) 0: x
2
x
5
x
6
0
This system of linear inequations is solvable and admits in
particular the solution x
2
= x
4
= 1, x
1
= x
3
= x
5
= x
6
=
0. Therefore,

8
=
k
i=1
x
i
.
i
= x
1
.
1
+ x
2
.
2
+ x
3
.
3
+ x
4
.

4
+ x
5
.
5
+ x
6
.
6
=
2

4
= t
2
+ t
3
t
5
+ t
6

8
(s
0
) = min {
8
.
s
s S} =
min (0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1) = 1

8
satises condition 3 and (
8
,
8
) solves ESSP
A
(s
3
, t
5
). The
synthesised region
8
with its initial marking
8
(s
0
) = 1 and
related arcs is given in Table 11.
Graphically, the region
8
is the atomic net shown in Fig.
6(b) and it is to be included in the Petri net model.
Solving the ESSP
A
(s
5
, t
1
) = s
5
J/
t
1
. The system of linear
inequations which express the separation problem ESSP
A
(s
5
,
t
1
) is the following:
.(
s5

s0
) + (t
1
) 0: x
1
+ x
5
0
.(
s5

s1
) + (t
1
) 0: x
5
0
.(
s5

s2
) + (t
1
) 0: x
1
x
4
+ x
5
0
.(
s5

s3
) + (t
1
) 0: x
1
x
2
+ x
5
0
.(
s5

s5
) + (t
1
) 0: x
1
0
.(
s5

s6
) + (t
1
) 0: x
2
+ x
5
0
.(
s5

s7
) + (t
1
) 0: x
1
x
3
+ x
5
0
.(
s5

s10
) + (t
1
) 0: x
1
+ x
5
x
6
0
.(
s5

s11
) + (t
1
) 0: x
1
x
4
0
.(
s5

s12
) + (t
1
) 0: x
3
+ x
5
0
.(
s5

s15
) + (t
1
) 0: x
1
x
4
+ x
5
x
6
0
.(
s5

s16
) + (t
1
) 0: x
1
x
2
x
3
+ x
5
0
.(
s5

s17
) + (t
1
) 0: x
1
x
6
0
.(
s5

s18
) + (t
1
) 0: x
2
x
3
+ x
5
0
.(
s5

s19
) + (t
1
) 0: x
1
x
4
x
6
0
This system of linear inequations is solvable and admits in
particular the solution x
1
= x
5
= 1,
x
2
= x
3
= x
4
= x
6
= 0. Therefore,

9
=
k
i=1
x
i
.
i
= x
1
.
1
+ x
2
.
2
+ x
3
.
3
+ x
4
.

4
+ x
5
.
5
+ x
6
.
6
=
1

5
= t
1
+ t
2
t
6
+ t
7

9
(s
0
) = min {
9

s
s S} =
min (0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1) = 1

9
satises condition 3 and (
9
,
9
) solves ESSP
A
(s
5
, t
1
). The
synthesised region
9
with its initial marking
9
(s
0
) = 1 and
related arcs is given in Table 12.
Graphically, the region
9
is the atomic net shown in Fig.
6(c) and it is to be included in the Petri net model.
Solving the ESSP
A
(s
5
, t
1
) = s
6
J/
t
5
. The system of linear
inequations which express the separation problem ESSP
A
(s
6
,
t
5
) is the following:
.(
s6

s0
) + (t
5
) 0: x
1
+ x
2
+ x
4
0
.(
s6

s1
) + (t
5
) 0: x
2
+ x
4
0
.(
s6

s2
) + (t
5
) 0: x
1
+ x
2
0
.(
s6

s3
) + (t
5
) 0: x
1
+ x
4
0
.(
s6

s5
) + (t
5
) 0: x
1
+ x
2
+ x
4
x
5
0
.(
s6

s6
) + (t
5
) 0: x
4
0
.(
s6

s7
) + (t
5
) 0: x
1
+ x
2
x
3
+ x
4
0
.(
s6

s10
) + (t
5
) 0: x
1
+ x
2
+ x
4
x
6
0
.(
s6

s11
) + (t
5
) 0: x
1
+ x
2
x
5
0
.(
s6

s12
) + (t
5
) 0: x
2
x
3
+ x
4
0
.(
s6

s15
) + (t
5
) 0: x
1
+ x
2
x
6
0
.(
s6

s16
) + (t
5
) 0: x
1
+ x
3
+ x
4
0
.(
s6

s17
) + (t
5
) 0: x
1
+ x
2
+ x
4
x
5
x
6
0
.(
s6

s18
) + (t
5
) 0: x
3
+ x
4
0
.(
s6

s19
) + (t
5
) 0: x
1
+ x
2
x
5
x
6
0
This system of linear inequations is solvable and admits in
particular the solution x
1
= x
4
= 1, x
2
= x
3
= x
6
= x
6
= 0. In
which case solving the ESSP
A
(s
6
, t
5
) is equal to that of
7
,
i.e. =
7
or the solution x
2
= x
4
= 1, x
1
= x
3
= x
5
= x
6
= 0, in which case solving the ESSP
A(
s
6,
t
5)
is equal to that
of
8
, i.e. =
8
. This means that ESSP
A
(s
6
, t
5
) can be solved
either by
7
or by
8
.
Fig. 7. Controlled PNM, which is live, i.e. deadlock-free, and optimal,
i.e. maximally permissive.
An Optimal Deadlock Prevention Policy for FMSs 203
Table 5. States sS represented by vectors (
i
.
s
)
i
indexed by the set of basaic abstract regions
i
.

i
.
s

s0

s1

s2

s3

s5

s6

s7

s10

s11

s12

s15

s16

s17

s18

s19

1
0 1 0 0 0 1 0 0 0 1 0 0 0 1 0

2
0 0 0 1 0 1 0 0 0 0 0 1 0 1 0

3
0 0 0 0 0 0 1 0 0 1 0 1 0 1 0

4
0 0 1 0 0 0 0 0 1 0 1 0 0 0 1

5
0 0 0 0 1 0 0 0 1 0 0 0 1 0 1

6
0 0 0 0 0 0 0 1 0 0 1 0 1 0 1
Solving the ESSP
A
(s
5
, t
1
) = s
11
J/
t
1
. The system of linear
inequations which express the separation problem ESSP
A
(s
11
,
t
1
) is the following:
.(
s11

s0
) + (t
1
) 0: x
1
+ x
4
+ x
5
0
.(
s11

s1
) + (t
1
) 0: x
4
+ x
5
0
.(
s11

s2
) + (t
1
) 0: x
1
+ x
5
0
.(
s11

s3
) + (t
1
) 0: x
1
x
2
+ x
4
+ x
5
0
.(
s11

s5
) + (t
1
) 0: x
1
+ x
4
0
.(
s11

s6
) + (t
1
) 0: x
2
+ x
4
+ x
5
0
.(
s11

s7
) + (t
1
) 0: x
1
x
3
+ x
4
+ x
5
0
.(
s11

s10
) + (t
1
) 0: x
1
+ x
4
+ x
5
x
6
0
.(
s11

s11
) + (t
1
) 0: x
1
0
.(
s11

s12
) + (t
1
) 0: x
3
+ x
4
+ x
5
0
.(
s11

s15
) + (t
1
) 0: x
1
+ x
5
x
6
0
.(
s11

s16
) + (t
1
) 0: x
1
x
2
x
3
+ x
4
+ x
5
0
.(
s11

s17
) + (t
1
) 0: x
1
+ x
4
x
6
0
.(
s11

s18
) + (t
1
) 0: x
2
x
3
+ x
4
+ x
5
0
.(
s11

s19
) + (t
1
) 0: x
1
x
6
0
This system of linear inequations is solvable and admits either
the solution x
1
= x
4
= 1, x
2
= x
3
= x
5
= x
6
= 0, in which
case solving the ESSP
A
(s
11
, t
1
) is equal to that of
7
, i.e.
=
7
, or the solution x
1
= x
5
= 1, x
2
= x
3
= x
4
= x
6
= 0, in
which case solving the ESSP
A
(s
11
, t
1
) is equal to that of
9
,
i.e. =
9
. This means that ESSP
A
(s
11
, t
1
) can be solved
either by
7
or by
9
.
Step 5. Add the synthsised atomic nets, which solve the
ESSPs, to the PNM to obtain the controlled PNM.
When the synthesised atomic nets, given in Fig. 6, are added
into the PNM, we obtain the controlled PNM, as shown in
Fig. 7. Since the theory of regions provided us with a solution
for every ESSP, the controlled PNM is not only live, i.e.
deadlock-free, but also optimal, i.e. maximally permissive. This
is because with proposed control policy we not only manage
to stop the system from entering the DZ, but we also ensure
that every state within the DFZ can still be reached. As a
result, this provides us with an optimal deadlock prevention
policy, implemented on the original net with additional net
components, resulting in the controlled PNM.
5.2 Example 2
Figure 8(a) shows an example FMS taken from [15]. The
system is composed of two robots, namely R1 and R2, each
of which can hold one part at a time, and four machines,
Fig. 8. (a) An FMS with four workstations, from [15]. (b). The pro-
duction sequences. (c). The Petri net model of the system (S
4
PR net).
namely M1, M2, M3, and M4, each of which can process
only one part at a time. For loading and unloading the system,
there are two loading buffers I1 and I2, and two unloading
buffers O1 and O2. The action areas of the robot R1 are I1,
M1, M2, M3, M4, and O2, and for robot R2, they are I2,
M3, M4, and O1. As shown in Fig. 8(b), two part types are
considered: P1 is taken from I1 by R1, and after being
manufactured, it is moved to O1 by R2. In the production
process of P1, M1 or M2, and M3 are used. P2 is taken from
I2 by R2, and after being processed by M4 and M2, it is
moved to O2 by R1.
Figure 8(c) shows the Petri net model (PNM) of the system
(an S
4
PR net). Initially, it is assumed that there are no parts
in the system. In the PNM there are 19 places, P = {p
1
, p
2
,
%, p
19
} and 14 transitions, T = {t
1
, t
2
, %, t
14
}. Places p
7
, p
6
,
p
4
, p
3
, and p
2
represent the operation of R2, M4, R1, M2, and
204 M. Uzam
Table 6. Siphons of the PNM and their associated local control places, from [15]
i D
i
(siphons)

C
Di
C

Di
M
0
1 p
9
, p
10
, p
17
, p
5
, p
4
, p
2
, p
11
, p
18
t
4
, t
13
t
6
, t
10
, t
11
3
2 p
9
, p
8
, p
11
, p
2
, p
15
t
2
, t
10
t
4
, t
8
1
3 p
9
, p
14
, p
8
, p
2
, p
15
t
2
, t
10
, t
11
t
4
, t
7
2
4 p
9
, p
10
, p
14
, p
8
, p
17
, p
5
, p
2
, p
18
t
2
, t
13
t
6
, t
7
5
5 p
9
, p
10
, p
8
, p
17
, p
5
, p
11
, p
2
, p
18
t
2
, t
13
t
6
, t
8
, t
11
4
R1, respectively, for production sequence of the part type P2.
The number of tokens in p
1
, i.e. M(p
1
) = 4, represents the
number of concurrent activities that can take place for P2.
Similarly, places p
11
, p
12
, p
13
, p
15
, p
16
, and p
18
represent the
operation of R1, M2 or M1, R1, M3, and R2, respectively,
for the production sequence of the part type P1. The number
of tokens in p
19
, i.e. M(p
19
) = 5, represents the number of
concurrent activities that can take place for P1. Places p
5
, p
8
,
p
9
, p
10
, p
14
, and p
17
denote the shared resources M4, M2, R1,
R2, M1, and M3, respectively. Initial markings of places p
5
,
p
8
, p
9
, p
10
, p
14
, and p
17
, are all one, as machines can process
one part and robots can hold one part at a time.
Before considering our answer to this problem, rst let us
consider a previously provided answer, i.e. a siphon based
technique to deadlock prevention [15]. The set of minimal
siphons, which do not support p-invariants, is composed of
ve siphons [15], which are associated with ve local control
places, as shown in Table 6.
When these local control places are added into the PNM,
the controlled net shown in Fig. 9 is obtained. However, it
can be veried that this net is not live, i.e. it is not deadlock-
free. It can be veried that, marking M
deadlock
= (2, 0, 0, 0, 0,
1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0)
T
of the
controlled net shown in the gure is a deadlock. The ring
sequence
deadlock
= t
6
t
5
t
6
t
7
t
8
t
7
t
9
t
10
t
12
t
7
t
8
is only one of the ring
sequences that can take the system from the initial marking
M
0
= (4, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 5, 1,
2, 3, 4, 5)
T
into this deadlock. Therefore, as the siphon-based
Fig. 9. Deadlock prevention policy proposed in [15] for the FMS
shown in Fig. 8, which is not live, i.e. it is not deadlock-free.
technique proposed did not provide a correct prevention policy,
to deal with this situation, as a second phase in [15], the
authors proposed a deadlock avoidance policy, the principle of
which is to supervise on-line resource allocation to minimise
deadlock situations. At each system state, this deadlock avoid-
ance control policy determines those system evolutions, among
the set of feasible ones, which are correct, i.e. states from
which all processes can be nished. This approach, however,
does not totally eliminate deadlocks. When a deadlock cannot
be avoided, recovery mechanisms must be used [15].
Let us now consider our solution to this problem. We will
now follow the design steps as described before.
Step 1. Model the FMS as a Petri net taking into account
the production sequences and the shared resources.
The PNM of the system is shown in Fig. 8(c), and it has
been explained previously.
Step 2. Generate the reachability graph (RG) of the Petri net
model (PNM) of the FMS and identify the deadlock-zone (DZ)
and the deadlock-free-zone (DFZ) of the RG.
The RG and the states of the RG that are within the DZ
and the states of the RG that are within the DFZ are obtained
by using PN-tools [39]. There are 282 reachable states
(markings), S = (s
1
, s
2
, %, s
282
) within the RG. (Note that in
this example the initial state is called s
1
, because here it is
used as it is produced by PN-tools). There are 77 states
(markings), namely s
32
, s
39
, s
49
, s
56
, s
64
, s
69
, s
71
, s
75
, s
76
, s
90
,
s
94
, s
98
, s
99
, s
101
, s
116
, s
119
, s
120
, s
126
, s
128
, s
134
, s
138
, s
143
, s
145
,
s
146
, s
154
, s
156
, s
157
, s
158
, s
159
, s
166
, s
168
, s
171
, s
175
, s
178
, s
183
, s
187
,
s
189
, s
190
, s
197
, s
199
, s
202
, s
206
, s
209
, s
213
, s
214
, s
215
, s
216
, s
217
, s
218
,
s
219
, s
20
, s
228
, s
231
, s
232
, s
236
, s
240
, s
241
, s
243
, s
244
, s
245
, s
247
, s
248
,
s
252
, s
253
, s
257
, s
259
, s
262
, s
266
, s
267
, s
269
, s
272
, s
274
, s
275
, s
280
, s
281
,
within the DZ, 16 of which, namely s
97
, s
99
,
s143
, s
146
, s
154
,
s
157
, s
197
, s
214
, s
215
, s
216
, s
217
, s
240
, s
244
, s
245
, s
252
, s
266
, are pure
deadlocks and the other 61 are states that inevitably lead to
deadlocks. The remaining 205 states are within the DFZ. These
states are those which stay out of the DZ.
Step 3. Specify the bad transitions of the DFZ which take
the system from the DFZ to the DZ.
The bad transitions which take the system from the DFZ to
the DZ are given in Table 7. Our optimal deadlock prevention
policy is to stop these bad transitions from occurring at these
critical good states such that the system will never get into
the DZ, while ensuring that all other states within the DFZ
can still be reached.
An Optimal Deadlock Prevention Policy for FMSs 205
Table 7. The critical good states of the DFZ and their related bad transitions, which must be stopped in order not to enter the DZ.
Critical good states Bad transitions Critical good Bad transitions Critical good Bad transitions
to be stopped states to be stopped states to be stopped
s
19
t
4
s
117
t
4
s
192
t
6
s
24
t
7
s
117
t
7
s
193
t
4
s
30
t
4
s
127
t
7
s
193
t
7
s
37
t
7
s
127
t
11
s
203
t
4
s
45
t
4
s
131
t
6
s
203
t
7
s
47
t
7
s
132
t
6
s
229
t
4
s
54
t
4
s
135
t
6
s
229
t
7
s
54
t
7
s
136
t
4
s
229
t
11
s
65
t
4
s
137
t
7
s
233
t
6
s
67
t
7
s
141
t
7
s
234
t
4
s
72
t
4
s
148
t
4
s
234
t
7
s
72
t
7
s
152
t
7
s
238
t
4
s
72
t
11
s
163
t
4
s
239
t
7
s
78
t
6
s
163
t
6
s
263
t
4
s
92
t
4
s
163
t
7
s
264
t
7
s
92
t
7
s
176
t
4
s
265
t
4
s
103
t
8
s
180
t
4
s
265
t
7
s
106
t
4
s
181
t
7
s
278
t
4
s
106
t
6
s
185
t
7
s
278
t
7
s
112
t
7
s
191
t
6

Table 8. The basic abstract regions in example 2.
t
1
t
2
t
3
t
4
t
5
t
6
t
7
t
8
t
9
t
10
t
11
t
12
t
13
t
14

1
1 1 0 0 0 0 0 0 0 0 0 0 0 0

2
0 1 1 0 0 0 0 0 0 0 0 0 0 0

3
0 0 1 1 0 0 0 0 0 0 0 0 0 0

4
0 0 0 1 1 0 0 0 0 0 0 0 0 0

5
0 0 0 0 1 1 0 0 0 0 0 0 0 0

6
0 0 0 0 0 0 1 1 1 0 0 0 0 0

7
0 0 0 0 0 0 0 1 0 1 0 0 0 0

8
0 0 0 0 0 0 0 0 1 0 1 0 0 0

9
0 0 0 0 0 0 0 0 0 1 1 1 0 0

10
0 0 0 0 0 0 0 0 0 0 0 1 1 0

11
0 0 0 0 0 0 0 0 0 0 0 0 1 1
Step 4. Consider the bad transitions as events to be separated
from the states of the DFZ and use the theory of regions to
solve these event-state-separation-problems (ESSPs).
In this example as can be seen from Table 7, there are 59
event-state-separation instances to be solved. To solve these
ESSPs, we need the spanning tree U of the DFZ, or more
exactly the application c
(.)
that maps each state s S to the
unique chain c
s
from s
0
to s in U, and the basis of abstract
regions {
1
,
2
, %,
k
}. Note that in this example we will
not provide all the details of how to solve these ESSPs, but
rather we will provide the results which are obtained by using
the theory of regions.
We can verify that the Z-module of abstract regions consists
of those vectors : E Z such that
(t
1
) + (t
2
) + (t
3
) + (t
4
) + (t
5
) + (t
6
) = 0
(t
7
) + (t
8
) + (t
10
) + (t
12
) + (t
13
) + (t
14
) = 0
(t
7
) + (t
9
) + (t
11
) + (t
12
) + (t
13
) + (t
14
) = 0
It is an 11D Z-module with the following:

1
= t
2
t
1
,
2
= t
3
t
2
,
3
= t
4
t
3
,
4
= t
5
t
4

5
= t
6
t
5
,
6
= t
7
t
8
t
9
,
7
= t
8
t
10
,
8
= t
9
t
11

9
= t
10
+ t
11
t
12
,
10
= t
12
t
13
,
11
= t
13
t
14
These basic abstract regions are given in Table 8.
In addition to these basic abstract regions, we also obtain
all
s
s from the spanning tree U. Then, by using the corre-
sponding scalar products
i
.
s
, every ESSP is solved by con-
sidering the related system of linear inequations. The resulting
nine synthesised regions, which solve the 59 ESSPs shown in
Table 7, with their initial markings are given in Table 9.
Step 5. Add the synthsised atomic nets, which solve the
ESSPs, to the PNM to obtain the controlled PNM.
When the synthesised atomic nets with their initial markings
are added into the PNM, given in Fig. 8(c), we obtain the
controlled PNM, as shown in Fig. 10. Since the theory of
regions provided us with a solution for every ESSP, the
controlled PNM is not only live, i.e. deadlock-free, but also
optimal, i.e. maximally permissive. This is because, with the
206 M. Uzam
Table 9. The synthesised regions in example 2.
t
1
t
2
t
3
t
4
t
5
t
6
t
7
t
8
t
9
t
10
t
11
t
12
t
13
t
14
(s
0
)

20
0 1 0 1 0 0 0 0 0 0 0 0 0 0 1

21
0 1 1 0 0 0 1 1 0 0 1 0 0 0 2

22
0 0 1 1 0 0 0 1 0 1 0 0 0 0 1

23
0 0 0 1 0 1 0 1 0 0 1 1 0 0 3

24
0 0 0 1 0 1 0 1 0 1 0 1 1 0 3

25
0 0 0 1 0 1 0 0 0 1 1 0 1 0 3

26
0 0 0 1 0 1 1 1 0 0 1 1 1 0 4

27
0 0 0 1 0 1 0 0 0 1 1 0 1 0 3

28
0 0 0 0 0 0 1 0 0 1 1 0 0 0 2
Fig. 10. Controlled Petri net model of the FMS shown in Fig. 8(c), which is live (deadlock-free) and optimal (maximally permissive), obtained
using the theory of regions.
Table 10. The synthesised region
7
in example 1.
t
1
t
2
t
3
t
4
t
5
t
6
t
7
t
8
(s
0
)

7
1 1 0 0 1 1 0 0 1
Table 11. The synthesised region
8
in example 1.
t
1
t
2
t
3
t
4
t
5
t
6
t
7
t
8
(s
0
)

8
0 1 1 0 1 1 0 0 1
Table 12. The synthesised region
9
in example 1.
t
1
t
2
t
3
t
4
t
5
t
6
t
7
t
8
(s
0
)

9
1 1 0 0 0 1 1 0 1
proposed control policy, we not only manage to stop the
system from entering the DZ but we also ensure that every
state within the DFZ can still be reached. That is to say that
with our optimal deadlock prevention policy we do not sacrice
any good state of the system for the sake of obtaining a
deadlock-free system.
An Optimal Deadlock Prevention Policy for FMSs 207
6. Conclusions
Deadlock problems can cause unnecessary costs because of
long downtime and low use of some critical and expensive
resources in exible manufacturing systems (FMS) environ-
ments. Therefore, the development of efcient deadlock preven-
tion policies which can optimise the use of system resources,
while preventing deadlocks from occurring, has long been an
important issue. In this paper, an optimal deadlock prevention
policy for FMSs has been proposed. The proposed policy is
optimal in the sense that it allows the maximal use of resources
in the system according to the production requirements. The
proposed optimal deadlock-prevention policy becomes very
important, especially when a deadlock situation is not accept-
able at all for the considered systems, when some critical and
expensive resources are used, and when the on-line system
response time is critical. It is also worth mentioning that the
proposed policy is not conned to a limited classes of Petri
net models of FMSs and can be applied to any Petri net
model. The proposed policy is based on the use of reachability
graph analysis of the Petri net model (PNM) of a given FMS
and the synthesis of a set of new net elements, namely places
with initial marking and related arcs, to be added to the PNM,
using the theory of regions, a formal synthesis technique to
derive Petri nets from automaton-based models.
The size of the reachability graph is the only problem for
applying such an approach to very large Petri nets owing to
the state explosion problem. In order to avoid this problem,
it is possible to use a model reduction approach, which simpli-
es a subnet or structure while preserving the concerned
properties, such as boundedness, liveness, and reversibility [26].
We have already applied this technique to some Petri net
models and obtained promising results, which will be the topic
of forthcoming publications. Other well-known methods of
avoiding the state explosion problem [2125] may be used in
the context of optimal deadlock prevention in FMSs. Therefore,
further research will be carried out in this direction.
Acknowledgement
This work was supported by the French National Research
Institute INRIA under the MARS project. The author would
like to thank P. Darondeau for explaining the theory of regions.
The author would also like to thank Xiaolan Xie for his
invitation for a 3 month research in summer 1999 in France,
which enabled the author to write this paper.
References
1. N. Visvanadham, Y. Nahari and T. L. Johnson, Deadlock preven-
tion and deadlock avoidance in exible manufacturing systems
using Petri net models, IEEE Trans. Robot. Automat., vol. 6,
no. 6, pp. 713723, 1990.
2. Z. A. Banaszak and B. H. Krogh, Deadlock avoidance in exible
manufacturing systems with concurrently competing process
ows, IEEE Transactions on Robotics and Automations 6(6), pp.
724734, 1990.
3. L. Y. Tat and S. Gwo-Ji, Resolving deadlocks in exible manu-
facturing cells, Journal of Manufacturing Systems 12(4), pp. 291
307, 1993.
4. R. A. Wysk, Y. Neng-Shu and J. Sanjay, Resolution of deadlocks
in exible manufacturing systems: avoidance and recovery
approaches, Journal of Manufacturing Systems, 13(2), pp. 128
136, 1994.
5. F. S. Hsieh and S. C. Chang, Dispatching-driven deadlock avoid-
ance controller synthesis for exible manufacturing systems, IEEE
Transactions on Robotics and Automations, 10(2), pp. 196209,
1994.
6. J. Ezpeleta, J. M. Colom and J. Martinez, A Petri net based
deadlock prevention policy for exible manufacturing systems,
IEEE Transactions on Robotics and Automations, 11(2), pp. 173
184, 1995.
7. H. Cho, T. K. Kumaran and R. A. Wysk, Graph-theoretic dead-
lock detection and resolution for exible manufacturing systems,
IEEE Transactions on Robotics and Automations, 11(3), pp. 413
421, 1995.
8. K. Xing, B. Hu and H. Chen, Deadlock avoidance policy for
exible manufacturing systems, in M. C. Zhou (ed.) Petri Nets
in Flexible and Agile Automation, Kluwer, Boston, MA, pp. 239
263, 1995.
9. K. Xing, B. Hu and H. Chen, Deadlock avoidance policy for
Petri-net modelling of exible manufacturing systems with shared
resources, IEEE Transactions on Automatic Control, 41(2), pp.
289295, 1996.
10. M. P. Fanti, B. Maione, S. Mascolo and B. Turchiano, Event-
based feedback control for deadlock avoidance in exible pro-
duction systems, IEEE Transactions on Robotics and Auto-
mations, 13(3), pp. 347363, 1997.
11. M. Lawley, S. Reveliotis and P. Ferreira, Design guidelines for
deadlock handling strategies in exible manufacturing systems,
International Journal of Flexible Manufacturing Systems, 9(7), pp.
529, 1997.
12. D. Yim, J. Kim and H. Woo, Avoidance of deadlocks in exible
manufacturing systems using a capacity designated directed graph,
International Journal of Production Research, 35(9), pp. 2459
2475, 1997.
13. F. Tricas, F. Garcia-Valles, J. M. Colom and J. Ezpelata, A
structural approach to the problem of deadlock prevention in
processes with resources, in Proceedings of WODES 98, Italy,
pp. 273278, 2628 August 1998.
14. M. Lawley, S. Reveliotis and P. Ferreira, A correct and scalable
deadlock avoidance policy for exible manufacturing systems,
IEEE Transactions on Robotics and Automatons, 14, 796809,
1998.
15. I. B. Abdallah and H. A. ElMaraghy, Deadlock prevention and
avoidance in FMS: a Petri net based approach, International
Journal of Advanced Manufacturing Technology, 14, pp. 704
715, 1998.
16. L. Ferrarini and M. Maroni, Deadlock avoidance control for
manufacturing systems with multiple capacity resources, Inter-
national Journal of Advanced Manufacturing Technology, 14, pp.
729736, 1998.
17. M. Lawley, Deadlock avoidance for production systems with
exible routing, IEEE Transactions on Robotics and Automatons,
15(3), pp. 497509, 1999.
18. F. Tricas, F. Garcia-Valles, J. M. Colom and J. Ezpelata, A
structural approach to the problem of deadlock prevention in
processes with resources, in Proceedings of the 4th WODES 98,
pp. 273278, Cagliari-Italy, 2628 August 1998.
19. S. E. Ramaswamy and S. B. Joshi, Deadlock-free schedules for
automated manufacturing workstations, IEEE Transactions on
Robotics and Automatons, 12(3), pp. 391400, 1996.
20. Y. Li and W. M. Wonham, Deadlock issues in supervisory
control of discrete event systems, in Proceedings of the 1st
WODES 88, p. 5763, Princeton, 1988.
21. M. Notomi and T. Murata, Hierarchical reachability graph of
bounded Petri nets for concurrent-software analysis, IEEE Trans-
actions in Software Engineering, 20(5), pp. 325336, 1994.
208 M. Uzam
22. K. L. McMillan, A technique for state space search based on
unfolding, Formal Methods in System Design, 6(1), pp. 4565, 1995.
23. J. Esparza, S. Romer and W. Volger, An improvement of McMil-
lans unfolding algorithm, Tools and Algorithms for the Construc-
tion and Analysis of Systems, vol. 1055 of Lecture Notes in
Computer Science, pp. 87106, Passau, Germany, Springer-Verlag,
March 1996.
24. M. Heiner, Verication and optimization of control programs by
Petri nets without state explosion, in Proceedings 2nd Inter-
national Workshop on Manufacturing and Petri Nets; A Workshop
within the 28th International Conference on Applications and
Theory of Petri Nets, Tolouse, France, 23 June 1997.
25. A. Taubin, A. Kondratvey and M. Kishinevsky, Deadlock preven-
tion using Petri nets and their unfoldings, International Journal
of Advanced Manufacturing Technology, 14, pp. 750759, 1998.
26. T. Murata, Petri nets: properties, analysis and application, in
Proceedings of IEEE, 44, pp. 541579, 1989.
27. E. Badouel and P. Darondeau, Theory of Regions, W. Reisig
and G. Rozenberg (ed.), vol. 1491 of Lecture Notes in Computer
Science, Lectures on Petri Nets I: Basic Models, Advances in
Petri Nets, pp. 529586, 1998.
28. J. L. Peterson, Petri Net Theory and the Modelling of Systems,
Englewood Cliffs, NJ, Prentice-Hall, 1981.
29. M. C. Zhou and M. D. Jeng, Modeling, analysis, simulation,
scheduling, and control of semiconductor manufacturing systems:
a petri net approach, IEEE Transactions on Semiconductor Manu-
facturing, 11(3), pp. 333357, 1998.
30. A. Ehrenfeucht and G. Rozenberg, Partial (set) 2-structures; part
I: basic notions and the representation problem, Acta Informatica,
27, pp. 315342, 1990.
31. A. Ehrenfeucht and G. Rozenberg, Partial (set) 2-structures; part
II: state space of concurrent systems, Acta Informatica, 27, pp.
343368, 1990.
32. E. Badouel, L. Bernardinello and P. Darondeau, Polynomial
algorithms for the synthesis of bounded nets, in Proceedings of
CAAP 95, vol. 915 of Lecture Notes in Computer Science, pp.
647679, 1995.
33. E. Badouel and P. Darondeau, On the synthesis of general Petri
nets, INRIA Research Report No. 3025, 1996.
34. C. Berge, Graphes et Hypergraphes, Dunod, Paris, 1970. English
translation: Graphs and Hypergraphs, North Holland, Amster-
dam, 1973.
35. W. K. Chen, Applied Graph Theory, North Holland, 1971.
36. N. Christodes, Graph Theory An Algorithmic Approach, Aca-
demic Press, 1975.
37. A. Schrijver, Theory of Linear and Integer Programming, John
Wiley, 1986.
38. M. D. Jeng and F. DiCesare, Synthesis using resource control
nets for modeling shared-resource systems, IEEE Transactions
on Robotics and Automations, 11(3), pp. 317327, 1995.
39. PN-tools, A Petri net analysis tool, ver 1.0, Pedagogical University
of Rzesow, Poland, 19871996.
40. A. H. Jones, M. Uzam, A. H. Khan, D. Karimzadgan and S. B.
Kenway, A general methodology for converting Petri nets into
ladder logic: the TPLL methodology, in Proceedings of CIMAT
96, France, pp. 357362, 2931 May 1996.
41. M. Uzam and A. H. Jones, Design of a discrete event
control system for a manufacturing system using token passing
ladder logic, in Proceedings of CESA 96, pp. 513518, 912
July 1996.

You might also like