• 沒有找到結果。

A Petri-net based hierarchical structure for dynamic scheduler of an FMS: rescheduling and deadlock avoidance

N/A
N/A
Protected

Academic year: 2021

Share "A Petri-net based hierarchical structure for dynamic scheduler of an FMS: rescheduling and deadlock avoidance"

Copied!
7
0
0

加載中.... (立即查看全文)

全文

(1)

A Petri-Net Based Hierarchical Structure

for

Dynamic Scheduler of an FMS

:

Rescheduling and Deadlock Avoidance

Y. L . Chen, T. H. Sun and

L . C.

Fu

Department of Computer Science and Information Engineering

National Taiwan University, Taipei, Taiwan,

R.O.C.

Abstract

Flexible manufacturing s y s t e m s ( F M S s ) have re- ceived considerable attention and evolve t o be one of

the fastest growing industrial field

in

the last decade. In these s y s t e m s , m u c h higher e f i c i e n c y of manufac- turing can be achieved (owning to their intrinsic flex- ibility) provided a good scheduling policy i s adopted. In this paper, w e propose a d y n a m i c scheduler w i t h a hierarchical structure t o cope with the unavoidable dis- turbing events

in

s u c h d y n a m i c s y s t e m s like a n F M S . In particular, we based o n our earlier work [6] handle the rescheduling problem as we as t h e deadlock avoid- ance problem. T h e m e r i t of this work i s i t s complete-

ness in considering all possible components

in

a n F M - S , including A G V transportation s y s t e m .

Abstract

