Slide 1

Slide 1 text

A short introduction to Petri Nets Mourjo Sen [email protected]

Slide 2

Slide 2 text

What a Petri Net is ▶ A directed bi-partite graph ▶ With two types of nodes: ▶ Places ▶ Transitions ▶ Arcs from places to transitions and vice versa ▶ Tokens placed inside places, or a marking ▶ Optional weights in arcs Cl 2 + H 2 → 2 HCl 2

Slide 3

Slide 3 text

What a Petri Net is 3 ▶ Mathematically, a petri net is a 5-tuple ▶ PN = (P, T, F, W, M 0 ) ▶ P = Finite set of places ▶ T = Finite set of transitions ▶ F = Finite set of arcs ▶ W: F → {1, 2, 3, …} is a weight function ▶ M 0 : P → {0, 1, 2, …} is the initial marking ▶ A petri net structure N =(P, T, F, W) is without any initial marking

Slide 4

Slide 4 text

Interpretations of Petri nets n Pre-conditions Event m Post-conditions 4

Slide 5

Slide 5 text

Interpretations of Petri nets n Input data Computation m Output data 5

Slide 6

Slide 6 text

Interpretations of Petri nets n Conditions Logic clause m Conclusions 6

Slide 7

Slide 7 text

Interpretations of Petri nets n Buffers Processor m Buffers 7

Slide 8

Slide 8 text

Interpretations of Petri nets n Resources needed Task/job n Resources released 8

Slide 9

Slide 9 text

Modeling Examples 9

Slide 10

Slide 10 text

Conflict (also called choice, decision) 10

Slide 11

Slide 11 text

Synchronization 11 e1

Slide 12

Slide 12 text

Parallel/Concurrent activities 12

Slide 13

Slide 13 text

Mutual Exclusion 13

Slide 14

Slide 14 text

Mutual Exclusion 14

Slide 15

Slide 15 text

Mutual Exclusion 15

Slide 16

Slide 16 text

Bounded buffers 16

Slide 17

Slide 17 text

Finite state machines 17 Finite State Machine Petri Net equivalent

Slide 18

Slide 18 text

Behavioral properties 18

Slide 19

Slide 19 text

Reachability set 19 ▶ Let M be a marking of a Petri net N = (P,T,F,W,M 0 ) ▶ The set of markings reachable from M is called the reachability set of M, written as reach(M) ▶ Reach(M) is the set of markings, such that: ▶ M ∈ reach(M), and ▶ If M’ → M’’ for some transition t ∈ T and M’ ∈ reach(M), then M’’ ∈ reach(M) ▶ The set of reachable markings of a petri net as a whole is defined to be reach(M 0 ) ▶ The “reachability problem” is to decide whether M ∈ reach(N), given a Petri net N and a marking M

Slide 20

Slide 20 text

Reachability graph 20

Slide 21

Slide 21 text

Boundedness 21 ▶ A place is called k-bounded or bounded if it does not contain more than k tokens in all reachable markings, including the initial marking ▶ It is said to be safe if it is one-bounded ▶ A (marked) Petri net is called (k-)bounded and/or safe if all of its places are (k-)bounded and/or safe.

Slide 22

Slide 22 text

Boundedness 22 If in the net N, both places are assigned capacity 2, we obtain a Petri net with place capacities, say N2 An unbounded petri net N A 2-bounded version N2

Slide 23

Slide 23 text

Liveness 23 A transition t in a Petri net N is said to be: ▶ L0-live or dead, if t can never be fired in any firing sequence ▶ L1-live or potentially fireable, if t can be fired at least once in some firing sequence of the Petri net ▶ L2-live, if for a given positive integer k, t can be fired at least k times in some firing sequence of the Petri net ▶ L3-live, if t can be fired infinite number of times in some firing sequence which can be obtained from M 0 of N ▶ L4-live, or live, if t is L1-live for every marking in reach(N)

Slide 24

Slide 24 text

Liveness 24 ▶ A Petri net is called Lk-live if every transition in the petri net is k-live, for k = 0, 1, 2, 3, 4 ▶ L4-liveness is the strongest ▶ L4-liveness ⇒ L3-liveness ⇒ L2-liveness ⇒ L1-liveness

Slide 25

Slide 25 text

Reversibility 25 A Petri net (N, M 0 ) is reversible if, in any marking M k reachable from initial marking M 0 , M 0 is reachable from Mk, that is, it is always possible to go back to the initial marking.

Slide 26

Slide 26 text

Persistence 26 ▶ A Petri net (N, M 0 ) is persistent if, for any two enabled transitions, the firing of one will not disable the other. ▶ An enabled transition, in such a petri net, stays enabled till it fires.

Slide 27

Slide 27 text

Synchronic Distance 27 ▶

Slide 28

Slide 28 text

Synchronic Distance 28

Slide 29

Slide 29 text

Conclusion: An example of a system computing (a+b)/(c+d) 29

Slide 30

Slide 30 text

A short introduction to Petri Nets Mourjo Sen [email protected] Thank You!