Petri Nets financial problems solution with

AssadLeo1 23 views 14 slides May 31, 2024
Slide 1
Slide 1 of 14
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14

About This Presentation

very important


Slide Content

(c) Wil van der Aalst, Eindhoven University of Technology
PN-1
Concurrent Systems
Modeling using Petri
Nets
Najam

(c) Wil van der Aalst, Eindhoven University of Technology
PN-2
Concurrent systems modeling
•State machines are useful to model behaviour of
sequential systems
•But many systems are concurrent by nature
•Statecharts overcome some of the limitations (cf.
concurrent regions), but not all
•Petri nets are a family of techniques for modeling
systems with concurrency, communication and
synchronization

(c) Wil van der Aalst, Eindhoven University of Technology
PN-3
Petri nets
•Simple technique for concurrent systems modeling
–Three elements: places, transitionsand arcs.
–Graphical and mathematical description.
–Formal semantics suitable for static analysis.
•Supported by verification and simulation tools
–ProM, LoLa, PIPE, Woped
•Once you understand Petri nets, you will be better
equipped to understand other techniques for
modeling systems with concurrency, e.g.
–BPMN
–UML Activity Diagrams

(c) Wil van der Aalst, Eindhoven University of Technology
PN-4
Elements(name)
(name)
place
transition
arc (directed connection)
token t34 t43
t23 t32
t12 t21
t01 t10
p4
p3
p2
p1
p0
place
transition
token

(c) Wil van der Aalst, Eindhoven University of Technology
PN-5
Rules
•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.wait enter before make_picture after leave gone
free
occupied

(c) Wil van der Aalst, Eindhoven University of Technology
PN-6
Enabled Transition
•A transition is enabledif each of its input places
contains at least one token.wait enter before make_picture after leave gone
free
occupied
enabled
Not
enabled
Not
enabled

(c) Wil van der Aalst, Eindhoven University of Technology
PN-7
Firing
•An enabledtransition can fire(i.e., it occurs).
•When it firesit consumesa token from each
input place and producesa token for each
output place.wait enter before make_picture after leave gone
free
occupied
fired

(c) Wil van der Aalst, Eindhoven University of Technology
PN-8
“Token Game”
•In the new state, make_pictureis enabled. It will fire, etc.wait enter before make_picture after leave gone
free
occupied

(c) Wil van der Aalst, Eindhoven University of Technology
PN-9
Remarks
•Firing is atomic.
•Multiple transitions may be enabled, but only one
fires at a time
•By default, choice is non-deterministic
•The stateof a net is a distribution of tokens over
places (also referred to as marking).
•Any state machine can be trivially converted into
a Petri net –How?

(c) Wil van der Aalst, Eindhoven University of Technology
PN-10
Non-determinismt34 t43
t23 t32
t12 t21
t01 t10
p4
p3
p2
p1
p0
transition t23
fires
t34 t43
t23 t32
t12 t21
t01 t10
p4
p3
p2
p1
p0
Two transitions are
enabled but only
one can fire

(c) Wil van der Aalst, Eindhoven University of Technology
PN-11
Example: Single traffic lightrg
go
or
red
green
orange

(c) Wil van der Aalst, Eindhoven University of Technology
PN-12
Two traffic lightsrg
go
or
red
green
orange rg
go
or
red
green
orange rg
go
or
red
green
orange
OR

(c) Wil van der Aalst, Eindhoven University of Technology
PN-13
Problem

(c) Wil van der Aalst, Eindhoven University of Technology
PN-14
Solutionrg1
go1
or1
r1
g1
o1
rg2
go2
or2
r2
g2
o2
x
How to make
them
alternate?
Tags