Flexible manufacturing systems (FMSs) have re- ceived considerable attention and evolve t o be one of the fastest growing industrial field in the last decade. In these systems, much higher efficiency of manufac- turing can be achieved (owning t o their intrinsic flex- ibility) provided a good scheduling policy is adopted. In this paper, we propose a dynamic scheduler with a hierarchical structure to cope with t h e unavoidable disturbing events in such dynamic systems like an Fhl- S. In particular, we based on our ea.rlier work (61 han- dle the rescheduling problem a.s we as the deadlock avoidance problem. T h e merit of this work is its com- pleteness in considering all possible components in a n FMS, including AGV transportation system.

1

Introduction

An FMS may be viewed as a discrete event dynamic system, and its scheduling problem is known to one of the N P - h a r d combinatorial problems. For this reason,

it can be alternatively tackled by means of heuristic or approximate scheduling procedures, which are usually allowed in most of the ca.ses, t o determine optimal or nearly optimal solutions. On the other hand, real-time control operations of an FMS often involves decisions as how t o solve occasional problems due to addition of new parts, machine failure, set-up changes, main- tenance, etc., which may be viewed as rescheduling. Such a problem also belongs to the class of N P - h a r d

combinatorial problems. So, a good rescheduler is crit- ical to the performance of the system. Recently, there has been much interest in researches on rescheduling t h a t has been focused on how to improve the system performance.

T h e rescheduling problem is generally more diffi- cult t h a n the scheduling problem, because t h e former problem needs t o be accomplished in real-time and, hence, remains t o be a challenging problem. O n this regard, the work [3], proposes a prototype of an intel- ligent real-time rescheduler for a job-shop FMS which is actually a decision support system t o help the man- ager t o handle the disturbance based on a n expert system scheduling module and a hi h level Petri-Net simulator module. Another work [aksolves this prob- lem based on the simulated annealing to technique ob- tain a modified schedule by rescheduling. Others like [6] proposes a rule-based on-line scheduling system for a n FMS t h a t generates appropriate priority rules to s-

elect a transition t o be fired from a set of conflicting transitions. It should be noteworthy t h a t both [6] and

[7] include rescheduling in their scheduling method, in which 161 designs a real-time scheduling subsystem to select one randomly among t h e conflicting transi- tions whereas [7] uses timed place Petri-Net t o solve this problem. T h e work [8] proposes a production rule base in such way t h a t the dynamic scheduler can read different processing rules as candidates from the rule base and make real-time decisions accordingly.

In flexible manufacturing systems, many kinds of parts are processed by many kinds of machines and are transferred by automated-guided vehicles

(

A G V s ) .

T h e transferred one may go from a buffer t o a speci- fied machine, from a machine to a buffer, or between two different machines. In such a complex environ- ment, lack of proper control will cause the deadlock to occur. B u t the problem of a n FMS deadlock is ignored by most researchers who pay most attention to scheduling and control. So far, several efforts have been focused on this problem. In most of the cases, deadlock prevention and deadlock avoidance methods are used because those methods can make the FM- S utilization better. If we want to avoid a deadlock, then dea.dlock avoidance is a major issue. There have been some existing results on deadlock avoidance pro-

(2)

posed in t h e literature. For example, [4] uses PN- based models t o d o deadlock prevention by static re- source allocation policies, a n d deadlock avoidance by dynamic policies; [5] uses a deadlock avoidance tech- nique; [9] proposes a systematic method for designing locks a n d interlocks for deadlock avoidance by using t h e reachability graph of t h e Petri-Net model; [l] pro- poses a destination graph in order t o analyze the flow of workpieces in job-shop manufacturing system, a n d hance achieves t h e deadlock avoidance by eliminating the pre-deadlock condition.

Section 2 proposes a hierarchical structure consist- ing of four levels t o solve t h e dynamic scheduling prob- lem. Section 3 introduces t h e modeling technique used for t h e system simulator

.

Section 4 discussed the rescheduling problem a n d solves it mainly using the

A* search technique. In section 5, problem with dead- lock is introduced a n d is solution algorithm is suggest. Finally, conclusion is made in section 6.

2

Hierarchical Structure for a

Dynam-

ic Scheduler

Schedules for medium and long term operations of

a production system must be generated a priori. Un- fortunately, the future states of the system cannot be known at t h e time schedules are generated. Many un- predicted disturbances will arise during production, b u t they were not accounted for in the original sched- ule. T h e typical solution to this problem is t o apply standard scheduling methods to reschedule the sys- t e m on occurrence of such a disruption. Nevertheless, a n d optimal policy is t o perform dynamic scheduling which includes some sort of discrete control of produc- tion systems t o handle t h e above-mentioned disturb- ing events flexibly a n d effectively. B u t , except the small sized systems, t h e problem for general systems is rally a n NP-hard problem. In order t o reduce its d- ifficulty a s well as the complexity as much as possible, hierarchical control methods should be employed.

Generally speaking, a scheduling system may work either on-line or off-line. An off-line scheduling sys- t e m is relatively easier t o design b u t is more difficult t o perform rescheduling, whereas a n on-line schedul- ing system is difficult relatively more to design but is easier t o d o rescheduling. So, how to balance the trade-offs between those two is critical. T o this aim, we propose a hierarchical structure consisting of sever- al levels, such as scheduler, process runner, controller

a n d physical system. Now, we define t h e function of each level and t h e relations among them.

Scheduler: Scheduler level generates a sequence of actions for achieving a given goal for each task, i.e., generates a complete plan for a given task before any of its operations begins. T h e speci- fication of t h e operation sequence concerning a

j o b (task) includes information about operation type and operation time. Usually, we can have two classes of different schedulers. One class is t o consider transporting time, whereas the oth- er does not. But roughly speaking, t h e scheduler level can be viewed a s a coarse schedule gener- ator which mainly generates the order of opera-

tions concerning the j o b a n d seldom considers the transporting time. To s u m up, t h e main function of this level consists of

1 ) getting jobs information a n d the layout of the system, a n d

2 ) generating a coarse schedule for t h e whole jobs.

