Petri nets and deadlock-free scheduling of multiple-resource operations

Post on 11-Nov-2023

2 views 0 download

transcript

Petri Nets and Deadlock-free Scheduling of Multiple-Resource Operations

Berenice C. Damasceno and Xiaolan Xie INRIA / MACS1 Team

ENIM-ILE DU SAULCY, 57045 - Metz, France xie@loria. fr

ABSTRACT

The integration of scheduling and deadlock-avoidance of automated manufacturing systems with complex product structures and complex resource behaviors is addressed in this paper. For this purpose, we introduce an extension of job-shops and call the new systems job-shops Multi- Resource with Blocking or job-shops MRB for short. A job-shop MRB is composed of a set of resources and each resource can have more than one unit. A set of jobs is processed and each job requires a sequence of operations. Each operation may need more than one resource and more than one unit of a resource. Most importantly, a job- shop MRB is fiuther characterized by a so-called “hold while wait” property for resources’ release. The scheduling problem consists in sequencing the operations on the resources in order to avoid deadlocks and to minimize the makespan. We first model the system using Petri nets, formulate deadlock constraints in terms of PN model, and establish feasibility conditions of a given schedule. Finally, a heuristic proposed to obtain deadlock- free schedules. The heuristic schedules the jobs one after another. For each job, the scheduling problem consists in minimizing its completion time without modifying the schedules of the scheduled jobs. A dynamic programming approach is proposed to solve this one-job scheduling problem.

1. INTRODUCTION

Modern manufacturing systems are characterized by a high degree of automation archived through the use of a rich variety of resources such as NC machines, robots, material handling resources, and automated storage devices. The efficient co-ordination of all resources is a challenging problem. The variety of resource is not considered in classical scheduling models which consider only single-resource operations and neglect the resource synchronization.

In this paper, in order to take into account the variety of resources employed in manufacturing systems, we introduce an extension of job-shops and call the new systems job-shops Multi-Resource with Blocking or job- shops MRB for short. A job-shop MRB is composed of a set of resources and each resource can have more than one unit. A set of jobs is processed and each job requires a sequence of operations. Each operation may need more than one resource and more than one unit of a resource.

Most importantly, a job-shop MFU3 is further characterized by a so-called “hold while wait” property for resources’ release. That is, upon the completion of an operation, resources needed in the next operation of the same job cannot be released, while the remaining resources cannot be released until the job proceeds to the next operation. This resource model corresponds to resources such as transportation resources, robots, production authorization carts in kanban controlled systems, machines with limited output buffers. We show that job-shops MRB provide a general framework for modeling and scheduling of manufacturing systems with various resources and real-life technical constraints. Job- shops MRB include a wide range of classical scheduling models as special cases.

It is well known that complex product structure and complex resource behaviors easily lead to undesirable deadlock situations if not adequately managed. For example, loading a part using a robot on a machine being processing another part leads to a deadlock if the same robot is needed for unloading the machine. Existing work has mainly concentrated on the deadlock prevention, detection and avoidance. It is usually assumed that scheduling is determined without taking into account deadlock issues and a deadlock detection lavoidance mechanism is used to handle possible deadlock situations. The separate consideration of scheduling and deadlock may lead to unsatisfactory performance.

In this paper, we instead schedule the jobs by taking into account possible deadlocks. The goal is to determine starting times of operations and input sequences of operations sharing common resources so as to minimize the makespan while avoid deadlocks. The joint consideration of scheduling and deadlock avoidance leads to highly combinatorial scheduling problems. Many classical scheduling techniques do not apply. For example, the pair-wise exchange of operations is recognized as one of the most efficient technique of scheduling job shops and does not apply here as it often leads to deadlock. Nevertheless, it is our belief that joint consideration may lead to more powerful heuristic solutions than separate handling of scheduling and deadlock issues.

Closely related to our work are existing Petri net-based scheduling approaches. Scheduling problems of cyclic manufacturing systems were formulated and solved using

I -878 0-7803-5731-0/99/$10.00 01999 IEEE

heuristic methods in [2,6]. Petri net models and heuristic solutions were proposed in [8,10] for manufacturing systems with complex product structures and simple resource behaviors in which each operation requires one resource and each operation is followed by an unlimited buffer. Recently, Jeng et al. [7] considered the scheduling of manufacturing systems with complex product structures and relatively complex resource behaviors. They used a so-called A* search method, a branch and bound-like method, for exploring the reachability graph. However, it seems difficult to obtain reasonable bounds for partial solutions and it is unlike that the A* search method can solve large scheduling problems.

