C()p\T;~ht
©
Automaled
IF .\C Ilee;s;oll,,1 Structures ;11
;\lallllfaClllring. (~t:.'1l()\,;1. Italy. l~IH~)
SAGASSE-AN EXPERT SYSTEM BASED SIMULATOR FOR FLEXIBLE MANUFACTURING SYSTEMS B. Besombes* and P. Ladet** *E[OII' des Mines de St. Etimne, Dept. Strategie du Develappemfllt, 158 Cours Fauriel, 42023 St. Etienne, France **Ecole [ngenil'urs Electriciens, Laborataire d'Automatique de Grenoble, B.? -16, 38-102 Saillt Martin d'Hhes, France
Abstract, Classical production control softwares do not provide a good control of lead times of products and very of en , cause overloaded inventory or bad utilisation rate of machines, This is due to the fact that they ignore real state of the workshop; as waiting time before each work center, breakdowns, etc, .. On the other hand, classical simulation tools do not represent, in their model, a decision level linked to scheduling of the products, This paper proposes a design cum operational aid which integrates the operational aspects of factory including management aspects which imply routing and scheduling activities. The simulator proposed is based on the dynamic interaction between an interpretor of Timed Coloured Petri Net model for the state of workshop, and the decision level implemented by an expert system. The presence of a routing or a scheduling choice is traduced by the interpretor as a conflict in the TPCN model. The expert system solve the conflict, using a set of rules built by human experts, SAGASSE represents a new way of introducing the artificial intelligence techniques to the solving of real time scheduling problem. An illustrative example explains in details the behaviour of the analysis to resolve conflicts with SAGASSE and allows us to compare its results with classicals production control tools. Keywords . Simulation, Timed Coloured Petri Net, Scheduling, Expert System, Rule Based Systems, Flexible Manufacturing Systems.
INTRODUCTION
constraints
<._----------
In face of growing industrial cOllpetition, cOllputer aided analysis of Flexible Manufacturing Sys tells ( FMS ) is getting to be increasingly necess~ry. This analysis requires increasingly cOllplex tools, consider'ing the various paralleters involved e.g flexibility, productivity, cost, means and material required etc ...
Management Level
<~xpected
<-operated mesures
demand
policies & . strategIes
manage ment cri terion s r e <_ operating sequences p Scheduling Level '0 Decision _ availability
It also necessitates closer interactions between different levels of decision making, nallely; -" Management level .. which makes long ~nd lIediuII term planning and scheduling to respond to operating strategies, marketing policies, expected demand, manpower and technological trends. Scheduling and real time decision level which allocates the resources (men, machines and raw lIaterials) to satisfy the various work orders within the bounds of sclleduling and operational policies of the factory. The output of this level of decision I18king consists primarily of batch sizes, expected start and finish deadlines etc •.. Control level .. which implies resolution of problells associated with parallelisll and synchronisation problems specific to sequential control. Our study concerns the two lower levels of this hierarchy shown in Fig. 1.
'r t
v
of means state
Control Level
work ord er operating choice
d
":, e :c :i
:s ,i
o
n
<~ynchronisation
Fig. 1. Different levels of decision making Several tools are employed in the industry for each of these problells, treated indi v idually. Heuristics based methods for production lIanagement, resolve very well the cOllbinatorial problells associated with production planning. Sillulation tools based on queuing lIodels (e.g SLAM, SIMAN) or Petri nets, give the user the possibility of visualising the dynaJIic evolution
_H
:-\1
32
B. Besombes and P. Ladet
of the process for a given schedule at the workshop entry. These tools have been used independant of one another. It is usual to si.ulate the behaviour of the factory for various scenarios, taken one by one, before applying the strategy on the shop floor. This approach has the obvious disadvantage that it offers little interaction between the two decision levels concerned. Unanticipated events like breakdowns or out of turn orders cannot be easily taken into account and cannot aodi fy the work plan co.puted earl ier. Our study proposes a design CUll operational aid which integrates the operational aspects of the factory including manageaent aspects which i.ply routing and scheduling activities. We can thus react contilluously to two types of contingencies on the shop floor. In the first case, we consider changes in the status of the resources e.g breakdown,
saturation,
preventive
maintenance
etc... In the second case, we consider .odifications to the work plan arising due to an out of turn job, and thus necessitatinlt a cOllplete revision of the production plan.
SAGASSE The siaulator proposed, nailed SAGASSE, uti lises level, interaction between the control the represented by a Petri net .odel, and the decision level which involves operation and scheduling of the factory.
Control Level We have used a Timed, Coloured Petri Net (TCPN) based interpretor issued of work of Jensen (1980), Alia (1987), Martin (1987) for lIodelling the control level of a flexible workshop . We describe the essential basis, terlls and assu.ptions about the use of Coloured Petri Nets for .odelling discrete event systems, without going too deep into details: - Events are represented by transitions. The set of events which are involved in the evolution of the syste. is described by a set of transitions. - Pre-requisites for an activity to take place, are denoted by places of the Petri net .ode!. When a place is larked, the resource (raw lIIaterial, part, aachine, buffer, stock, transport arrange.ent ... ) associated with this token is available for the corresponding activity. Tokens of the Petri net lIIodel represent resources. A "Darking", represented by the set of n-tuples (token-place), denotes the state of the system at any given time. Each token carries, in addition, a c-tuple attribute called "colour", which permits an unambi~uous identification of the resource or object represented by the token. Functions associated with each arc of the Petri net .odel, define the rules of transfor.ation of the token colours. These transforDations correspond to the change of state of the concerned resource. - A delay is associated with each place. This .ay correspond to the time required for a certain
operation or .ore generally to the non availability of the resource. The firing of transitions and the consequent displace.ent of the tokens towards downstrea. places is related to the occurence of events in the syste.. This displace.ent, along with the corresponding change of colour of the tokens, represents the systell evolution. A Petri net model thus helps describing a discrete event system. I t is not only a graphic description tool, but is also consistent wit~ control technics such as GRAFCET. A formal validation of the model is possible, using the technique of invariant analysis, which gives a quanti tati ve assessment of the resources employed. Operational constraints show up as parsllelis. or synchronisation problems. For instance, several activities can be sillultaneous possible, but for a given activity to start, all necessary resources should be available, which is the way .anufacturing systells generally work. The .ain advantage of the Petri net lIethods is that it can lIodel non deterllinistic situations also. Certain states of the physical system give rise to conflicts at the lIodelling stage, which are the transposition of undefined conditions existing in the systell. Two such classes of conflicts are studied in this paper: - The decision .echanisll of a aachine vis a vis its inlet buffer is not clearly defined: picking up a part from an unordered buffer of parts necessitates arbitrary decision making (see Fig.2). This is translated as a colour based conflict in the correspondinlt model several coloured tokens (different parts) enable the S&4e transition (load a part on the lIachine).
CD?
'T----'
fo r 1 producing 2
3
unordered buffer occupied by <1> <3> <4>
load
4 machine occupied
achine free
unload machine
Fig. 2. Example of a colour conflict in TePN. We call . . . ulti-gamme ", the operation sequence of a product which can be IIIlde indifferently on more than one uchine. In case of multi-gamme, the routing decision problem appears in terms of colour based conflict. - When the conveyor lechanisD reaches a point of bifurcation, s conflicting situation may occur. For instance, when the branching occurs between the outlet buffer of a machine and the conveyor lecanis. itself, the decision problem involves the choice of right of way (see Fig. 3). This is depicted by a transition based confl ict in the
33
SAGASSE-An Expert System Based Simulator corresponding model : several transit ions (unload buffer and conveyor) compete for the same non sharable resource (bifurcation or intersection point) . Similarly, decision and routing problells are encountered in choosing a machine or a change of direction.
outlet buffer section
intersection free
conveyor section occupied <2>
outlet buffer
outlet buffer machine
-->
2
?
i ntersectio n occupied
conveyor Fig . 3. Example o f a t rans ition conflict in Te PN.
implies exploiting the savoir-faire and experience of a human expert, combined with certain heuristics and algorithms which resolve the problem in a localised domain. By thus introducing techniques of artificial intelligence in product ion management systems, a new set of (Valette,1988; be constructed. tools can Paul,1987). SAGASSE exploits the coupling between a Petri net based interpretor (described above) and an expert system for the ove rall aanage"ent of the manufacturing system. Optimal scheduling is not aimed at; rather a continuous operation of the facto ry in real time is achieved by resolving decisional co nflicts locally as and wh en they are encountered. This resolution IIUst of co urse obey the overall production planning poli cies ex pressed in terms of deadlines, reduction of inventories, maximisation o f mac hine utilisation rate, etc ... The manageaent aspects of SAGASSE are thus co nferred to an e x ~ert system. A set of rules and metarules are empl oyed for accounting for the occurence of events, for a given state of the systea (see Fig . 4) .
1 In Petri net based simulators, the conventional approach to solve such conflicts, is to assign a priority (statically) either to the tokens or to the transitions (or to both).(Valette.1988; Gentina.1988; Duggan,1988). An alternative solution involves mode lling the fa cto ry in greater detail including rigid rules for decision making. Evidently, both these solutions result in loss of flexibility and increased model co mpl ex it y . By ove rlapping the attributes, involving the structure of the factory and the mann e r in whi ch it is ope rated , they degrade model homoge neity, as well as the c larity of the graph and the mode lling power of the simulator. Resolving conflicts implies c hoice of the options provided by the de c ision level, taking into account the act ual context of the factory. The decision level ..... y help to define the policy to be adopted in such abnormal situation e.g scheduling rules to be used in case of conflict or priorities to be respected in case of a breakdown, or an order to be executed out of turn. If context dependent policy decisions have to be taken. they should not be left to the lodel itself or to the sillulator. The interpretor highlights the presence of a problem but does not resolve the same; it can at best alert either an expert or a production manager who will make the choice.
Decision Level Two approaches are possible for shop floor scheduling and management problems . The first one is based on strict 1I&thellatical tools such as operational research algorithms and heuristic techniques.(Proth.1987). Combinatory explosion and cOllputational complexity uke this approach impractical in IIOst cao;es. The other approach
c h 0
c e
I
9 9 R1 ... R11
2 Rules Expert R2 ... R21 and Metarules
It X
x
o
IWorkshop
~--------------------~
Evt1
Evt2
token conflict transition conflict breakdown predefined state
state at time T
Fig . 4. Coupling between Expert System and Interpretor of TCPN. Amongst the various possible alternatives offered by these rules and heuristics. a particular schedule is chosen depending on the context of the factory (buffer status. stage of production. machine states etc ... ). The expert systell rules contain information about non formalised, but technical aspects of the factory (utilisation rate. average waiting time. tille for tool replacement . conveyor systems status. operator availab i lity. etc .. . ) , as well as socio-economic indicators like personnel management policies. inventory. hidden costs. etc ... This set of data. introduced by the expert operator or calculated by the expert system is called the facts base of the expert system. The hUllan expert uses his experience to decide the range and conte xts over which a given rule is valid. The present study classifies rules into various classes rul e s concerning routing and operat ion. real tille scheduling rules. local
34
B. Besombes and P. Ladet
control rules, rules concerning incidents and delays. For each event (Evt x), identified by the interpretor, we associate a set of rules (Ri) classified by the expert system into metarules (Mi), according to their relevance in the particular context and with reference to management objectives. This set of rules and metarules is termed as the rules base of the expert system. We real ised the strengths of the expert system approach vis a vis the procedural approach, while constructing the rule base. The expert system knowledge base is the collection of rules base and facts base. The inference engine,
S N pallets
Fig. 5. Scheme of the workshop
in our case, answers Ques t ions
like; which machine, direction, etc ...
which
product,
which
PI P2
For this project, we used the expert system generator NEXPERT, developed by NEURON DATA on a microcomputer Compaq 386. A relatively flexible development environlllent was necessary for imple.enting the various transfers between the input-output systems (graphics, data base, etc ... ) and the computational components (tables, external procedures, interpretor, knowledge base, inference engine). This package uses a first order inference engine and an object oriented language. It thus helped us i.ple.ent a representation of the intuitive knowledge of the human expert. The .echanism of objects and classes gives the possibility of inheriting properties, and ensures automatic updating of a large number of properties.
EXAMPLE The case of multi-gamme previously evoked is also addressed by SAGASSE, we generated a set of rules and metarules which covers this particular case. We illustrated this part of the study wi th an example which enables us to point out the advantages, and also the li.its of such a syste •.
The Workshop Let us consider a workshop consisting of three machines MI, M2, M3 for a range of five products PI, P2, P3, P4, PS, (see Fig. S) , each one corresponding to distinct operation sequences or gamlles. The products are introduced into the workshop by batches of pallets identified by the number of the pallet in the batch and the number of parts. All the products of one pallet are supposed to be at the salle operating state in the range. Each gamme is defined by the succession of operations it is made of, by the machine or machines which make it, as well as by corresponding operating times (see Fig. 6). The set of batches to be made are initially put in a buffer 5 of pallet capacity N, which is also used as an intermediary buffer for the pallets bein~ produced. The transferring tille of the machine to the wait buffer is supposed to be constant whatever the pallet and the IIBchine. When the pallet finishes the last operation of its gume, it is taken out in an exit buffer SS, which is not dimensionned.
P3 P4 P5
OPl MI 10 M2 30 M3 13 MI 32 M2 18 MI 10 M2 30 M2 10
OP2 M2 15
OP3 M3 8
M2 22
MI 16
M3 7 M2 15 M2 20
Ml 15
M3 15
M3 18 MI IS M2 25
OP4 M2 20 M3 30
OP5
MI 10 M2 15 M2 8
M3 10
Fig. 6. Ga.llle of products The aspect we are interested in, is the control of the production plan execution. For achieving this, we shall try to work out a policy of buffer control considering on the one hand the workshop state and on the other hand the criteria of buffer control in terms of; - respecting the delays defined by the latest due date Ti of the last pallet of i product, - respecting economic constraints linked to the utilisation rate of the machines, - respecting the financial constraints linked to the storage costs. This control policy implies a dynamic interaction in the optimal choice of a product on the waiting buffer or on the choice of a machine alllongst the available ones for the achievement of an operation of the selected product. The possibility of adapting dynamically this control rule in the simulation process depending on the workshop state, enables us to take into account a breakdown or an urgent order in the buffer S which was not initially planned in the production planning. Such production hazards can thus be siaulated on the workshop, and several order strategies through several distinct rules for solving conflicts can be tested in order to better the knowledge of expert.
Timed Coloured workshop -places.
SO SF MO MF OP
Petri
Net
modelling
of
the
occupied position of wait buffer 5 free position of wait buffer machine k occupied k= (1,2,3) machine k free list oC the Tij tasks to be achieved by each oC the Mk machines SS exit bufCer -colors. Cijkl coloured token oC the net with; i index oC type of product
SAGASSE-An Expert System Based Simulator index of advanceaent in the (operation sequence) k index oC aachine nuaber index of pallet nuaber
j
gaaae
-transitions Tl loading oC a pallet 1 with product i for operation j of its gaaae on aachine k. T2 unloading of a pallet 1 with product i for operation j on the aachine k to the wait buCfer. iC j is the last operation of the gaaae. T3 unloading oC a pallet 1 with product i terainating the last operation j of its ga ... e on the lIachine k to the wait buCfer. -initial marking. At the first stage of the sillulation. the wait buffer S is loaded by N pallets oC various products at differents stages in the gamae. and all the lIachines are available. -temporisations . tetal tilling oC the SO place represents the transfer tille froll th .. machines to the wait buffer. teta2( ijkl) tilling of the MO place represents the time needed for the j operation oC the I pallet with product i on machine k.
aodels where only the presentation oC the conflict varies to make the figure lIore or less clear. Therefore. our study here aeans solving the colours conflicts on the Tl transition. The Cour colour index which stress this transition bring about four possible cOllbination levels Cor one colour conflict. i.e sixteen types of conflicts. In Cact, the analysis oC these various types of conClicts shows that only five of thell correspond to real conflicts. These physical conflicts give lIoreover a cOOlplet .. d.. finition oC the problems linked to the schedul in" in the case oC OIultigallae. - MACHINE conClict; case of a pallet with product i at the operation j of its "amlle, which can be put on several Qachines. - PALLET conflict; case of several pallets with product i at the sa.. e advancing state j of its ga"lIe. applying for a same machine k. - PALLET G~~E conflict; case of several pallets with product i. each at a distinct advancing state oC their gam.e. applying Cor a .. achine k. PRODUCT PALLET confl ict; case of several pallets with various products at the sa.. e advancing state j of their ga.... e. applying for a salle mach i ne k. - PRODUCT PALLET GAMME conflict; case of several pallets with various products. each at a distinct advancing state of their ga .. lle. applying Cor a saae lIachine k. Decision Level Three ele .. entary stages help solving the conflict using three types of expertises which bring about the various degrees of knowledge.
Fig. 7. TCPN model of the workshop The figure points out the two sorts of conflicts described previously. a colour conflict on the loading lachine transition for the choice of the machine when the task is defined, or for the choice of the product when the non-sharable resource is the lachine. - a transition conflict when an occupied lachine is getting vacant and when a pallet is taken out either to the exit buffer SS. if the operation concerned is the last one of the gallme, or to the wait buffer S in the other cases. In our case, the transition conflict shown in the figure is solved by the workshop specification thelselves. One pallet cannot have two advancing Btages in its gamme. However, we lust underline that the study of a transition conflict by lodyfying the lode I giving lore inforll8tions to the colours and functions, and that one of the conflictual, transition can thus be suppressed. It lust be clear that we then have two identical
35
The aknowledgement of the type of conflict allows the expert in Petri nets to define the type of conflict he meets according to its nature (colour/transition). and following its type. This stage peraits a structuring of the knowledge by charging the subset of rules and letarules concerned in the rules basis. in order to accelerate the solving itself. Describing the situation where the rule is appl ied by the production expert allows to introduce informations about the workshop state without concerning the conflict description directly. Datas such as the occupying rate of the machines, stocks. passing tille of the products, blocking tile, breakdown.... are dynamically updated during the simulation in order to enrich the basis of facts and select a letarule. Le a set of rules lore specifically adapted to this situation. (example; breakdown, overloaded machine, saturated stocks metarules ... ). This stage allows us to take into account the intuitive kno~ledge of the workshop deportment by introducing levels which have been elpirically defined, either by experience or by simulation. The relevance degree of a rule according to a management objective will be accessed by the expert in scheduling. In our example. we gave the rules a value according to the criteria - respect of dead line,
B. Besornbes and 1'. Laclet - lIaxillisation of machine occupation, - lIinillisation of the stocks use. This stage allows to choose the rule along the set of rules which respond to a unique .etarule. At this level, the rule shows itself silply as a sorting algori thm among the possible choices. We are giving an example of rules which were tested for our workshop in the case of a PRODUCT PALLET GAMME conflict, when the criterium to achieve is the respect of delays. We give advantage to the pallet of product with the longest delay in its gamme, and whose latest due date is nearest, by calculation of Eq. (I); MIN[(product->due-date) * (pallet->operationnu.ber) / (product->number of operations) J (!) We can see that these three stages require a greater and greater part of the decision following the ascending structure of Figure 1. Starting from the description level of the workshop, it goes up to the mRnagement level taking into account management criteria .
We tested our model changing by turns the size of the stock S, the number of products, the number of lachines, the gamme of products, for a better knowledge of the workshop. This stage allowed us to dimension the workshop and to have the critical bottlenecks and machines appear. In a second phase of this study, we tested various rules such as; Shortest Processing Tile, First COlle First Serve, Most Work Remaining, Least Work Remaining, Fewest Operations Rellaining, Earliest D~e Date, Slack Tile, RANDOM. This stage permitted us to build the rule base and to test various strategies for the stock S. The results obtained are in accordance with the works realised with scheduling rules and heuristics (Germain,1986;Canals,1988) The SPT rule seems to be the best rule for .ean flow-time and for lie an level of products in stock. But we also tested rules issued of the hUllan experience like shown in Eq.l, which are more adapted to the specific workshop. The problems we let at this stage are mainly due to the difficulty to express the experts knowledge with rules and to specify in which case a rule must be applied. In fact, it seemed to us that one of the lIain advantage of SAGASSE was that it represented a working [rIJ.ework helping experts to forlalize and put together their knowledge. Such a systel lay be used as a silulator but also as a "relation tool" between the various sectors of the factory, froll the workshop to scheduling planning service. When the knowledge is well reduced to rules and the rule base validated, the use of expert systel could be questionned in favor of a procedure 1I0dule which lIlay fix the rules but has the advantage to be quicker.
CONCLUSIONS The sillulator is presently under val idation on a real life paper mill, The originality of our approach consists of
the way we have
introduced
the interactions between the two levels of decision (see Fig. I) using the special tool of each level. A coloured and timed Petri net interpretor lIatches the sequential behaviour of the factory, whereas an expert systell serves the decision level. The occurence of an event in the interpretor corresponding to a state reached by the same, requires the expert systelll to respond by providing a scheduling or routing decision. Together, they prov ide a dynamic, interactive enviromaent for the production manager to ~s tudy the behaviour of the factory along with its policy of lIanagement. The user can react to unexpected events ",ore rapidly and thus illprove the flexibility and the output production of the factory . The SAGASSE simulator is both a design aid because of the possibility of quantifying the performance of the factory as well as an operational aid which helps provide shop floor management policies.
REFERENCES ALLA, H (1987). Discrete event simulation by timed coloured Petri nets. In Proc . APMS 87, Winnnipeg, Canada . CANALS, D. and J . -C. CAYAILLE (1988). Using simulation iteratively to determine input tilles of batr.hes of parts. In Proc. AFCET 88, Congres Auto",atique, Octobre 1988, Grenoble. France, pp.191-200. DUGGAN, J. and J. BROWNE (1988). ESPNET: Expertsystem-based Simulator of Petri Nets. In f!::2.£:. ill......Q, Control theory and applications, July 1988, Yo1.135, n04, pp.239-247. GENTINA, C. and J.-C. BOUREY (1988). Coloured adaptative structured Petri net . A tool for the autolllatic synthesis of hierarchical control of flexible manufacturing systems. In COlllputerintegrated manufacturing systems, vol.l, nO], february 1988, pp.39-47. GERMAIN, R. (!986).Conception d'un systeme d'aide a la gestion d'atel iers. Etude et comparaison d'algorithmes heuristiques. These 3eme cycle, Mars 1986, Lavoratoire d'Automatique de Grenoble, Grenoble, France. JENSEN, K. (1980). Coloured Petr i nets and the invariant method. In Theoretical COIIIPuter Science 14, North Holland, pp.317-336. MARTIN, F.(1987). Un sillulateur adapte la
a
cOllplexite des systemes de production utilisation des Reseaux de Petri Colores. These 3elle cycle, Avri! 1987, Laboratoire d'Autollatique de Grenoble, Grenoble, France. NEURON DATA, (1988). Nexpert Object. High St Palo Alto, California, USA. (1987) . PAUL, and DOUKIDIS, Artificial intelligence aids in discrete events simulation lIodelling. In Proc. IEEE Proceedings, July 1987, vol.l34, Pt D, n'4, pp.278-286. PROTH, J.-M. and XIE, (1987). A heuristic algorith. for the periodic scheduling and sequencing job-shop problem. In Proc. IEEE, 26th Conference on Decision and Control, decellber 1987, Los Angeles, CA,USA, pp . 612-617. VALETTE, R. (1988). Petri nets and production rules for decision levels in FMS. In fr2£.:. ~
Juillet 1988, Paris, France, pp.522-524.