T h e level called process runner modifies the existing production (process) plan according t o the run-time situations when neces- sary, i.e., d o rescheduling when one of t h e follow- ing situations occur: a physical machine breaks down, a n urgent task or a new part is added in, unacceptable time delay in execution is observed, or a deadlock is perceived, etc. T h e function of the process runner is only t o modify t h e original- ly planned order of operations under abnormal conditions but with the minimum change. For this, an objective function in order t o decide the priority of conflict tasks has t o be defined. In this level, a simulator a n d a deadlock detection mechanism are also included. T h e simulator can evaluate various scheduling rules while analyzing the effects due t o these different rules on sever- al performance measures possibly under different conditions by using simulation. Therefore, the process runner can be viewed a s a detailed sched- ule generator which generates t h e detailed order ofjobs operation, which certainly includes the ve- hicle routing schedule.

In the absence of abnormal condition

,

the simu- lation should provide a "better" way of t h e coarse schedule received from the scheduler, which is readily implementable by t h e physical system. However, if a deadlock is detected by t h e deadlock detection mechanism or if some abnormal condi- tion described earlier suddenly takes place, the process runner is supposed t o perform reschedul- ing t o avoid deadlock or t o appropriately respond t o t h a t abnormal condition. To s u m up, the func- tion of this level includes

1 ) generating a detailed schedule for t h e whole jobs, including t h e AGV routing schedule;

2 ) recovering from unpredictable disturbing events in the system;

3 ) modifying the schedule generated by the scheduler for t h e reasons described above;

4 ) simulating the system behavior under differ-

ent scheduling rules t o find a "better" refined schedule;

5 ) detecting t h e potential deadlock situation; 6 ) activating t h e global rescheduler when neces-

sary.

Controller: This level is the interface between the logical system a n d t h e physical system, which di- rectly controls t h e whole system t o execute com- mands generated by higher level, i.e., it runs the

(3)

--c

Figure 1: Architecture of a hierarchical dynamic scheduler

physical operations interpreted from the hierar- chical dynamic scheduler commands. So, con- troller executes tasks on the physical hardware based on the time table decided from the high- er levels. T o s u m up, the function of this level includes

1 ) driving the machine t o perform operations;

2 ) controlling the physical operations onto real world system;

3) feedbacking physical s t a t u s information to the upper levels.

T h e real world system layout. It contains physical machines, resources, AGV's, Automatic Storage/Retrieval System (AS/RS), etc.

Besides these, there is a global rescheduler which functions only when the process runner can not solve the problem. When this occurs, the process runner trigger the global rescheduler t o feedback initial sta- tus, i.e., the s t a t u s t o which the current status can be reset, for rescheduling process t o scheduler in order t o regenerate a new coarse schedule. Finally, the archi- tecture of t h e whole hierarchical dynamic scheduling system is shown in Fig. 1.

3

Petri-Net Based Modeling

In the level with process runner a s has been de- scribed previously, detail system modeling is crucial t o the success of the functioning of t h a t level. Since the dynamics of a n FMS are often very complex and, hence, how t o model a n FMS is a n extremely com- plicated problem. There exist many ways t o model a n FMS, like colored Petri-Net, Markov chain pro- cesses, queuing networks, etc. Furthermore, there are

Physical S y s t e m :

many system properties in an FMS, such as resource sharing, concurrency, routing flexibility, unexpected changes, a n d deadlock, etc. It is well-known t h a t Petri- Net is a powerful tool for describing and analyzing asynchronous and concurrent system behavior main- ly because it can represent the precedence relations of asynchronous and concurrent systems. Therefore, Petri-Net model is very suitable for modeling and an- alyzing such dynamic processes.

Petri-Net is also a graphical representation t o un- derstand the system. Traditionally, Petri-Net is often used a s models of automated manufacturing system- s t o represent the controlled system operation. This model is, then, used for analysis of t h e system prop- erties or simply for simulation. In light of this, here we use Petri-Net t o model flexible manufacturing sys- tems. Generally, Petri-Net does not include time and precedence relationships in the model, but time, how- ever, is a crucial consideration in our problem. Hence, we need t o include time in our model, called timed place Petri-Net, t o model our system. Timed place Petri-Net model associates time with places, which represent t h e periods of time during which the token- s have t o stay in the places before they can become available again. Petri-Net based simulation model for a general FMS with multiple task flows and trans- portation control. Due t o shortage of space, the mod- eling well not be presented here, but the very tech- nique will be adopted in this paper. In our earlier work [lo], we have proposed a detailed.

