Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume...
Transcript of Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume...
![Page 1: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/1.jpg)
technische universität dortmund
fakultät für informatikinformatik 12
Petri Nets
Peter MarwedelTU Dortmund,Informatik 12
Gra
phic
s: ©
Ale
xand
ra N
olte
, Ges
ine
Mar
wed
el, 2
003
2011/05/13These slides use Microsoft clip arts. Microsoft copyright restrictions apply.
![Page 2: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/2.jpg)
- 2 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Models of computation considered in this course
C, C++, Java with librariesCSP, ADA |
C, C++, JavaVon Neumann model
Plain text, use cases| (Message) sequence charts
Undefined components
Kahn networks, SDF
(Not useful)Data flow
Only experimental systems, e.g. distributed DE in Ptolemy
VHDL*, Verilog*, SystemC*, …
Discrete event (DE) model
C/E nets, P/T nets, …Petri nets
SDLStateChartsCommunicating finite state machines
Message passingSynchronous | Asynchronous
Shared memory
Communication/local computations
* Classification is based on implementation of VHDL, Verilog, SystemC with central queue
![Page 3: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/3.jpg)
- 3 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Introduction
Introduced in 1962 by Carl Adam Petri in his PhD thesis.Focus on modeling causal dependencies;no global synchronization assumed (message passing only).Key elements:� Conditions
Either met or no met.� Events
May take place if certain conditions are met.� Flow relation
Relates conditions and events.Conditions, events and the flow relation forma bipartite graph (graph with two kinds of nodes).
![Page 4: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/4.jpg)
- 4 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Example: Synchronization at single track rail segment
“Preconditions“
![Page 5: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/5.jpg)
- 5 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Playing the “token game“
use normal view mode!
![Page 6: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/6.jpg)
- 6 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Conflict for resource “track“
![Page 7: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/7.jpg)
- 7 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
More complex example (1)
Thalys trains between Cologne, Amsterdam, Brussels and Paris.
[http://www.thalys.com/be/en]
![Page 8: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/8.jpg)
- 8 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
s
More complex example (2)
Slightly simplified: Synchronization at Brussels and Paris,using stations “Gare du Nord” and “Gare deLyon” at Paris
use normal view mode!
![Page 9: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/9.jpg)
- 9 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Condition/event nets
Def.: N=(C,E,F) is called a net , iff the following holds
1. C and E are disjoint sets
2. F ⊆ (C × E) ∪ (E × C); is binary relation,(“flow relation “)
![Page 10: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/10.jpg)
- 10 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Pre- and post-sets
Def.: Let N be a net and let x ∈ (C ∪ E).•x := {y | y F x} is called the pre-set of x,
(or preconditions if x ∈ E)x• := {y | x F y} is called the set of post-set of x,
(or postconditions if x ∈ E)Example:
x•x x•
![Page 11: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/11.jpg)
- 11 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Loops and pure nets
Def.: Let (c,e) ∈ C × E. (c, e) is called a loop iff cFe ∧ eFc.
Def.: Net N=(C,E,F) is called pure , if F does not contain any loops.
![Page 12: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/12.jpg)
- 12 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Simple nets
Def.: A net is called simple if no two nodesn1 and n2 have the same pre-set and post-set.
Example (not simple nets):
Def.: Simple nets with no isolated elements meeting some additional restrictions are called condition/event nets(C/E nets) .
![Page 13: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/13.jpg)
- 13 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Place/transition nets
Def.: (P, T, F, K, W, M0) is called a place/transition net iff
1. N=(P, T, F) is a net with places p ∈ P and transitions t ∈ T
2. K: P → (ℕℕℕℕ0 ∪ {ω}) \{0} denotes the capacity of places(ω symbolizes infinite capacity)
3. W: F →(ℕℕℕℕ0 \{0}) denotes the weight of graph edges
4. M0: P → ℕℕℕℕ0 ∪{ω} represents the initial marking of places
W
M0
(Segment of some net)
defaults:K = ωW = 1
defaults:K = ωW = 1
![Page 14: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/14.jpg)
- 14 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Computing changes of markings
“Firing“ transitions t generate new markings on each of the places p according to the following rules:
![Page 15: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/15.jpg)
- 15 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Activated transitions
Transition t is “activated“ iff
Activated transitions can “take place“ or “fire“,but don‘t have to.We never talk about “time“ in the context of Petri nets. The order in which activated transitions fire, is not fixed(it is non-deterministic).
![Page 16: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/16.jpg)
- 16 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Shorthand for changes of markings
Let
⇒⇒⇒⇒ ∀ p ∈ P: M´(p) = M(p)+ t(p)
Slide 14:
+: vector add⇒⇒⇒⇒ M´ = M + t
∩∈+−∈+∈−
=••
••
••
0
),(),(
\),(
\),(
)(ttpptWtpW
ttpptW
ttptpW
ptif
if
if
![Page 17: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/17.jpg)
- 17 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Matrix N describing all changes of markings
Def.: Matrix N of net N is a mapping
N: P ×T → ℤℤℤℤ (integers)
such that ∀ t ∈ T : N(p,t)= t(p)Component in column t and row p indicates the change of the marking of place p if transition t takes place.For pure nets, (N, M0) is a complete representation of a net.
∩∈+−∈+∈−
=••
••
••
0
),(),(
\),(
\),(
)(ttpptWtpW
ttpptW
ttptpW
ptif
if
if
![Page 18: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/18.jpg)
- 18 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Example: N =
s
11
11
11
11
111
11
11
11
11
11
11
11
11
13
12
11
10
9
8
7
6
5
4
3
2
1
10987654321
−−
−−
−−
−−
−−
−−
−
p
p
p
p
p
p
p
p
p
p
p
p
p
tttttttttt
![Page 19: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/19.jpg)
- 19 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Place - invariants
For any transition tj ∈ T we are looking for sets R ⊆ P of places for which the accumulated marking is constant:
0)( =∑∈Rp
j pt
Example:
Standardized technique for proving properties of system models
tj
![Page 20: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/20.jpg)
- 20 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Characteristic Vector
∉∈
=Rp
RppcR if 0
if1)(Let:
RjRPp
jRp
j ctpcptpt ⋅=== ∑∑∈∈
)()()(0⇒⇒⇒⇒
0)( =∑∈Rp
j pt
Scalar product
![Page 21: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/21.jpg)
- 21 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Condition for place invariants
Accumulated marking constant for all transitions if
0
.........
01
=⋅
=⋅
Rn
R
ct
ct
Equivalent to NT cR = 0 where NT is the transposed of N
0)()()( =⋅==∑∑∈∈
RjRPp
jRp
j ctpcptpt
![Page 22: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/22.jpg)
- 22 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
More detailed view of computations
=
0
0
0
0
)(
...
)(
)(
)(...)(
...
)(...)(
)(...)(
2
1
1
212
111
nR
R
R
nmm
n
n
pc
pc
pc
ptpt
ptpt
ptpt
System of linear equations.Solution vectors must consist of zeros and ones.Equations with multiple unknowns that must be integers called diophantic (� Greek mathematician Diophantos, ~300 B.C.).Diophantic linear equation system more complex to solve than standard system of linear equations (actually NP-hard))Different techniques for solving equation system (manual, ..)
![Page 23: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/23.jpg)
- 23 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Application to Thalys example
NT cR = 0,with NT =
� ∑rows=0 → 1 linear dependency among rows� → rank = 10-1 = 9� Dimension of solution space = 13 - rank = 4
Solutions? Educated guessing
![Page 24: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/24.jpg)
- 24 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Manually finding generating vectorsfor 4-dimensional space
s
� or assume that a particular place is included in R (e.g. p6), whereas places along the path of other objects (e.g. p11,p12, p13) are not.
6=delete 1st row
Set 1 of 4 components = 1others = 0 to obtain generating vectors� Find independent sets components in
the matrix after deleting one row (7, 8, 12 easy to identify)
![Page 25: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/25.jpg)
- 25 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
1st basis vector
• t10(p10) b1(p10) + t10(p11) b1(p11) + t10(p13) b1(p13) = 0
→ b1(p10) = 0
• t9(p9) b1(p9) + t9(p10) b1(p10) = 0
→ b1(p9)=0
• …
Set one of components(6, 11, 12, 13)to 1, others to 0.→ 1st basis b1: b1(p6)=1, b1(p11)=0, b1(p12)=0, b1(p13)=0
All components ∈ {0, 1} → cR1 = b1
b1 = (1,1,1,1,1,1,0,0,0,0,0,0,0)
![Page 26: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/26.jpg)
- 26 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Interpretation of the 1 st invariant
Characteristic vector describes places for Cologne train.We proved that: the number of trains along the path remains constant ☺.
( )00000001111111, =Rc
s
cR,1
![Page 27: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/27.jpg)
- 27 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
2nd basis vector
• t10(p10) b2(p10) + t10(p11) b2(p11) + t10(p13) b2(p13) = 0→ b2(p10) = 1
• t9(p9) b2(p9) + t9(p10) b2(p10) = 0→ b2(p9)=1
• …
Set one of components(6, 11, 12, 13)to 1, others to 0.
→ 2nd basis b2: b2(p6)=0, b2(p11)=1, b2(p12)=0, b2(p13)=0
b2 not a characteristic vector, but cR,2=b1+b2 is→ cR,2 = (1,0,0,0,1,1,0,0,1,1,1,0,0)b1 = (1, 1, 1, 1,1,1,0,0,0,0,0,0,0)
b2 = (0,-1,-1,-1,0,0,0,0,1,1,1,0,0)
![Page 28: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/28.jpg)
- 28 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Interpretation of the 2 nd invariant
We proved that:None of the Amsterdam trains gets lost (nice to know ☺).
s
cR,2 ,1,0,0),1,0,0,1,1(1,0,0,0,1=2,Rc
![Page 29: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/29.jpg)
- 29 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Setting b3(p12) to 1 and b4(p13) to 1leads to an additional 2 invariants
We proved that:� the number of trains serving
Amsterdam, Cologne and Paris remains constant.
� the number of train drivers remains constant.
( )00000001111111, =Rc
( )01000110000004, =Rc
( )10011000000003, =Rc
( )00111001100012, =Rc
s
cR,4
cR,3 cR,1cR,2
![Page 30: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/30.jpg)
- 30 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Applications
� Modeling of resources;
� modeling of mutual exclusion;
� modeling of synchronization.
![Page 31: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/31.jpg)
- 31 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Predicate/transition nets
Goal: compact representation of complex systems.
Key changes:
� Tokens are becoming individuals;
� Transitions enabled if functions at incoming edges true;
� Individuals generated by firing transitions defined through functions
Changes can be explained by folding and unfolding C/E nets,
� semantics can be defined by C/E nets.
![Page 32: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/32.jpg)
- 32 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Example: Dining philosophers problem
n>1 philosophers sitting at a round table;n forks,n plates with spaghetti;philosophers either thinkingor eating spaghetti(using left and right fork).
How to model conflict for forks?
How to guarantee avoiding starvation?
How to model conflict for forks?
How to guarantee avoiding starvation?
2 forksneeded!
![Page 33: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/33.jpg)
- 33 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Condition/event net modelof the dining philosophers problem
Let x ∈ {1..3}tx: x is thinkingex: x is eatingfx: fork x is available
Model quite clumsy.
Difficult to extend to more philosophers.
Model quite clumsy.
Difficult to extend to more philosophers.
Normal view mode!
![Page 34: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/34.jpg)
- 34 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Tokens: individuals.
Semantics can be defined by replacing net by equivalent condition/event net.
Tokens: individuals.
Semantics can be defined by replacing net by equivalent condition/event net.
Predicate/transition modelof the dining philosophers problem (1)
Let x be one of the philosophers,let l(x) be the left spoon of x,let r(x) be the right spoon of x.
f 1f 2
f 3
p1 p3
p2
![Page 35: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/35.jpg)
- 35 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Predicate/transition modelof the dining philosophers problem (2)
Model can be extended to arbitrary numbers of people.
Model can be extended to arbitrary numbers of people.
use normal view mode!
f 1f 2
f 3
p1 p3
p2
![Page 36: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/36.jpg)
- 36 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Evaluation
Pros:� Appropriate for distributed applications,� Well-known theory for formally proving properties,� Initially a quite bizarre topic, but now accepted due to
increasing number of distributed applications.Cons (for the nets presented) :� problems with modeling timing,� no programming elements,� no hierarchy.
Extensions:� Enormous amounts of efforts on removing limitations.
back to full screen mode
![Page 37: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/37.jpg)
- 37 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
© Cris Kobryn: UML 2001: A Standardization Odyssey, CACM, October, 1999
Include decisions(like in flow charts). Graphical notation similar to SDL.
“swimlane“
UML Activity diagrams: Extended Petri nets
![Page 38: Petri Nets - TU Dortmund · Manually finding generating vectors for 4-dimensional space s or assume that a particular place is included in R (e.g. p6), whereas places along the path](https://reader030.fdocuments.in/reader030/viewer/2022040601/5f07ca627e708231d41ec2b3/html5/thumbnails/38.jpg)
- 38 -technische universitätdortmund
fakultät fürinformatik
P.Marwedel, Informatik 12, 2011
Summary
Petri nets: focus on causal dependencies
� Condition/event nets
• Single token per place
� Place/transition nets
• Multiple tokens per place
� Predicate/transition nets
• Tokens become individuals
• Dining philosophers used as an example
� Extensions required to get around limitations
Activity diagrams in UML are extended Petri nets