FORMAL FOUNDATIONS FOR A PROCESS/RESOURCE APPROACH...
Copyright © 1999 IFAC 14th Triennial \Vorld Congress,
14th World Congress of IFAC
J-3c-06-1 Beijing~
P.R. China
FOU~DATIONS FOR A PROCESSIRESOURCE APPROACH IN MANUF ACTURING S"STEl'vIS BEHAVIOUR MODELLING
FORMAL
G. Berio(lI and
F~ B~
V·ernadat
Jl;fACSI Teanl, INR/A-Lorraine and LGfPM -E/\'J/'vI/L/ni'J-'ersite de Metz, lIe du Saulcy, 57045 Metz~ France cJnail: (herio, vcrnadat) @agip.sciences.univ-metz.jr
l\bstract: The paper provides formal foundations for a specification model for Jllanufacturing systen1S behaviour n10deHing. 1'his is achieved by using the idea of 11 synchronisation of languages~' and previous work on state-charts and Object Petri
Nets. Consistently with thi.1.l approach, the re-use of existing n100C)S in the <..:ontext of enterprise engineering is stressed out and the use of standard methods for combining 1110dels is advocated to make it effective. Copyright © ] 999 IFAC Keyword:..;: Petri-nets, State-charts, Process tllode]s, Fornlal description techniques. Behaviour modelling~ Concurrent systems, f\.1anufacturing systcnlS~ Discrete-event systems.
The J110del for representing manufacturing systems behaviour presented in (Vernadat and Berio, 1998) is based on a process fnodel and a resource rnodel (also named agent modeL encompassing Inachincs~ humans and applications). Basically~ the~e t\.VQ models represent behaviours of enterprise processes and resource-s respectively_ However~ it is important to note that at this level, processes could just be a point of view, representing the overall control logic while resources must he directly mapped to the operational part of the production system. i.e. the physical system. Processes specify activities to be done while resources effectively state how these activities are realised by perfonnlng explicit or hidden operations. The Blain idea of the lnodelling paradigm is sununarised by Figure 1. The link bet",\/ccn the tw·o types of behaviours (process and resource behaviours) is materialised by functional operations (i.e. explicit low level comn1ands) on the one hand and capabilities and c0111petencies (when operalions are hidden) on the other hand as required by proce~.scs and provided by resources. The difficulty is to co-ordinate both types of behaviours to control a real-world system. In
1. INTRODUCTION The need for advanced Inodelling techniques is now widely recognised in the field of entcrprjse Inodclling and engineering. Many proposals. at different levels, have been proposed so far (Vernadat, 1996). Ho\vever, they 111ainly suffer from lacks both in ter01S of conceptual models used and their senlantic foundations (Vernadat and Berio, 199R). In our opinion. each of these proposals represents a vie\\.'point on the satue reality. In spite of making ne.w tnodels~ we propose to combine SOllle of these in a consistent way. Indeed~ it is irnportant to note that a systernatic way of developing ncVv' tnodels froln existing ones should allow a Inure cornplete characterisation of reality without major change on existing ll10deJJing activities. The advantage is that both humans and software systems deali ng with existing lllodels will continue to use thenl in the same \-vay as befure.
1
1
(1)0. Beno is. supported by a tHarie Curie Fellowship of the European Union, EEC, Contract No. ERBFMBrCT971572.
4888
Copyright 1999 IFAC
ISBN: 0 08 043248 4
FORMAL FOUNDATIONS FOR A PROCESS/RESOURCE APPROACH...
14th World Congress of IFAC
(Vernadat and Berio, 1998)1 this co-ordinated behaviour is infonnally described by associating Lv.,'O well-known formal models respectively, Petri Nets (Brauer et at., J 987) for the process modeJ (because of its procedural nature) and Hare! 's state-charts (Hare1, 1987; Hare) and Naalnad, 1996), to the resource rnodel (bccau~c of its reactive nature).
The idea of synchronisation of languages IS straightforward and it will be explained for (wo languages. If L] and L 2 are languages, one possible TTlethod is to define a rela60nship bet\\leen thetn on the Cartesian product L,xL 2 . In some sense, this relationship should constraint possible lneanings associated to each element of any couple in L 1xL 2 • Tberefore~ this relationship should represent dependent (or interacting) and independent elements belonging to L, and L 2 - 1Vlore formally, synchronisation of two languages is a triple (L 1,L 2 ,p) where P~LIXL2UL2XL •.
'Vhat has
Actildties
to be done
Foncbonal operations
Capahili ti esl Conlpetcncies The doers
Operations & States
1\.1achines
To provide a fOrInal basis for the conceptual model in (Vernadat and Berio~ 1998), we mainly focus on types instead of real processes and physical resources. In fact, a clear concept of type should make 1t possible to cOlnpose several elements \vithout any ilnpact on their basic semantics.
Applications
Hlllnans
Fig. 1 The process and resource paradigm
However a cOIl1plete formal integration of the two ITlodels has not been provided yet, Therefore, to state formal f()undations to represent the existing syncrgy bet\,veen these t\\'o mode]s~ \ve propose to use the idea of synchronisation of languages (Sernadas at al.; 1998) coupled ,vith the v,",ork done by Valk (1996) on Object Petri Nets. The ainl is to achieve the t"vo following ohjcctives: - to provide a formal basis for the approach proposed in (Vernadat and Berio: 199~); - to provide an exall1ple on model combination, profltably used in ITluking bUlh a new lTIodciling approach and in defining ils fonnal foundations.
The class of Petri Nets that will be used to formalise the process model is the class of PI acerrransition nets
1
2. TECHNICAL
PRF.LIMIN~~RJES
1'his section provides the reader 1,.vith son1e basic prelinlinaries on synchronisation of languages; Petri Nets and Harel 's state-charts~ but restricted to the scope of th is '"\fork, In this paper, a model is a set of concepts used for modelling a specific reality Ca rnodel can be associated to a language). A given reality described in tcrn1S of a 1110del is called v..,jthout any difference a schenla or a specification, For instance, t.he Petri Net notati on i.1\ a model wh ile Cl gi yen net is a schema or a specification. Another important issue is related to precisely distinguishing process type and processes (or process occurrences), as well as resource type and resources (or physical resources). For instance, wc can talk about a particular process that is running to provide activities for a specific customer order. Conversely, we can talk about a process type providing activities for a type of customer order. l~he saOle applies to resources. for instances, nn1achine number 51' and the type of that HHlchjne, enlployee 1\-1a re '1 and its organisational role as nlanager. 'I
(PIT nets). Definition 1 (PlacelTransition nets) A PlacelTransir.ion Petri net N (Brauer et at. ~ 1987) is a 4-tuple N~(P~l',F,M) in \vhich: - P is a finite set, called the set of places; - T is a finite set, called the set of transitions, such that: PnT::::::0; - F is a relation such as F k PxTuTxP (set of arcs); - M is a mapping, called the initial marking, such that: M:P-+{ 0, I }. i\S usual. transit.ions can be auglnented by using a guard predicate as a precondition for triggering. The hypotheses about initial marking M:P~{ O,l} is introduced in order to deal with process types. However, it is well-kno\}/n that a process type could be defined with an unconstrained initial marking M:P~N, This happens when lhe hehaviour of a process type \vith an unconstrained initial nlurking cannot be defined like some special cOlnposition of a set of processes with the same type as M:P~{ 0,1 ). It should also be noled that even under the hypothesis 1\-1:P-4{ 0, I}, multiple occurrences of the same transition or distinct transitions may be enabled in the .saJTIC lnarking. Therefore, the notion of multi-set of transit10ns is required to deal with these situations.
Definition 2 (Multi-set of transitions) A multi-set K over tran~ition set K is a function K:T~N. Given a multi-set K, a set ECK) of
cardinality L tc T K(t) with a sUljcctive function 6 : E(K) -+T such as for each tE T, #( {el .p (e)=t}) == K(l) (# is the cardinality of a set) \vill be calJed the set of occurrence..}' of transitions over the nUllti-set K.
4889
Copyright 1999 IFAC
ISBN: 0 08 043248 4
FORMAL FOUNDATIONS FOR A PROCESS/RESOURCE APPROACH...
The set E(K) can be jntrod uced as an a)ternati ve representation of Inulti-sets. It exactly fits to the concept of transition occurrence.
Definition 3 (Non-conflicting transitions in a marking M) A ITIulti-set K of transitions is non-conflicting for a nlarking M iff K is enabled in M as defined in Placeffransition Nets. A Inultj-set K is Jt1-aXiJllal in M for a properry 3 iff for each transition t' , K +t' doe.s not satisfy:::: in M. An exalnple of a property 2 as used in definition 3 can be "the set K is non-conflicting". In this papcr~ this concept wiU be applied in section 3, definition 7. Harel's state-chart fOrIllUlisnl (HSC) was introduced to represent in a nJore intuitive (or visual) 11lanner complex concurrent systems (Harel, 1987; Harel and Naamad~ 1996). In this paper, only the most ilnportant elenlents of this model are used. Ho\vever~ generalisation to the cOlllplete model is very easy. The Baret's state-chart forn1alism is a hLerarchical extension of 1vlcaly~s Machine (IVlueck~ 1994). T\vo types of hierarchy arc considered to make HSC: - XOR refinement; - AND refinenlent. The fOfJl1er 111eanS that a state at one level of the hierarchy corresponds to a stale ill the previuus level in the same hierarchy. The fatter means that a state at one level corresponds to a fixed number of paraUel states in the next level of the san1e. hierarchy. Definiti
Q is the XOR hierarchical state function; - a:Q~Q is the AND hierarchjcaJ state function.
14th World Congress of IFAC
produced: they are never further used to enable transitions in next future stales. On the other slde~ the operation point of view is import.ant because it allo\vs to describe relationships with data, event creations and physical operations. Moreover, in sonle cases~ HSC can he used to represent (he set of possible behaviours of a set of imperative operations (belonging from a data type or object ciass). A concept of non-conflicting transitions is introduced for BSC in a silnilar way than for Petri Nets (Harel and Naarnad~ 1996). Ho\vcver, in this case~ this concept is descrihed as a simple set \vithout introducing multi-sets. However, the concept of multi-set of transitions as defined in definition 2 still applies to sinlple set. Also~ an equivalent definitjon to definition 3 can be introduced for state-charts. State-charts also offer a way to provide an operational form of declarative constraints. In fact, external events are used by a state-chart to enable transitions iff the state-chart is in SOIne states in which reactions to these events are explicitly defined. This Ineans that the state-chart reacts to some events only Vl,rhcn this is possihle. This. is important because in some cases ""hen it. is no possible to react to some events, externa] application producing these events should be informed, in sorne \vay, about this. However, by using state-charts to ruodel imperative operations, this corresponds to invariant, \vithout any
returned information. In state-charts, t\VO distinct states cannot have any common state in their refinements (~ and 0: are functions). Ho\\'ever, as it happens in Place/Transition nets with constrained initial nlarking, it is straightfor\\!ard to cornpose the three functions :'.. , S and ex, with a renaming function to have several times the same refinement.
3. PROPOSED APPROACH Having introduced the necessary definitions~ we now present our approach. The idea is to define a synunetric relationship of synchronisation p between transitions belonging to a PIT net and transitions belonging to a HSC, in analogy to what can be found in (Valk, 1996) concerning Object Petri Nets. 1\.1ore fonnally, by using notations introduced above; the synchronisation of those two languages is
Given two states of a state~chart the notation: Transition: Condition/Event: Operation \vill be used in the renlinder to represent the function A~ i.e. to label functional arro\vs belwecn t\\lO states.
(HSC~P/T~p)
\vhere
p~IxT\_/rxI
and each e)enlent of p v",i11 be indicated as (SJ)E IxFf even though the order of the pair does not matter (p is a syn11netrical relationship). In the reminder~ the triple (HSC)PrT,p) will be called
In definition 4, events and transitions are clearly distinguished: transitions are represented by associated and unique names. Therefore, events arc perceived as enabling conditions of some transitions. In our case, the S'fAT'EMAl-'E semantics of events (flareI and Naamad. 1996) is used. l'his means that events can only be used in the state in which they are
a coupled specification. Inforn1ally, the p relationship Incans that a transition
helonging to T is performed by using a transition beJonging to 1. Definition 5 (Synchronised transitions)
4890
Copyright 1999 IFAC
ISBN: 0 08 043248 4
FORMAL FOUNDATIONS FOR A PROCESS/RESOURCE APPROACH...
14th World Congress of IFAC
At each stcp~ a pair of enabled transItIons (C,K) in the slale (1Vl 1 ,M2 ) is defined as follo\v: - C js a maximal set in M j of transjtions of the statechart such that (i) it is non-conflicting according to the selnantics of HSC, and (ii) each synchronised transition s has onc and only onc corresponding elenlent e in E(K J) with (s,
If (S.t)E p, transitions sand t are called synchronised transitions. A transition s (from eilher the Petri net or the state-chart)~ such that there is no any other transition ( satisfying (S,l)E p, is called a IlOll'" sy nchron is ed trans ition. Il should be ohserved thal any transition belonging tD a given Place/Transition net may he related to :-;everal HSCs through p. In fact, to perfonn its tasks~ a process type could need several resource types. This can be achieved by con1bining several HSCs in a unique state-chart by means of the AND hierarchy. Conversely, a resource Lyre Jnay be used by several process types. Ho\vever~ a transition of a resource .set (represented as a unique state-chart) cannot be used to pcrforrn (nore occurrences of SOBIC transitions in one or more Place/Transition nels. Tlice-versu: a synchronised transition in a Place/Transition net is executed by using at most one transition in its
resource set. State-charts also 111uke it possible to represent some reJationships bet\veen distinct resource types and \)cl\veen resource types and an environnlent (represented only by eve.nts) other than saBle process types. The relationship p \vill he used to define a notion of execution or CO 111putation or trace of process. hchaviour. This \'\-'ill effectively be done by extending the notion of enabled transitions in a global state (or state of the coupled specificat.ion). In parli<.:ular~ it is important to note lhat the re.lationship p is perceived as a constraint on the possible process/resource states. Therefore, it does not specify which elenlent (process or resource) Inakes decisions on activity (or operation) start, hringing together passive and active resource behaviours. The general idea is to use as much as possible the selnantics developed for state-charts and Placerrransition nets~ p will just be used lo conslraint enahled transitions belonging to each 111 ode I. However, an irnportant point is that given t\VO transitions s, t \vith (S,t)E p, if sand t can be executed respecti vely in the state-chart and jn the Placen-'ransition net~ hoth sand l rnust he executed. This means that an enabled synchronised transilion t of a PlacerI'ransition net should be executed as soon as possible. The above discussion is sumlnarised in definitions 6 and 7. Definition 6 (S tatc of a coupled speci fication) A state of the coupled specification is a pair (M h M 2 ) where: - M] is a state in the sense of HSC sen1antics; - M 2 is a tnarking according Place/Transition net semantics.
Definition 7 (Semantics of a coupled specification)
Definition 7 means that given two pairs as (S,t)E p and (S~q)E p, t and q cannot fire at the same time in the Petri net because the transition s cannot be used to execute two distinct elernents of E(K l ). The same appljcs to rnultiple occurrences of a transition t in the Placerrransition net corresponding to, for jnstance~ t,,;vo transitions s] and S2 in the state-chart (Sl~S2 because~ as above, the same transition in the statechart cannot execute t\\/O distinct elements in E(K,)). These two transitions cannot be associated to the salne elelnent in E(K l ) because, by hypothesis, just one resource operation (lransition) is needed to perform an occurrence of a process acti vity. It is also important to note that if transitions SI and 52 are in conflict, the associated process transitions (nlultiple occurrences of the sanle or distinct ones) are never performed in parallel. Another important point of definition 7 is the following: given the relationship p, if (S,t)E P and S~C, there is at least a t, such as t::;K and vice-versa. This means that it is not required that all possible transitions t synchronised \vith s should be enabled and fired. Finally, the choice of a l11axilnal InulLi-set K 1 lS related to the fact that enabled and synchronised transitions in the PlacelTransition net should not constrain corresponding enabled transitions in the state-chart. This way, enabled synchronised transitions take priority on non-synchronised ones in the Placerrransition net. 3./ An Exanlple
The system presented in (Suraj, 1997) will be used to illustrate our approach (Figure 2). When a part is in the conveyor r the robot is able to pick~up it and to transfer it into the first free cutteL On the cutter operation cnd, if the buffer may receive
4891
Copyright 1999 IFAC
ISBN: 0 08 043248 4
FORMAL FOUNDATIONS FOR A PROCESS/RESOURCE APPROACH...
14th World Congress of IFAC
in italic. The Placerrransition net is provided in a hierarchical form w'ith the corresponding transitions refinelnent and places in bold style.
J110re parts) the part is transferred into the buffer. The robot is allowed to transfer the part jnto the conveyor. The solution to this exalnple is given in Figure 3; conditions (there are no events) in the slate--charl arc
c u
n
v e y
o
Fig.2 (Tbe Cutting Syslenl) 'tv1ovc lo
Jl
Conveyoll
9..
~ -
Move to that
~OCutter
~Qescrvc :u----
1J ~
free Culte
.....
,.
1J- - .. .. .
.. .. ....
- ..... -
....
Jl
~O ...
......
Transfer into aJ:r~~ ~!11t~r
.......................... _ Cutting Reserve
o
~
..~
<)
~O.I •
_...-.I.~
BuffeO......
............................
_
....
P-
..
I
Cutting and Stocking
Transfer inlo Buffer -.J
-~
••
~.
~
._
..
Transfer i nt Conveyor
......
· ·~
Release
.. .....
..
0
0"""'-4_nfUffer OJe--lII--1-ri~···· U LJ~oveto
UNlovcto
Conveyor
Buffer
B.MI: Increment B.M2: Increment
B.M3 : In (Ready to lvlove) : Decrement
C.M23 : Transfer C.M22: Cut2.end into the Buffer
C.M13: Transfer CJ\.1l2: CUll.end into the Buffer
= { (R.~·'11,
~Move to Conveyor'), (R.~f3, 'rv1ove to that Cutter'), (B.Ml, 'Reserve Buffer'), (B.I\12, ~Reserve Butfer'), ), (B.i\13 , 'Release Buffer')} (B.M4, 'Release Buffer'), CC.Ml L 'Reserve a Free L"utter')~ (C.M12, 'Reserve a Free Cutter'), CC.Ml3, '1'ransfer into Buffer'), (C.I\123, 'Transfer into Buffer~t (... , 'Cutting), (... , 'Cutting')~ (R.Ml , 'Move to Buffer'), (R,M3, 'Move to Conveyor') -_
p
Fig.3 (The Triple (HSC,prr,p) for the Cutting System)
4892
Copyright 1999 IFAC
ISBN: 0 08 043248 4
FORMAL FOUNDATIONS FOR A PROCESS/RESOURCE APPROACH...
14th World Congress of IFAC
Harel, D. (1987). State-charts: A visual fornlalisTn for compJex systems. Sei. C()fl1p.Prograf11., 9, pp. 231-248. HareL D., A. Naamad (1996). The STATEMi\TE Semantics of Statecharts, ACM Transactions on Soft~va,.e Engineering and A-leth{}d{}l()gy~ 5(4)~ pp. 293-333. Mueck, T. A. (] 994). Active Databases: Concepts and Design Support. In: Advances in COmp[lters. VaL 39~ pp. 108-199. Sernadas, A., C. Scrnadas and C. Caleiro (1998). Synchronization of Logics. Studia Logica, 59(2), pp. 218-248. Suraj, A., S. Ramaswany and K. S. Barber (1997). Extended Statecharts for the 1110delling and specification of manufacturing control software systenls. Int. .Journal of C()Jnpuler Integrated Afanrl!actu.ring, (A. Gunasekaran and S. Y. Nof, Eds.). Val. 10, n. 1-4., pp. 160-171. \lalk~ R. (1996). On Processes of Object Petri Nets. Technical Report N. ] 85/96. Conlputer Science DepartIncnt, University of Harnburg, Gcnnany. VernadaC F. B. (1996). Enterprise l'vlodeling and Integration: Principles and Applications, Chapman & Hall, London. Vernadat, F. B.~ G. Berio, (1998). l\-1anufacturing
The exalTIplc points out four interesting questions: - the initial marking of the net cannot be constrained to {O, 1 } to realise the desired system behaviour; for instance, buffer transitions constrain synchronised transitions in the Placerrransltion net to an interleaved execution; - some reSOllrces~ such as cutters and roboC sometimes shown an active behaviour~ for instance, \-vhen the robot has to pick-up a part or v/hen a cutter has to cut. In par(icular~ the ronot behaviour can be defined as a more active system making decisions on which initia[ move (to the buffer or to the conveyor) should be done (by adding two initial transitions doing two spatially distinct moves and so on). Other resources such as the buffer nlay exhibit non-deterministic bchaviours~ not represented in the PlacelTransition ncl; in the solution, the Place/Transition net controls n10st of the resource behaviours; however. a more distrihuted solution is also possible with~ for instance, direct cOlnrnunications betv..' een cutters and butTer, and also a more independent hehaviour of the robot; in order to allo~.r lnore paraIlelislTI in resources and process, the concept of conlpound transition (Harel and Naamad~ 1996) can be used in developing the state-chart; for instance (with Inore robots), when the process enabled reserve and release a buffer, tbey could be done as tnuch as possible in parallel: hy using COJllpound transitions~ acceptable sequences (i.e. rnodelling parallelism as interleaving) of increasing and decreasing operations can be introduced in the state-chart representing the buffer.
1
SystcrTIs Modelling and
Analysis: a Process/Agent
Approach. In: Proceedings n.f 6 ill /Vlediterranean IEEE Conference on Control and SystenlS, Alghero~ Italy, June 1999. CD-ROM.
4. CONCLUSIONS This paper presents a new tnodel representing \vorkflo\\l in manufacturing ~)'stcrn.s. This mode) is based on two well-known modelling formalisms: Harel's state-charts and Petri Nets. This aIlo\vs to effectively sbow that new interesting models can be defined slarting fron1 well-understood tnodels. 1\.1ainJy~ this is hecausc wc ,"vould like to capitalise on both modelling lnethodologies and~ if possible, on their theoretical resuJts. A further important point is that state-charts aIJo\.v to (Erectly represent communications between resources that have not to be sho\vn at the process level, especially independent resource creation, independent resource c<.nnrnunication and synchronisation.
REFERENCES Braucr \\T. Relsig and G. Rozemberg (Eds.) (1987). Petri l'lets: Central J.~odels and their Properties. Advances in Petri Net,·, Part I and IL LNCS 254-255. Springer Verlag, Berlin. 1
\\'.,
4893
Copyright 1999 IFAC
ISBN: 0 08 043248 4