4

Rescheduling

Most of rescheduling methods solve the reschedul- ing problem by using the original scheduling methods t o reschedule the system. But our goal is t o reschedule the original schedule by different policy and still retain the schedule efficiency. So, rescheduling is in general a more difficult problem than scheduling problem be- cause the time allowed t o be spent is quite limited, i.e., a decision must be made by the rescheduling sys- tem based on the some optimization criterion defined therein itself immediately.

Many criteria have been proposed for reschedul- ing (e.g. makespan, mean flow time, lateness, etc.

).

We select t h e makespan here as our criterion, where makespan is defined as the maximum j o b completion time. To be realistic, we assume j o b preemption is not allowed. So, the present objective is t o find a schedule which gives a sequential order of performing the jobs so t h a t the makespan is minimized. Once the Petri- Net model is constructed, a feasible schedule for these jobs can be obtained by simulating the Petri-Net and searching through the reachability graph. Simply be- cause the search is based on t h e Petri-Net model, the search space is can be constrained only the feasible schedules.

In this paper, the rescheduling is done by the pro- cess runner. T h e purpose of process runner is t o relax the existing schedule generated by the scheduler t o a linearly ordered sequence without time consideration, This can drastically reduce the complexity of the orig- inal scheduler. At the same time, t h e process runner can be viewed as a n on-line scheduler.

(4)

4.1

Timing

for

Rescheduling

Generally speaking, the time t o d o rescheduling is when a disturbing event occurs. All the operations in the schedule which have not been completed yet a t t h a t time must be rescheduled. Because we as- sume t h a t jobs are non-preemptive, when the s t a r t time of some operation is before the time t o perfor- m rescheduling and t h a t particular operation is not yet completed, we will still retain the time schedule for t h a t particular operation in rescheduling process. T h e appropriate occasions for doing rescheduling are listed below:

1 ) a physical machine breaks down;

2 ) a n urgent task is added into the system;

3 ) a new part is added into the system; 4 ) time lag in execution of the original schedule;

5 ) a deadlock occurs.

In consequence, we can regard the rescheduler a s a real-time scheduler which is going t o be processed ev- ery time immediately after the disturbing event occurs in the system. For example, when a machine breaks down, t h e controller senses t h a t event and then place a token t o the place, which is interpreted a s disappear- ance or identification, or both of t h a t machine. Or, when a sensor which is controlled by the controller has not sensed the arrival of some AGV a t some des- tination yet along the route determined by scheduler due t o possible time delay. All these occasions will ask the rescheduler t o perform rescheduling.

4:2

Rescheduling Algorithm

In the following, we propose a method t o d o rescheduling. First we assume each j o b consists of a set of operations t o be performed by various machines. Below we introduce some assumptions and notations in order t o treat the problem.

We assume t h a t the j o b shop has N jobs in total and M machines, and

J , :

M, :

the i t h job, 1

5

a

5

N

the j t h machine, 1

5

j

5

M

,

where Ji = (Oi 1 , 0 , , 2 , . . is the order of opera- tions of t h e i t h job, i.e., the operations are performed in the increasing order of the index n. Sometimes an operation may require a shared resource such as an AGV t o transfer the part t o its next destination ma- chine t o process.

After the Petri-Net model of the problem is con- structed, we use a search algorithm t o find a solution described below. Before t h a t ,we first introduce some notations. Let the function c ( M , , M j ) be the actual cost of a minimum-cost p a t h from the marking M i t o the marking M,. Then, the cost of a minimum-cost path from the marking M t o some goal marking

M g

is given as c ( M , A!,). Then, we define h ' ( M ) as follows:

h ' ( M ) = m i n { c ( M , A{,)

I

A/i, is a goal marking

}

so t h a t any path from marking M t o the goal marking

M, t h a t achieves h ' ( M ) is a n optimal path. Another function

g ' ( M )

is defined as follows:

g * ( M )