The paper is organized as follows. Section 2 introduces the manufacturing system under consideration, defines the scheduling problem and formulates the scheduling problem. Section 3 checks the feasibility of a schedule using Petri nets. Section 4 proposes a greedy heuristic for solving the scheduling problem. Section 5 is a conclusion.

2. PROBLEM SETTING

The system is composed of a set of resources R = { 1 ,2 , . . . , m} where m is the number of resources. Each resource r E R is composed of H, identical units. A set of jobs J = {J,, J2, ..., J,} where n is the number of jobs is to be processed. Each job Jj requires a sequence of operations {Ojl, Oj2, ..., O~NG)} where NQ) is the number of operations of job Jj. The execution of each operation ojk requires the simultaneous presence of a set of resources Rjk c R with hjk, units of resource r E R and pjk time units, called processing time. Let h,k denote the vector with hjkr as entries and with convention hjk, = 0 for all r e Rjk.

Most importantly, we make the following assumption regarding the release of resources after each operation:

Hold while waiting: All resources hjk needed for operation 6,k) are hold by job J, after operation 0,k) until the subsequent operation (j, k+l) starts and at this point, resources not needed for operation 6, k+l) are released.

In the following, we represent the manufacturing process of a job Jj in the following compact form:

{( Rjl, hjl, Pjl), (Rj2, hj2, Pj2X ... Y (RjN(j), hjN(j), PjNG)))

One motivation of our multiple resource system model is to provide a general framework for modeling and scheduling of manufacturing systems with various resources and real-life technical constraints. We illustrate this claim by showing that our proposed model includes the following classical scheduling models as special cases where the vector hjk with entries 0-1 is not given explicitly:

