1 Petri Nets Ina Koch and Monika Heiner. 2 Petri Nets(1962) Carl Adam Petri.

Post on 29-Jan-2016

245 views 0 download

Tags:

Transcript of 1 Petri Nets Ina Koch and Monika Heiner. 2 Petri Nets(1962) Carl Adam Petri.

1

Petri NetsIna Koch and Monika Heiner

2

Petri Nets(1962)

Carl Adam Petri

3

Outline

basic definition structural analysis biological network with Petri

net

4

Petri net

Definition : PN = (P, T, f, m0) Two type nodes Set : P (Places) ; T (transition

s) Edges Set : f (set of directed arcs) m0 : initial marking(tokens)

5

Example

p1 p2

p3

t1

t2

PN = ( P,T,F,M0 )P = { p1,p2,p3 }T = { t1,t2}F = {(p1,t1),(p2,t1),(t1,p3), (p3,t2),(t2,p1),(t2,p2)}M0(p1) = 1M0(p2) = 1M0(p3) = 0

Arcs only connect of different type

6

Firing rule

Definition A transition t is enabled in a marking m

m[t>,if ∀p ∈ •t : f (p, t) ≤ m(p). transition t,which is enabled in m, may fire.

When t in m fires : m[t>m’,with∀p ∈ P : m’(p) = m(p) − f (p, t) + f (t, p).

7

Example:

firing

2NAD+ + 2H2O → 2NADH + 2H+ + O2

8

Concurrent Firing actions

partial order

(r1 ,r2); (r1 ,r3);

r2,r3 can fire independently

9

Behavioral Properties

Reachability liveness, reversibility Boundedness others

10

Behavioral Properties :Reachability Marking M is reachable from

marking M0 if there exists a sequence of firings

M0 t1 M1 t2 M2… M that transforms M0 to M.

[M0> Set of marking M reachable from M0

11

Behavioral Properties :Reachability

p1 p2

p3

t1

t2

p4

p1 p2

p3

t1

t2

p4

p1 p2

p3

t1

t2

p4

[M0> = R(M0)={(1 1 0 0) , (0 0 1 0) , (1 0 0 1) }

12

Behavioral Properties :Liveness

Definition: Liveness of transitions A transition t is dead in a marking m, if it is not e

nabled in every marking m’ reachable from m: ∃ m’ ∈ [m> : m’[t> m’ ∈ [m> : m’[t>

A transition t is live, if it is not dead in any marking reachable from m0

13

Behavioral Properties :Liveness

Definition: Liveness of Petri net Deadlock-free (weakly live) :

if there are no reachable dead markings. (marking m is dead if there is no transition enabled in m)

Live (strongly live) : if each transition is live

14

Examples

Weakly live

15

Behavioral Properties :Reversibility

Definition : A Petri net is reversible:

∀m ∈ [m0> : m0 ∈ [m>

dead nonlive live

Not reversible

X

16

Behavioral Properties :Boundedness

Definition : place p is k-bounded :

if ∃k ∈ postive integer : ∀m ∈ [m0> : m(p) ≤ k Petri Net is k-bounded :

if all its places are k-bounded

17

Unbounded

18

Unbounded

19

Unbounded

20

Unbounded

21

Structural Analysis

ordinary : A Petri net is ordinary, if all arc weights are equal

to 1 Pure:

A Petri net is pure, if there are no two nodes, connected in both directions

conservative: A Petri net is conservative, if all transitions fire token-pr

eservingly

22

Structural Analysis (cont’s)

connected : A Petri net is connected, if it holds for all pairs of node

s a and b that there is an undirected path from a to b. Strongly connected:

A Petri net is strongly connected, if it holds for all pairs of nodes a and b that there is an directed path from a to b.

free of boundary nodes: A Petri net is free of boundary nodes, if there are no tr

ansitions without pre-/postplaces and no places without pre/posttransitions

23

Structural Analysis (cont’s) free of static confilct :

A Petri net is free of static conflicts, if there are no two transitions sharing a preplace..

24

Structural Analysis (cont’s) structural deadlock :

D ⊆ P , •D ⊆ D •

trap : Q ⊆ P , Q • ⊆ • Q

25

example

structural deadlock :

D ={A,B}, •D ={r1,r2}, D • ={r1,r2,r3} : •D ⊆ D •

trap :

Q ={C,D,E}, Q•={r4,r5}, •Q ={r1,r3,r4,r5} : Q• ⊆•Q

26

matrix representation

• matrix entry cij :

token change in place pi by firing of transition tj• matrix column Δtj:

vector describing the change of the whole marking by firing of tj

27

incidence (stoichiometric) matrix

28

T-invariants integer solutions y :( y is transition

vector) C • y= 0, y≠ 0, y ≥ 0

1y1 −3y2 +3y3 = 02y1 −2y2 = 0−2y1 +3y3 = 0+2y2 −3y3 = 0+2y2 −3y3 = 0

29

P-invariants integer solutions x : ( x is place vector)

x • C= 0, x≠ 0, x ≥ 0

x1 +2x2 −2x3 = 0−3x1 −2x2 +2x4 +2x5 = 03x1 +3x3 −3x4 −3x5 = 0

30

covered by invariants

Definition : A Petri net is covered by p-invariants—

CPI, if every place belongs to a p-invariant A Petri net is covered by t-invariants—CTI, if every transition belongs to a t-

invariant.

31

exampleP-invar solutions

(2, 0, 1, 0, 3)=>{A,C,E}

(0, 1, 1, 0, 1)=>{B,C,E}

(2, 0, 1, 3, 0)=>{A,C,D}

(0, 1, 1, 1, 0)=>{B,C,D}

T-invar solutions

(3,3,2)=>{r1,r2,r3}

32

Reachability graph Let N = (P, T, f,m0) be a Petri net. The reachability

graph of N is the graph RG(N) = (VN,EN ), where VN := [m0> is the set of nodes, EN := {(m, t,m’) | m,m’ ∈ [m0,

t ∈ T : m[t>m’} is the set of arcs.

33

Reachability graph 1.k-bounded:

iff there is no node in the reachability graph with a token number larger than k in any place.

2. reversible: iff the reachability graph is strongly connected.

3.deadlock-free: iff the reachability graph does not contain nod

es without outgoing arcs.

34

Reachability graph

35

Different type of biological network

metabolic networks

signal transduction networks

gene regulatory networks

36

Pathway vs Network Network

cell behavior or the whole model of a cell Pathway

represents functional subnetwork Network may consist of several pathways

37

Hypergraph to Petri Nets