= c(M0, M ) , for any marking M reachable from

M O .

Now we define the function

f'

a s follows:

f * ( M )

= g ' ( M )

+

h ' ( M )

T h e value of f ' ( M ) a t marking M indicates the actual cost of a n optimal p a t h from M O t o

M

plus the cost of a n optimal path from M t o a goal marking M,.

So, we let the function f be an estimate o f f ' . Then,

f(A4)

is defined as follows:

f ( M ) = d M )

+

h ( M ) I

where g is a n estimate of g' and h is an estimate of

h'.

From t h e above, this algorithm has three functions f , g, and h, which hence constitute the evaluation function for search. These three functions are defined a s follows:

f ( M ) : is a n estimate of the minimum cost, i.e., the cost from the initial marking

M O

t o the goal mark- ing M , along a n optimal path which goes through the marking M.

g ( M ) : is the cost observed so far from the initial marking

MO

t o the current marking M . h ( M ) : is a n estimate of the cost from the marking M

t o the goal marking along a n optimal path which goes through t h e marking A l .

T h e search method which we used t o solve the rescheduling problem is the A' search method. T h e

A' search algorithm is a minimum-cost graph search algorithm. It can be regarded as a branch-and-bound search algorithm which uses the dynamic program- ming principle with a cost estimate from the current state t o the goal state. It can be guaranteed t o find a minimum cost solution path if the heuristic function

