Title: Petri Nets, Hybrid Functional Petri Nets
1Petri Nets, Hybrid Functional Petri Nets
- CS 6280 Lecture 2
- P.S. Thiagarajan
CS6280 Lecture 2
1
2Petri nets
- A well-established system model in CS.
- distributed discrete event systems.
- Has an appealing graphical representation (for
small models!). - Many variants
- Has been studied for a long time
- Applied in many settings
- http//www.informatik.uni-hamburg.de/TGI/PetriNets
/
2
3CS6280 Lecture 2
24.08.09
4System Biology Applications.
- Many !
- Ordinary Petri nets
- Metabolic pathway analysis
- Hybrid Functional Petri nets.
- signaling pathways
- Supported by the tool Cell Illustrator
- Stochastic Petri nets, Colored Petri nets,
4
CS6280 Lecture 2
24.08.09
5Petri Nets
- Finite State Machines (FSMs)
- (Global) states
- (Global) transitions
- Also called (finite) transition systems.
- Petri nets
- Local states
- Local transitions.
5
CS6280 Lecture 2
24.08.09
6FSM
Turn-on
Off
On
Turn-off
6
CS6280 Lecture 2
24.08.09
7State
a/a
Action Input/output
b/b
c
d
Transition
Initial state
7
CS6280 Lecture 2
24.08.09
8Key_on / Strt_Timer
wait
end_timer / alarm_on
Key_off OR belt_on / reset_timer
alarm
off
Alarm_10 OR belt_on OR key_off / alarm_off
8
CS6280 Lecture 2
24.08.09
9Petri Nets Local States and Transitions
a
s
s
a
s
s
9
CS6280 Lecture 2
24.08.09
10Local States and Transitions
s
e
The (local) state s currently holds. The event e
(labeled a) can occur when s holds. When e occurs
, s ceases to hold and s begins to hold. This
can be generalized in many ways!
10
CS6280 Lecture 2
24.08.09
11Transitions in Petri nets
b3
b1
b4
e
b2
b5
- e can occur when b1 and b2 hold.
- When e occurs b1 and b2 cease to hold b3, b4
and b5 - begin to hold.
11
CS6280 Lecture 2
24.08.09
12Transitions in Petri nets
b3
b1
b4
e
b2
b5
- e can occur when b1 and b2 hold.
- When e occurs b1 and b2 cease to hold b3, b4
and b5 - begin to hold.
12
CS6280 Lecture 2
24.08.09
13Transitions in a Petri net.
b3
b1
b4
e
b2
b5
- e can occur when b1 and b2 hold.
- When e occurs b1 and b2 cease to hold b3, b4
and b5 - begin to hold.
13
CS6280 Lecture 2
24.08.09
14Conflict
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- But only one of them can occur (due to the
shared b2) - Conflict!
14
CS6280 Lecture 2
24.08.09
15Conflict
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- But only one of them can occur (due to the
shared b2) - Conflict!
15
CS6280 Lecture 2
24.08.09
16Conflict
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- But only one of them can occur (due to the
shared b2) - Conflict!
16
CS6280 Lecture 2
24.08.09
17Conflict
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- But only one of them can occur (due to the
shared b2) - Conflict!
17
CS6280 Lecture 2
24.08.09
18Concurrency
- Both e and e are enabled.
- They can occur independently (in any order
with no - order,..)
- Concurrency!
18
CS6280 Lecture 2
24.08.09
19Markings
b3
b1
b4
e
b2
b5
19
CS6280 Lecture 2
24.08.09
20Markings
b3
b1
b4
e
b2
b5
20
CS6280 Lecture 2
24.08.09
21Markings
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- Both of them can occur one after another or
simultaneously with no order. -
21
CS6280 Lecture 2
24.08.09
22Markings
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- Both of them can occur one after another or
simultaneously with no order. -
22
CS6280 Lecture 2
24.08.09
23Markings
b3
b1
b4
e
b2
b5
e
b6
b7
- Both e and e are enabled.
- Both of them can occur one after another or
simultaneously with no order. -
23
CS6280 Lecture 2
24.08.09
24Self Loops
Producer
consumer
24
CS6280 Lecture 2
24.08.09
25Self Loops
Producer
consumer
25
CS6280 Lecture 2
24.08.09
26Self Loops
Producer
consumer
26
CS6280 Lecture 2
24.08.09
27Self Loops
Producer
consumer
27
CS6280 Lecture 2
24.08.09
28Arc Multiplicities
- t can occur whenever p1 contains at least 2
tokens and p2 contains at least one token - When t occurs (fires) 2 tokens are removed from
p1, 1 token from p2 3 tokens are added to p3, 1
tokens to p4, and 2 tokens to p5
24.08.2009
CS6280 Lecture 2
28
29Arc Multiplicities
24.08.2009
CS6280 Lecture 2
29
30Arc Multiplicities
24.08.2009
CS6280 Lecture 2
30
31Petri nets
- PN (P, T, F, Min)
- P, Places ------
- T, Transitions ---
- F, Flow Relations -
- Min P ? N 0,1,2,... initial marking (state)
24.08.2009
CS6280 Lecture 2
31
32An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
32
CS6280 Lecture 2
24.08.09
33An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
33
CS6280 Lecture 2
24.08.09
34An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
34
CS6280 Lecture 2
24.08.09
35An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
35
CS6280 Lecture 2
24.08.09
36An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
36
CS6280 Lecture 2
24.08.09
37An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
37
CS6280 Lecture 2
24.08.09
38An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
38
CS6280 Lecture 2
24.08.09
39An example
V2
V3
V1
S1
2S2
V4
S3
V3
S3
39
CS6280 Lecture 2
24.08.09
40- A Calcium (Ca2) channel is an ion channel which
displays selective permeabiltiy to calcium ions. - Inositol triphosphate (IP3) can open a Ca2
channel on ER and help pumping Ca2 from outside
to the cytosol.Â
CS6280 Lecture 2
24.08.09
41CS6280 Lecture 2
24.08.09
42Upside
- Concurrency modeling is important for producing
succinct descriptions.. - Petri nets are simple, expressive and capture the
basic concepts of causality, conflict and
concurrency elegantly. - They have an attractive visual representation
- A picture is worth a thousand words.
- But..
42
CS6280 Lecture 2
24.08.09
43Downside
- Petri net do not handle data abstractions well.
- Colored Petri nets.
- They do not support hierarchical structures well.
- Crucial for scaling up!
- These features can be added but
- Must preserve quantitative analysis methods!
43
CS6280 Lecture 2
24.08.09
44Additional Features
- Inhibitory arcs
- Read-only arcs
- Priorities
- Places/transitions/tokens with time.
44
CS6280 Lecture 2
24.08.09
45Inhibitory Arcs
2
Inhibitory arcs increase the modeling
power! Useful for pathway modeling Gene regulation
2
45
CS6280 Lecture 2
24.08.09
46Read (only) Arcs
2
2
Inhibitory arcs increase the modeling
power! Useful for pathway modeling (Enzymes!)
2
46
CS6280 Lecture 2
24.08.09
47Hybrid Functional Petri Nets
- HFPNs considerably extend the features of Petri
nets - Increased modeling power/decreased analysis
prospects. - Front end of Cell Illustrator
- Easy to translate structural (cartoon) diagrams
of bio-pathways to an HFPN model.
CS6280 Lecture 2
24.08.09
48Hybrid Functional Petri Nets
CS6280 Lecture 2
24.08.09
49Hybrid Functional Petri Nets
- Input Arcs (place to transition)
- normal
- From a discrete place to a discrete transition
- Continuous place to a discrete transition
CS6280 Lecture 2
24.08.09
50Hybrid Functional Petri Nets
- Input Arcs (place to transition)
- Continuous
- Continuous place to a continuous transition
CS6280 Lecture 2
24.08.09
51Hybrid Functional Petri Nets
- Input Arcs (place to transition)
- Test arc / Inhibition arc
- From any type of place to any type of transitions
- Test arc (with weight w) allows firing iff
content of input place is equal or more than w - Inhibitory arc (with weight w) allows firing iff
content of input place is less than w
Test arcs
Inhibitory arcs
CS6280 Lecture 2
24.08.09
52Hybrid Functional Petri Nets
- Output Arcs (transition to place)
- Discrete
- From a discrete transition to any kind of place
- Continuous
- Continuous transition to a continuous place
CS6280 Lecture 2
24.08.09
53Firing a discrete transition
- A Discrete transition T of HFPN
- Normal/Test input arcs a1,..,ap from places
P1,,Pp - Normal output arcs b1,,bq to places Q1,,Qq
- m1(t),,mp(t) contents of input places and
- n1(t),,nq(t) contents of output places
- Arc weight
- fi(m1(t),,mp(t)) gt 0 number of tokens to be
removed from Pi through arc ai - gj(m1(t),,mp(t)) gt 0 number of tokens to be
added to Qj through arc bj
CS6280 Lecture 2
24.08.09
54Firing a discrete transition
2
1
CS6280 Lecture 2
24.08.09
55Firing a discrete transition
2
1
CS6280 Lecture 2
24.08.09
56Firing a discrete transition
- A Discrete transition T of HFPN
- Discrete/Test input arcs a1,..,ap from places
P1,,Pp - Discrete output arcs b1,,bq to places Q1,,Qq
- m1(t),,mp(t) contents of input places
- n1(t),,nq(t) contents of output places
- Delay function
- d(m1(t),,mp(t)) a non-negative integer value
function - Arc weight
- fi(m1(t),,mp(t)) gt 0 number of tokens to be
removed from Pi through arc ai - gj(m1(t),,mp(t)) gt 0 number of tokens to be
added to Qj through arc bj
CS6280 Lecture 2
24.08.09
57Firing a discrete transition
2
1
3
Delay function
CS6280 Lecture 2
24.08.09
58Firing a discrete transition
After 3 seconds
2
1
3
Delay function
CS6280 Lecture 2
24.08.09
59Firing a continuous transition
- A Continuous transition T of HFPN
- Continuous/Test input arcs a1,..,ap from places
P1,,Pp - Continuous output arcs b1,,bq to places Q1,,Qq
- m1(t),,mp(t) contents of input places and
- n1(t),,nq(t) contents of output places
- Firing condition given by predicate
- c(m1(t),,mp(t))
- As long as predicate is true, transition fires
continuously - Firing speed
- fi(m1(t),,mp(t)) gt 0 speed of consumption from
Pi through ai - gj(m1(t),,mp(t)) gt 0 speed of production to Qj
through bj
CS6280 Lecture 2
24.08.09
60Firing a continuous transition
CS6280 Lecture 2
24.08.09
61Firing Transitions
CS6280 Lecture 2
24.08.09
62Michaelis-Menton Kinetics
k1
k2
E S
ES
E P
k -1
mass action law model
dS/dt -k1 ES k-1 (ES)
dES/dt k1 E.S (k-1 k2) ES
dE/dt -k1ES (k-1 k2) ES
dP/dt k2 ES
62
CS6280 Lecture 2
24.08.09
63The HPFN model
E
S
P
k1.SE
ES
k2ES
k-1ES
CS6280 Lecture 2
24.08.09
64The HPFN model of the Michaelis-Menten
Approximation
CS6280 Lecture 2
24.08.09
65Hybrid Functional Petri Nets
- Enhances modeling power
- Protein concentration changes
- Discrete transcriptional switches
- Reduced analytic capabilities
- Reachability analysis, S-invariants,
T-invariants etc. become irrelevant. - Exposes the structural relationsships, locality
and flow of information in bio-pathways.
CS6280 Lecture 2
24.08.09
66Other variants
- Stochastic Petri nets
- Transitions occur probabilistically.
- Will consider them when we deal with stochastic
simulations (Gillespies algorithm) - Colored Petri nets
- Process algebras.
CS6280 Lecture 2
24.08.09