Académique Documents
Professionnel Documents
Culture Documents
Process modeling
Emphasis on dynamic behavior rather than structuring the state space Transition system is too low level We start with the classical Petri net Then we extend it with:
Color Time Hierarchy
PN-1
History:
Carl Adam Petri (1926-2010) PhD thesis 1962, start of concurrency research e.g. Commandeur in de Orde van de Nederlandse Leeuw In sixties and seventies focus mainly on theory. Since eighties also focus on tools and applications (cf. CPN work by Kurt Jensen). Hidden in many diagramming techniques and systems (token game semantics).
PN-2
Elements
p4
(name) place
t34 p3 t43
place
transition
(name)
transition
t23 p2 t32
token
t01 p0
t10
PN-3
Rules
free
wait
enter
before
make_picture
after
leave
gone
occupied
Connections are directed. No connections between two places or two transitions. Places may hold zero or more tokens. First, we consider the case of at most one arc between two nodes.
PN-4
Enabled
A transition is enabled if each of its input places contains at least one token.
free
Not enabled
wait
enter
before
make_picture
after
leave
gone
occupied
enabled
Not enabled
PN-5
Firing
An enabled transition can fire (i.e., it occurs). When it fires it consumes a token from each input place and produces a token for each output place.
free
fired
wait
enter
before
make_picture
after
leave
gone
occupied
PN-6
wait
enter
before
make_picture
after
leave
gone
occupied
PN-7
Remarks
Firing is atomic. Multiple transitions may be enabled, but only one fires at a time, i.e., we assume interleaving semantics (cf. diamond rule). The number of tokens may vary if there are transitions for which the number of input places is not equal to the number of output places. The network is static. The state is represented by the distribution of tokens over places (also referred to as marking).
PN-8
Non-determinism
p4 p4
t34 p3
t43
t34 p3
t43
t23 p2
t23 p2
t32
t12 p1
t21
t12 p1
t21
t01 p0
t10
t01 p0
t10
PN-9
green
red
go
orange
or
PN-10
rg
rg
green
green green
red
go
red
go
OR
orange
red
go
orange
orange
or or
or
PN-11
Problem
PN-12
Solution
rg1 rg2
g1
g2
r1
go1
go2
r2
o1
o2
or2
PN-13
PN-14
PN-15
PN-16
PN-17
WARNING
It is not sufficient to understand the (process) models. You have to be able to design them yourself !
PN-18
wait
enter
before
make_picture
after
leave
gone
PN-19
red rb
black
rr
bb
PN-20
cb cb cb sc sf cb bl fl cb fl
PN-21
bl
PN-22
PN-23
Formal definition
A classical Petri net is a four-tuple (P,T,I,O) where: P is a finite set of places, T is a finite set of transitions, I : P x T -> N is the input function, and O : T x P -> N is the output function. Any diagram can be mapped onto such a four tuple and vice versa.
PN-24
PN-25
red rb
black
rr
bb
PN-26
PN-27
Enabling formalized
Transition t is enabled in state s1 if and only if:
PN-28
Firing formalized
If transition t is enabled in state s1, it can fire and the resulting state is s2 :
PN-29
PN-30
Reachability graph
The reachability graph of a Petri net is the part of the transition system reachable from the initial state in graph-like notation. The reachability graph can be calculated as follows:
1. Let X be the set containing just the initial state and let Y be the empty set. 2. Take an element x of X and add this to Y. Calculate all states reachable for x by firing some enabled transition. Each successor state that is not in Y is added to X. 3. If X is empty stop, otherwise goto 2.
PN-31
Example
red rb black
(3,2)
(3,1)
(3,0)
(1,3)
rr bb
(1,2)
(1,1)
(1,0) Nodes in the reachability graph can be represented by a vector (3,2) or as 3 red + 2 black. The latter is useful for sparse states (i.e., few places are marked).
PN-32
g1
g2
r1
go1
go2
r2
o1
o2
or1
or2
PN-33
PN-34
PN-35
PN-36
Modeling
Place: passive element Transition: active element Arc: causal relation Token: elements subject to change
The state (space) of a process/system is modeled by places and tokens and state transitions are modeled by transitions (cf. transition systems).
PN-37
Role of a token
Tokens can play the following roles: a physical object, for example a product, a part, a drug, a person; an information object, for example a message, a signal, a report; a collection of objects, for example a truck with products, a warehouse with parts, or an address file; an indicator of a state, for example the indicator of the state in which a process is, or the state of an object; an indicator of a condition: the presence of a token indicates whether a certain condition is fulfilled.
PN-38
Role of a place
a type of communication medium, like a telephone line, a middleman, or a communication network; a buffer: for example, a depot, a queue or a post bin; a geographical location, like a place in a warehouse, office or hospital; a possible state or state condition: for example, the floor where an elevator is, or the condition that a specialist is available.
PN-39
Role of a transition
an event: for example, starting an operation, the death of a patient, a change seasons or the switching of a traffic light from red to green; a transformation of an object, like adapting a product, updating a database, or updating a document; a transport of an object: for example, transporting goods, or sending a file.
PN-40
PN-41
Causality
PN-42
Parallelism
PN-43
Parallelism: AND-split
PN-44
Parallelism: AND-join
PN-45
Choice: XOR-split
PN-46
Choice: XOR-join
PN-47
rg1
rg2
g1
g2
r1
go1
go2
r2
o1
o2
or2
PN-53
subassembly2 2 chair
chassis
PN-55
Solution
Only works if place is N-bounded
N input and output arcs
t p
p
PN-56
t1
?
t2
Hint: similar to Zero testing!
PN-57
A bit of theory
Extensions have been proposed to tackle these problems, e.g., inhibitor arcs. These extensions extend the modeling power (Turing completeness*). Without such an extension not Turing complete. Still certain questions are difficult/expensive to answer or even undecidable (e.g., equivalence of two nets).
* Turing completeness corresponds to the ability to execute any computation.
PN-58
PN-59
PN-60
PN-61
free
wait
enter
before
make_picture
after
leave
gone
occupied
wait+before+after+gone free+occupied
PN-62
free
wait
enter
before
make_picture
after
leave
gone
occupied
enter+make_picture+leave+accident
PN-63