h ( M from the current marking to the goal marking describe the basic method of our algorithm as follows: S t a t e D e s c r i p t i o n : State is used t o represent the

I n i t i a l S t a t e : T h e initial state is given as M O =

is a

i

ower bound of h ' ( M ) . Now, we are ready t o

marking of the Petri-Net.

( t l , t z , . .

. , t p ) ,

where:

MO : initial marking

t k p

: t h e token number a t the place

Pk

: t h e number of places

G o a l State: T h e goal state is reached when all jobs are completed.

O p e r a t o r : Each marking is one node of the

A'

search algorithm. T h e node expansion in the A* search algorithm a t every step is according t o the evalu- ation function defined below.

(5)

Obviously, the evaluation function will be defined as the objective function. Since our goal is t o mini- mize the makespan for the whole jobs (i.e., the time required t o finish all the jobs), the evaluate function here is chosen t o be:

f ( AI) = max{ C1

,

Cz

,

.

.

.

,

C,}

= {

makespan of A I }

where the notation

ck

above is the completion time of t h e job IC. In order t o use t h e A' search algorithm t o find a n optimal and feasible solution, it needs t o be modified slightly t o include the detection deadlock mechanism is as follows:

A' search include Deadlock-detection

algorithm:

INPUT: An optimal routing assignment S obtained

from the scheduler.

OUTPUT: An optimal deadlock-free routing assign-

ment with minimum cost routing.

Step f . P u t the initial marking AT0 on the list O P E N

and calculate its cost function value. Then, ini- tialize the upper bound on the makespan to be

M A X I N T .

Step 2. If O P E N is empty, terminate with failure.

Step 3. Select a marking from the O P E N list with the minimum cost

(

i.e., the first marking of the list).

a. Remove t h e marking hl from the O P E N list and put M on the list C L O S E D . Let the current marking

Me

= 116.

If several mark- ings have the same cost value, choose a goal marking if it exists; otherwise, choose among t h e m arbitrarily.

b. Here, we must check if the marking is deadlock-free by the Deadlock - detection

algorithm t o ensure solution feasibility. If t h e marking is deadlock-free, then accept it; otherwise, abort it and repeat Step 3 t o se-

lect the next again.

Step

4.

If M is the goal marking, construct the op- timal path from t h e initial marking to the fi- nal marking and terminate with success. And, the optimal deadlock-free routing assignment has been found; otherwise, continue.

Step 5. Find all the enabled transitions from the cur- rent marking M,.

Step 6. Generate the next marking, or successor, for each enabled transition, and set pointers from the next markings t o

As.

Step 7. For every successor M, of M , do the following:

a. If M , is already on either O P E N or

C L O S E D list, direct its pointer along the path yielding the smallest g ( M , ) .

If M , is on C L O S E D and requires pointer redirection, put

M,

on O P E N list.

b . If M , is neither on O P E N list nor on

C L O S E D list, calculate

h ( M , )

a n d f ( M , ) ,

a n d put

M,

on O P E N .

Step 6'. Reorder O P E N by t h e increasing magnitude o f f of the markings.

Step 9. G o t o Step 2.

Because of t h e heuristic rules and constraints, we can substantially reduce the solution space of the problem. It can make the searching process much simpler. Finally, we then apply the A' search t o the Petri-Net based hierarchical dynamic scheduler t o find a n optimal solution t o complete all requirements and operations.

5

Deadlock Avoidance

and

Deadlock

Recovery

System deadlock is a serious problem in a flexible manufacturing system, which is a situation where a set of jobs are waiting indefinitely for one another t o release certain resources. In other words, each j o b in the set is waiting for a resource being held by another job in the set while holding a resource needed by some other jobs in the set. Consequently, t h e set of jobs are in circular waiting. In a n improperly designed FMS, deadlocks may b e resolved by clearing of buffers or machines, and by restarting the system from a n initial condition known t o produce deadlock-free operation under nominal production conditions.

T h e deadlock problems can be classified into dead- lock prevention, detection, recovery and avoidance. Here, for our interest, we only deal with the dead- lock avoidance problem, which is t o test a request t o see if it will cause deadlock. Deadlock avoidance is an important issue for effective control of a n FMS. To

avoid deadlocks a n d to allow design flexibility a t t h e same time, we try t o disable the events t h a t may lead t o deadlock a t certain states. So, deadlock avoidance is a n a t t e m p t t o falsify one or more of the necessary conditions in a dynamic way by keeping track of the current state a n d t h e possible future conditions (i.e., disable some conditions when a deadlock becomes a possibility in t h e immediate future).

Now, we are prepared t o discuss how t o solve a scheduling conflict problem, and propose a method t o find deadlocks should they have happened.

5 . 1

Reasoning

for

Deadlock

When a deadlock occurs, the following four con- ditions must be satisfied a t the same time (i.e. the necessary conditions for a deadlock t o occur): Mutu- al exclusion, Hold and wa.it, No preemption, Circular wait [Ill.

From the conditions described above, we know when requesting a resource, one of the following situ- ations may have happened:

(1) requested without success: For example, a job requests a machine which is busy now and hence the request is unsuccessful.

(6)

(2) requested with success: For example, a j o b re- quests a machine which is idle now and hence the request is successful.

( 3 ) release of a resource: For example, a j o b releases a machine which has completed its assigned op- eration for the job.

In t h e first two situations, we must check if a deadlock cycle exists because those two situations constraint the system tightly. Situation 3 will not foresse deadlocks because it releases a resource.

5 . 2

Deadlock Avoidance

Algorithm

We propose a method to d o deadlock detection a s follows. We use t h e matrix multiplication and Wait-

f o r graph t o find deadlock situations. From above, we

know when a deadlock happens, there must exist a t least one cycle in t h e Wazt-for graph. One thing we must note is t h a t t h e cycle is a necessary, b u t not a suf- ficient condition for running into a deadlock. There- fore, when no cycle exists in the Wait-for graph, the system is in a safe state. But t h e system is potentially unsafe if there is a cycle in t h e Wait-for graph. T h e

Wait-for graph is adapted from Resource-Allocation

graph.

Formal description of the Wait-for raph is giv- en below. We define a directed graph $i.e. digraph)

G = (VI

E )

consisting of a node set V a n d a n edge set

E where V = { 1 , 2 , . .

.,

[VI} a n d u , v E V , ( u , v ) E E

is a n edge from U t o v. In such a graph, nodes cor- respond t o the resources being held or requested, and arcs correspond t o the wait relations between the re- sources. O u r goal is t o find if any cycle exists in such a graph. A cycle is a path from U t o v , where U = v ,

a n d the length of the p a t h is not equal to zero. A path from U t o v is a sequence of nodes vo, 2 1 1 , .

. . ,

v k , such

t h a t vug = U a n d V k = v a n d each pair ( v , , v , + ~ ) E E ,

for 0

5

i

<

k ,

so t h a t the length of the path is equal t o IC.

First, we define t h e directed incident matrix in or- der t o represent t h e Wait-for graph as follows:

I

a l l a12

. . .

aln

I

A n =

ayl aTz ay,,

ayl a;2

...

a&,

aZl aZ2

...

a;,,

.

.

.

.

.

By the method proposed above, we can calculate the matrix A". Any element in matrix A" t h a t is not equal t o zero represents a p a t h with length being equal t o n. So, we can find all t h e circles in the Wait-for

graph.

Because the complexity order of the matrix multi- plication is O ( n ) . Therefore, in order t o reduce the cost of calculation complexity, we can make some im- provement in matrix multiplication method. This is because one cycle may appear in more t h a n one ma- trix element. So, t o avoid repeated calculation, we only need t o calculate it once. For example, 1231 and 2312 represent t h e same cycle, and we need not calcu- late it twice. For the new method, A: is generated as follows:

n

k = i + l

where

i,

j = 1 , .

. .

,

n.

Furthermore, we need not examine all non-zero el- ements. In fact; we only have t o examine t h e diagonal elements. Only a diagonal element is possible t o create

a cycle, because t h e s t a r t node of t h e first edge is the sa.me a s the end node of the last edge in a cycle. So, we only have t o find out t o the diagonal terms which are not equal t o zero a n d backtrack t o find t h e circuit p a t h , which is then a possible candidate for deadlock situations.

Up t o now, a simple algorithm t h a t will perform the function described above can be presented in fol- lowing, whenever one of following occasions occurs.

where 1) a new part is added into t h e system; 1

0 otherwise

when j o b i is holding one resource

while waiting for the resource held by job j

a,j =

then, we define:

An = An-'

*

A

2 ) a n urgent task is added into the system;