Jobshops [I21 consisting of a set of machines in which each job visits a sequence of machines {(Mjl, pjl), (Mjz, pj2), ...}. In our model, each job is represented as: {(Mjl, Pjl), (0, 0) , (Mj2, ~j2) , (0, O), ...)

FMSs (see [ 1 , 111) that are jobshops but use AGVs for transporting jobs inside the' systems. In our model, each job is as follows: ((AGV, Mjl, pjl), (AGV, Mj2,

Production lines composed of a sequence of machines separated by buffers of finite capacity. Each job of a production line is given by {(M,, pjJ, (Bll 0), (M2, pj2), (B2, 0), ...} where the number of units of resource Bi is the capacity of buffer Bi. A particular case of interest concerns production lines without intermediate buffers, each job is then described as

Robotic cells [I] composed of a set of machines arranged around a robot R for loading/unloading parts. The manufacturing process of a job can be represented as follows: {(R, A), (Mjl, pjl), (R, A), (Mj2, pj2), (R, A), . . . I where A is the loadinghnloading time

Multiprocessor systems (see [ 5 ] ) that are similar to jobshops but in which each operation may require more than one resource. Jobs are then expressed as

PjA .I

{(MI, PjJ, (M2, ~j2), . . * >

follows: {(Rjl, Pjl), ( 0 3 0) 3 (Rj2, pj2) 9 (0, 01, ... }

We assume that the processing times are strictly positive (pjk > 0) and all resources are available at the time 0.

The scheduling problem consists in choosing an input sequence nr of operations into each resource r E R and starting times of all operations Sjk such that the total time needed to process all jobs, i.e. the makespan denoted by Cmax, is minimized and there is no deadlock.

The scheduling problem can be formulated as follows:

Constraints (2) ensure the precedence relations of the jobs. Relations (3) define the completion time of each job. Constraints (4) correspond to the resource capacity constraints. Constraints ( 5 ) in which n,[i] denotes the i-th

I -879

operation of sequence nr express the consistency between the input sequences and the operation starting times sjk. It can be easily proved that the precedence constraints and the resource capacity constraints do not imply the deadlock-freeness. The deadlock-freeness constraint cannot be easily formulated in terms of the decision variables Sjk and will be checked by means of Petri nets. To see that deadlock situation arises, let us consider a robotic cell. A deadlock situation arises if a machine is performing a part P and the robot is loading a part Q on the same machine.

Theorem I: The scheduling problem (1) is strongly NP- complete ([3]).

arc is equal to hjk+lr - h,kr. An arc connects transition tjk to a resource place r if the end of operation (j, k) releases resources r, i.e. hjk+lr < hjkr. The weight associated to this arc is equal to hjkr - h,k+lr.

It can be checked that the property Hold while waiting is respected in the PN model. Resources needed in operation (j, k) are not released until the start of operation (i, k+l).

Figure 2 is the Petri net model of a job-shop MRB composed of two resources rI and one resource r2 and processing two jobs J I = {(rl r2, S), (2rlr2, 4)) and J I =

{(rl, 3),(r2,4)1. J I J2

This result implies that it is highly unlike to find any efficient algorithm for obtaining optimal solutions of problem (1). As a result, we develop efficient heuristics for solving the problem. However, it is worth noticing that a research is on-going to identify solvable cases.

3. CHECKING DEADLOCK USING PETRI NETS

3.1. System modeling using Petri nets

We assume that the readers are familiar with basic notions and properties of Petri nets. Interested readers can find surveys on theory and applications of Petri nets in [9, lo].

The modeling of a multiple resource system is done in two steps. The first step represents the manufacturing process of each job Jj by an elementary path as shown in Figure 1. The PN model contains NU) + 2 places including a source place representing the availability of job Jj, a sink place representing the completion of the job and Nu) places each representing an operation. Transition tjk for k = 0 to N(j) corresponds to the start of operation Oj,k+l. The PN model is place-timed. The source and sink places are associated null time and the time associated to each of the remaining places corresponds to the related processing time.

Fig. 1 : PN model of a job with two operations

The second step completes the PN model by taking into account resources needed for each operation. It represent each resource r E R by a resource place with initially H, tokens. An arc connects a resource place r to transition tjk if the start of operation (i, k+l) requires more units of resource r, i.e. hjk+lr > hjkr. The weight associated to this

Fig. 2: The PN model of ajob-shop MRB

The PN model can be used to check the deadlock-freeness and the feasibility of a given schedule. The feasibility of a given schedule will be addressed in Subsection 2.2. In the remaining of this section, we address the detection of deadlock of a given state of the manufacturing system, i.e. the existence of jobs that can no longer move forward. The goal to check the deadlock-fkeeness of a schedule fulfilling the precedence constraints and the resource capacity constraints.

From the construction of PN model, it is clear that any state of the manufacturing system corresponds to a marking M of the PN model. A schedule sjk can be equivalently expressed in terms of transition firing epochs S, for all t E T where T is the set of transition. The verification problem consists in checking, for all instant T such that S, = T for some t E T, the existence of a firing sequence containing all transitions t such that St = T. If

I -%%O

such a sequence does not exist, we say that the schedule is with deadlock at instant T.

The following result provides a characterization of deadlock situations using the PN model and the notion of siphons. Let us recall that a siphon is a set S of places such that any input transition of a place in S is output transition of at least one place in it.

Theorem 2: Given a schedule {S,, Vt E T} fulfilling the precedence constraints and resource capacity constraints, the system is deadlock-free at time T such that S, = r for some t E T iff the PN (N, M,J has a firing sequence containing all transitions to be fired at time z, where M,. is the marking at the end of time period T- 1.

To check the condition of the above result, we use a partial marking graph of the PN (N, M,-) concerning the set A, of transitions to be fired at time T. Structural properties can be used to speed up the verification. In particular, transitions that are not in conflict with other transitions in A, can be fired whenever enabled.

3.2. Feasibility of a given schedule

The purpose of this subsection is to check the feasibility of a given schedule. Of course the verification depends on how the schedule is expressed. Here we consider a schedule expressed in terms of input sequence of operations to each resource r.

Let O(r, l), O(r,2), . . . , O(r,N(r)) be the input sequence of resource r where N(r) denotes the number of operations needing resource r. The Petri net model proposed in Section 2.1 can be modified to take into account the schedule. The new Petri net is obtained adding for each resource place r by N(r)-1 places p(r,l), p(r,2), ... as illustrated by figure 3. Place p(r, i) connects the input transition of the place related to O(r, i) to the input transition of the place related to O(r, i+l). The new places are initially empty. Figure 4 is the modified Petri net model of the model of figure 2 with operation sequence O,, O,,O,, for rl and OI1O2, for r,.

The modified PN turns out to be a net without effective conflict. As a result,

Theorem 3: A schedule expressed in terms of operation sequences is with deadlock iff there exists a sequence of transitions in the modified PN leading to a deadlock. Further, if the condition holds, the system is with deadlock whatever the firing policy ([4]).

The above result allows to check the deadlock-freeness by following any feasible firing sequence. If it ends up at a deadlock, then the system is with deadlock. Otherwise the system is deadlock-free whatever the firing policy. If the

system is deadlock-free, the following result provides an easy way to compute the optimal schedule.

Theorem 4: Given a deadlock-free schedule expressed in terms of input sequences of resources, the earliest firing policy, which consists in firing a transition whenever it is enabled in the modified PN, is optimal. That is S,' I S,

where S,' is the schedule of the earliest firing policy and S, is any feasible schedule ([4]).

The schedule given in figure 4 is not deadlock-free as firing t, then t4 leads to a total deadlock at time 5 .

r

Fig. 3 : Modeling input sequences of each resources

Fig. 4 : The PN model with input sequences

1-881

4. A GREEDY SCHEDULING METHOD

Since the schedule problem is NP-complete, it is highly unlike to fmd an efficient and exact scheduling algorithm. For this reason, we limit ourselves to develop efficient scheduling heuristic.

The scheduling method that we propose is a greedy method. It schedules the jobs one after another following a specific order. Once a job Jj is scheduled, its schedule Sjk, V 1 I k 5 NU), will not be modified. The scheduling problem of each job Jj called one-job problem, consists in finding a feasible schedule for Jj such that its completion time is minimized and deadlock situations are avoided. To summarize:

Algorithm 1. 1 . Choose a sequence of jobs without loss of generality,

let J,, J,, ..., J, be this sequence. 2. For j = 1 to n, solve the one-job problem for Jj by

taking into account the schedules of jobs J,, J,, . . . , Jj-, .

Of course, the performance of this method depends highly on the sequence of jobs. In order to overcome this shortcoming, we use a simulated annealing method to find the optimal job sequence. To understand this, let us remark that, for each given job sequence o, Algorithm 2 computes a schedule. Let f(o) be the criterion value of this schedule. Clearly f(o) is well-defined and is a function of the job sequence. We then use a simulated annealing method to compute a optimal job sequence o in order to:

minimize f(o).

More precisely, the following algorithm is used:

Algorithm 2. 1.

2 .

3.

4.

5 .

6 .

In

Choose an initial job sequence (30 and compute its criterion value f(oo) using Algorithm 1 . Choose an initial temperature To and set T := To where T is a temperature. Generate randomly a neighbor job sequence o by exchanging two jobs in oo and . If f(o) < f(oo), then oo := o. Otherwise, oo := o with probability exp(- (f(o) - f(oo)) / T). Reduce the temperature: T := Tr where r is the cooling ratio and 0 < r < 1. If T > Tf where Tf is the final temperature, go to step 3; otherwise, stop.

the following, we focus ourselves on the one-job scheduling problem.

4.1. Formulation of the one-job problem

From the problem formulation given in Section 2, the one- job scheduling problem for Jj can be formulated as follows:

where OLD denotes the set of scheduled jobs.

In this formulation constraints (7) correspond to the precedence relation of job Jj . Constraints (8) define the completion time. Constraints (9) are resource capacity constraints since Ikt equals to zero iff scheduling operation U,k) in time period t does not exceed resource capacities. Constraints (1 0) is the deadlock-freeness constraint.

Notice that the quantities I,, depend on the schedules of the scheduled jobs but they are independent of the schedule of job Jj. Hence I k t are given for the one-job scheduling problem.

4.2. A Dynamic Programming approach

The purpose of this subsection is to present a dynamic programming approach for solving the one-job scheduling problem SP. To this end, we consider the following family of decision problems:

P(k,T): Sjl + pjl I Sj,l+l, V I I 1 I k I,, = 0, V 1 5 1 5 k, V Sj, 5 t I Sj,+l There is not deadlock in [Sjl, T]

(1 1 ) (12) (13)

Sjk+l = z. (14)

For 1 I k I NQ) and 1 I T I H. Let us introduce the following indicator:

1, if P( k r) has a solution 0, otherwise

F(k, r ) =

In words, problem P(k,z) verifies the existence of a deadlock-free schedule for the k first operations such that operation k+ 1 can start at the beginning of period T.

The following results show that the optimal solution of the one-job problem can be derived from the solutions of the decision problems.

Theorem 5: Cj = min { t / F(Nfj), t) = 1 } .

I -882

Theorem 6: {s*jk) with s*jk = maX{t 5 s*jk+l - Pjk /F(k,t) = l} and S*jN+, = Cj forms a feasible schedule of SP. Further, S*jk2 Sj, for all k, for any feasible schedule {Sj,} such that SjN+, = Cj.

Let us consider the resolution of the decision problems. For this purpose, we establish recursive equation for determining F(k,z). Consider the problem P(k+ 1 ,z), i.e.

P(k+l,T): Sj, + pjl 2 Sj,l+l, V l I 1 I k+l I,, = 0, V 1 5 15 k+l, V Sjl< t < Sjl+,

There is not deadlock in [Sjl, T]

Sjk+Z = '5.

which can be rewritten as: Sjl + pjl I Sj,l+l, V 1 I I I k

I,, = 0, V 1 5 1 2 k, V SjlI t < Sjl.1 There is not deadlock in [Sj,, Sjk+,]

I,+], = 0, V Sjk+l 5 t I z

(15) (16) (17)

Sjk+l < Pjk+l (18) (19) (20) There is not deadlock at z.

From the definition of P(k,z), there exists a solution for {Sj,, V 1 2 f < k+l} fulfilling constraints (15) - (17) iff F(k,Sjk+,) = 1. As a result,

1, if 3 t < Z - p jk+l/F(k,t) = 1

AB(k + l , r )= 1

i=t

10, otherwise or equivalently, F(k + 1, P) =

v F ( k , t ) / \ B ( k + l , ~ ) / \ l ( I ~ + ~ , , V ' t I ~ < ~ ~ (21) ISr-pjk

where " A" denotes the logic AND, I' v" denotes the logic OR, and B(k, T) = 1 if performing operation Q,k) in time period 7-1 does not leads to a deadlock and = 0 otherwise. By convention, F(0,z) = 1, for all z. We notice that the indicators B(k, z) can be computed using Theorem 2.

Finally, the decision problems can be solved as follows:

Algorithm 4. 1. Compute the resource availability indicators Ikt. 2. Compute the deadlock indicators B(k, 7).

3. Solve the decision problems 3.1 Initialization : F(0,z) = 1, for all z. 3.2 For k = 0 to N- 1, compute F(k+l ,z) = 1 for all z

using equation (21). 4. Determine Cj using Theorem 5. 5 . Determine starting times s,k using Theorem 6.

5. CONCLUSION

This paper has presented jobshops MRE3 which form a framework for taking into account the variety of resources employed in a manufacturing system. An efficient greedy method is proposed to derive deadlock-free schedules. Future research concerns the extension of the results of this paper to more general systems including assembly/disassembly operations, routing flexibility, etc.

6. REFERENCES

[ I ] J. Blazewicz and G. Finke, "Scheduling with Resource Management in Manufacturing Systems,"

[2] H. Camus, "Conduite de systemes flexibles de production manufacturiere par composition de regimes permanents cyclics," PhD Thesis, Ecole centrale de Lille, France, 1997.

[3] B.C. Damasceno and X.-L. Xie, "Deadlock-free Scheduling of Manufacturing Systems with Multiple Resources", INCOM, Nancy-Metz, France, 1998.

[4] B.C. Damasceno, "Ordonnancement des systemes de production multi-ressources avec la prise en compte de blocage," PhD Thesis, University of Metz, France, 1999.

[5] S. Dauzere Peres, W. Roux, and J.B. Lasserre, "Multi-Resource Shop Scheduling with Resource Flexibility," Research report, #96178, LAAS, Toulouse, France, 1996.

[6] H. Hillion, J.M. Proth and X.L. Xie, "A Heuristic Algorithm for the Periodic Scheduling and Sequencing Job-Shop Problem," Proc. 26th IEEE Conf. on Decision and Control, Los-Angeles, 1987.

[7] M.D. Jeng, S.C. Chen and C.S. Lin, "A Search Approach Based on the Petri Nets Theory for FMS Scheduling," Proc. 13th IFAC World Congress, San Francisco, vol. B, pp. 55-60, 1996.

[8] D.Y. Lee and F. DiCesare, "Scheduling Flexible Manufacturing Systems Using Petri Nets and Heuristic Search," IEEE Trans. Robot. Automat.,

[9] T. Murata, "Petri nets: properties, analysis and applications," Proceedings of IEEE, vol. 77, no. 4,

[ 101 J.M. Proth and X.L. Xie, Petri nets: A tooffor design and management of manufacturing systems, John Wiley & Sons, 1996.

[ 1 11 S.E. Ramaswamy and S.B. Joshi, "Deadlock-free schedules for automated manufacturing workstations", IEEE Trans. on Robotics and Automation, vol. 12, pp. 391-400, 1996.

I121 A.H.G. Rinnooy Kan, " Machine Sequencing Problems: Classification, Complexity and Computation", Nijhof, The Hague, 1976.

EJOR, vol. 76, pp. 1-14, 1994.

vol. 10, pp. 123-132, 1994.

pp.541-580, 1989.

I -883