petri net slide (1)
TRANSCRIPT
-
7/27/2019 Petri Net Slide (1)
1/15
1
Petri Nets
-
7/27/2019 Petri Net Slide (1)
2/15
2
Definition of Petri Net
C = ( P, T, I, O) Places
P = { p1, p2, p3, , pn}
TransitionsT = { t1, t2, t3, , tn}
InputI : T Pr(r = number of places)
Output
O : T
Pq
(q = number of places)
marking : assignment of tokens to the places ofPetri net = 1, 2, 3, n
-
7/27/2019 Petri Net Slide (1)
3/15
3
Applications of Petri Net
Petri net is primarily used for studying the dynamicconcurrent behavior of network-based systemswhere there is a discrete flow.
Petri Nets are applied in practice by industry,academia, and other places. -reference
http://www.informatik.uni-hamburg.de/TGI/PetriNets/applications/http://www.informatik.uni-hamburg.de/TGI/PetriNets/applications/ -
7/27/2019 Petri Net Slide (1)
4/15
4
Basics of Petri Nets
Petri net consist two types of nodes:
places and transitions. And arc exists onlyfrom a place to a transition or from atransition to a place.
A place may have zero or more tokens.
Graphically, places, transitions, arcs, andtokens are represented respectively by:circles, bars, arrows, and dots.
p2p1 t1
-
7/27/2019 Petri Net Slide (1)
5/15
5
Basics of Petri Nets -continued
Below is an example Petri net with two
places and one transaction. Transition node is ready to fire if and only
if there is at least one token at each of itsinput places
state transition of form (1, 0) (0, 1)
p1 : input place p2: output place
p2p1 t1
-
7/27/2019 Petri Net Slide (1)
6/15
6
Properties of Petri Nets
Sequential ExecutionTransition t2 can fire onlyafter the firing of t1. Thisimpose the precedence
of constraints "t2 after t1."
SynchronizationTransition t1 will beenabled only when atoken there are at leastone token at each of its
input places. Merging
Happens when tokensfrom several places arrive
for service at the sametransition.
p2t1p1 p3t2
t1
-
7/27/2019 Petri Net Slide (1)
7/15
-
7/27/2019 Petri Net Slide (1)
8/15
8
Properties of Petri Nets
Conflictt1 and t2 are both ready tofire but the firing of anyleads to the disabling of the
other transitions.
t1
t2
-continued
t1
t2
-
7/27/2019 Petri Net Slide (1)
9/15
9
Properties of Petri Nets
Conflict - continued
the resulting conflict may be resolved in apurely non-deterministic way or in a
probabilistic way, by assigning appropriateprobabilities to the conflicting transitions.
there is a choice of either t1 and t2, or t3 and t4
-continued
t1 t2
t3 t4
-
7/27/2019 Petri Net Slide (1)
10/15
t1, t4 are forking transitions, t3 is a joining (synchronizing transition)
-
7/27/2019 Petri Net Slide (1)
11/15
-
7/27/2019 Petri Net Slide (1)
12/15
12
Example: In a Restaurant
(Two Scenarios)
Scenario 1:
Waiter takes order from customer 1; serves
customer 1; takes order from customer 2;serves customer 2.
Scenario 2:
Waiter takes order from customer 1; takesorder from customer 2; serves customer 2;serves customer 1.
-
7/27/2019 Petri Net Slide (1)
13/15
13
Example: In a Restaurant (A Petri Net)
Waiter
freeCustomer 1 Customer 2
Take
order
Take
order
Order
taken
Tell
kitchen
wait wait
Serve food Serve food
eating eating
-
7/27/2019 Petri Net Slide (1)
14/15
14
Example: In a Restaurant (Scenario 1)
Waiter
freeCustomer 1 Customer 2
Take
order
Take
order
Order
taken
Tell
kitchen
wait wait
Serve food Serve food
eating eating
-
7/27/2019 Petri Net Slide (1)
15/15
15
Example: In a Restaurant (Scenario 2)
Waiter
freeCustomer 1 Customer 2
Take
order
Take
order
Order
taken
Tell
kitchen
wait wait
Serve food Serve food
eating eating