3 ) a part is requested by a new operation;

4 ) request of a resource can not be permitted;

Deadlock-detection Algorithm:

Step 1 . Find all t h e Wait relations between each pair of t h e jobs a n d crea.te t h e Wait-for gra.ph for the current state;

where

i,

j = 1,.

. . ,

n, so t h a t

(7)

Step 3. If (a cycle exists) then Call Resolve- d e ad lo c IC;

update the current s t a t u s of the system t o a else

new status;

D e t e c t - c y c l e A l g o r i t h m :

Step 1. Create t h e directed incident matrix which rep- resents the status of the wait relations in the

Wait-for graph;

Step 2. Calculate the matrix by the method proposed previously (matrix multiplication);

Step 3. Check if there is any non-zero element; If found, then the element is a situation which may potentially cause a deadlock;

To resolve a deadlock, we can select a victim from t h e cycle according t o some special priority and move it t o a reserved storage buffer. When some special conditions are satisfied, we can release it and let the operation continue. T h e algorithm is summarized as follows:

R e s o l v e - d e a d l o c k A l g o r i t h m :

Step 1 . Determine the set of jobs which potentially cause the deadlock cycle;

Step 2. Select a victim from the set of jobs by using priority rules, and move it t o a reserved storage buffer;

Whenever there is a deadlock tha.t can not be avoid- ed, then the productivity of the system will be affect- ed considerably or even the production of the whole system will be stopped. Consequently we must avoid the deadlock as much a s possible. But if we hope t o consider all the status t h a t deadlock may occur, it is impossible t o do so because in a real-world system too many unpredictable events may arise. When any of these events happen, it is very likely t o lead the sys- tem t o a deadlock status.

6

Conclusion

This paper proposed a Petri-Net based hierarchical structure for a dynamic scheduler of an FMS, con- sisting of several levels, including scheduler, process runner, controller and physical system modeled by a Petri-Net using bottom-up a.pproach. In particular, we discussed the problems of rescheduling and dead- lock avoidance. and applied the .4' search and matrix multiplication methods t o solve these problems. A

prototype of this scheduler is developed for our exper- imental F M S in National Taiwan University, but, their results are not included due t o the shortage of space.

References

[l] Koji Takahashi, "Fundamental Control t o Avoid Deadlock for Job-shop Manufacturing Systems",

JAPAN/USA Symposium on Flexible Automa- tion, V01.2, pp.1703-1706, ASME 1992.

[2] Yasunori Watatani, and Susumu Fujii, "A Study On Rescheduling Policy In Production System",

J A P A N / U S A Symposium on Flezible Automa- tion, V01.2, pp.1147-1150, ASME 1992.

[3] Zhiming Wu, "Combining of Expert Sys- t e m and Simulator for F M S Rescheduling",

JAPAN/USA Symposium on Flexible Automa- tion, V01.2, pp.1143-1146, ASME 1992.

[4] N. Viswanadham, Y. Narahari, and

T. L.

John- son, "Deadlock Prevention a n d Deadlock Avoid- ance in Flexible Manufacturing System Using Petri Net Models", IEEE Trans. Robotics and Automat, vo1.6, No.6, pp.713-723, Dec. 1990.

[5] Perenc Belik, "An Efficient Deadlock Avoidance Technique", IEEE Trans. on Computers, vo1.39, No.7, July 1990.

[6] Itsuo Hatono, Keiichi Yamagata and Hiroyuk-

1 Taniura, "Modeling and On-Line Scheduling of

Flexible Manufacturing Systems Using Stochastic Petri Nets", IEEE Trans. on Software Engineer- ing, Vo1.17, No.2, pp.126-132, February 1991. [7] Doo Yong Lee and Frank DiCesare, "Experi-

mental Study of A Heuristic Function for FMS Scheduling", J A P A N / U S A Symposium on Flex- ible Automation, V01.2, pp.1171-1177, ASME 1992.

(81 Paul G. Ranky, "Intelligent Planning and Dy- namic Scheduling of Flexible Manufacturing Cells and Systems", JAPAN/USA Symposium on Flex- ible Automation, Vol.1, pp.415-422, ASME 1992. [9]

N.

Viswanadham,

T.L.

Johnson, and Y . Nara- hari, "Performance Analysis of Automated Man- ufacturing Systems with Blocking and Deadlock",

Proceedings of The Second International Con- ference on Computer Integrated Manufacturing,

pp.64-68. May 1990.

[lo] Chin-Jung Tai,and Li-Chen Fu, " A Simula- tion Modeling for a Flexible Manufacturing System with Multiple Task-Flows and Trans- portation Control Using Modular Petri-Net Ap- proach", Proc. 9th International Conference on CAD/CAM

,

Robotics & Factories of the Future, August, 1993.

1111 Andrew S. Tanengaum, Modern Operating Sys- tem, Prentice-Hall, 1992.

數據

Figure  1:  Architecture  of  a  hierarchical  dynamic  scheduler

參考文獻

相關文件

* All rights reserved, Tei-Wei Kuo, National Taiwan University, 2005..

The remaining positions contain //the rest of the original array elements //the rest of the original array elements.

To enhance availability of composite services, we propose a discovery-based service com- position framework to better integrate component services in both static and dynamic

• Summarize the methods used to reduce moral hazard in debt contracts.2. Basic Facts about Financial Structure Throughout

The objective of the present paper is to develop a simulation model that effectively predicts the dynamic behaviors of a wind hydrogen system that comprises subsystems

In this thesis, we have proposed a new and simple feedforward sampling time offset (STO) estimation scheme for an OFDM-based IEEE 802.11a WLAN that uses an interpolator to recover

Therefore, a study of the material (EPI) re-issued MO model for an insufficient output of the LED chip manufacturing plant is proposed in this paper.. Three material

A decision scheme based on OWA operator for an evaluation programme: an approximate reasoning approach. A decision scheme based on OWA operator for an evaluation programme: