mapping petri nets into event graphs. alternative implementations activity world view petri net...
Post on 22-Dec-2015
241 views
TRANSCRIPT
Mapping Petri Netsinto
Event Graphs
Alternative ImplementationsActivity World View
Petri Net Formalism: Simple fundamental elements and behaviorConcurrent resource usage and contention
Event Scheduling ViewEvent Graph Formalism:
Simple fundamental element and behaviorConcurrency and contention - large model
representations
Transitions become timed edges
Places become conditional edges
PN->EG MAPPING
PN->EG Mapping: eg. G/G/s queue
PN:
Q
sTaT
S
A
PN->EG Mapping: eg. G/G/s queue
PN:
EG:
Q
sTaT
S
A
{A--} {A++, Q++}
{Q--, S--}
{S++}
TsaT
PN->EG Mapping: eg. G/G/s queue
PN:
EG:
Q
sTaT
S
A
(S&Q)(A)
(S&Q)
{A--} {A++, Q++}
{Q--, S--}
{S++}
TsaT
PN->EG Mapping: eg. G/G/s queue
(S&Q)(A)
(S&Q)
{A--} {A++, Q++}
{Q--, S--}
{S++}
TsaT
Variable A is unnecessary!
PN->EG Mapping: eg. G/G/s queue
(S&Q)
(S&Q)
{ Q++} {Q--, S--}
{S++}
TsaT
Empty Vertex is unnecessary!
PN->EG Mapping: eg. G/G/s queue
(S&Q)
(S&Q)
{ Q++} {Q--, S--}
{S++}
TsaT
S&Q conditions redundant too...
PN->EG Mapping: eg. G/G/s queue
(Q)
(S)
{ Q++} {Q--, S--}
{S++}
Ts
aT
Result: a conventional G/G/s queue EG model
P = set of Places, T = set of transitions in PN d(t) = delay time (RV) for transition tT {Ip(t),Op(t)}= Set of Input and Output Places for tT {It(p),Ot(p)}= Set of Input and Output Transitions for pP
Step 0. pP: define an integer state variable, X(p). Step 1. tT: create an edge (O(t), D(t)) with delay d(t). Step 2. pP with unique (It(p),Ot(p)) pair: create the edge
(D(It(p)),O(Ot(p))) with the condition that all pIp(Ot(p)) are marked. (For inhibitor arcs these places must not be marked.)
Step 3. Add State changes: for O(t), decrement X(p) pIp(t); for D(t), increment X(p) pOp(t).
PNEG MAPPING
Advanced homework: Confirm this or find a counter example.
Analytical Methods and Conditions
• PNsReachabilty, decidability, liveness, and
deadlock
• EGsState definition, event reduction, priorities,
equivalence, boundary conditions, resource deadlock, MIP representations
COMMUNICATIONS BLOCKING(R1 needs empty buffer to Start)
R1,R2 = Number of idle resources
Q1,Q2 = Number of waiting jobs
B = Number of empty buffer spaces
......
ta,ts1,ts2 = Arrival and processing times
...
COMMUNICATIONS BLOCKING: Petri Net
A Q1
R1
ta ts1
Q2
R2
Bts20
W
Q1 = number of jobs waiting in queue 1Q2 = number waiting in queue 2R1 = idle resources for step 1R2 = idle resources for step 2B = available buffer slots
Each transition becomes a timed edge...
ta
A Q1
R1
ta ts1
Q2
R2
Bts20
W
ts1 0 ts2
Next, each place becomes a conditional edge...(ALL input places marked is condition)
A Q1
R1
ta ts1
Q2
R2
Bts20
W
(A)
(Q1&R1&B)
ta ts1 0 ts2
~
~
~
~
~~
~
(Q1&R1&B)
(Q1&R1&B)
(Q2&R2)
(Q2&R2)
(W)
ta
Mapping Petri Net to Event GraphFinally, increment and decrement tokens as state changes
{A++,Q1++}
{Q1--,R1--.B--}
{A--} {R1++,Q2++}
{R2--Q2--}
{R2++}
A Q1ta ts1
Q2
Bts20
W
ta ts1 0 ts2
~
~
~
~
~~
~(Q1&R1&B)
(Q1&R1&B)
(Q2&R2)
(Q2&R2)
(W)
R1 R2
{W++B++}
{W--}
(Q1&R1&B)
(A)
{A++,Q1++}
{Q1--,R1--.B--}
{A--} {R1++,Q2++}
{R2--Q2--}
{R2++}
ta ts1 0 ts2
~
~
~
~
~~
~
(Q1&R1&B)
(Q1&R1&B)
(Q2&R2)
(Q2&R2)
(W)
{W++B++}
{W--}
(Q1&R1&B)
(A)
Final Event Graph: How can this be simplified? (ref: Seila, et. al. Text)
{Q1++} {Q1--,R1--.B--}
{R1++,Q2++}
{R2--Q2--B++}
{R2++}
ta ts1ts2~
~
~
~
~
(R1&B)
(Q1&B)
(R2)
(Q2)
(Q1&R1)
A Simplified Event Relationship Graph
ImplicationsPN analysis of Event Graphs
State reachability LivenessDeadlock
EG analysis of Petri NetsState spaceModel reductionEquivalenceBoundary ConditionsResource Deadlock
Petri Net Simulator
tf t r
tf tr
Fail-Repair PN:
EG:
0
0
a A B C
D
(A&!B)
(D&B) (C)
(D&B)
PN->EG Mapping
Transformed EG Failure-Repair Model
A++B++
A--B--D-- C++ C-- D++
(A&&!B)
(B&&D) (C)
(A&&!B) (B&&D)
D=3
/ /
/ /
/ /
/ /
/ /0
PN->EG Mapping
Reduced EG Failure-Repair Model
{N- -} {N++}
tf
trFail Fix
EG -> PN MappingConditions:
Need to have non-negative, integral state changesTest only for non-negativity of integersNeeds to “edge bi-partite” pure-timed and pure-
conditional edges alternateSingle state change at each vertex - upstream of
timed decrement, downstream of timed incrementExpansion Algorithm of Yucesan and Schruben
Add conditions upstream when breaking up a self-scheduling edge (Yucesan and Schruben)
EG -> PN Mapping
1. Split all self-scheduling edges (add conditions upstream of new vertex)
2. Add void edges (either conditional or timed but not both) to make graph “edge-bipartite” (expansion rules)
3. Timed edges become transitions and conditional edges become places
EG -> PN Mapping
EG->PN not possible
(Q>0 )
(S>0)
ENTER
{Q=Q+1} {S=0 ,Q=Q- 1} {S=1}
ta
tsSTART LEAVE
(CLK<100)
EG -> PN Mapping
QUEUE START FINISHt
t
(Q)
(S) s
a
{Q=Q+1} {Q=Q - 1, S=S - 1}
{S=S+1}
EG -> PN Mapping
QUEUE START FINISHt
t
(Q)
(S) s
a
{Q=Q+1} {Q=Q - 1, S=S - 1}
{S=S+1}
QUEUE START FINISH
tt
(Q)
(S) s
a
?
“Edge Bipartite”
EG -> PN Mapping
QUEUE START FINISHt
t
(Q)
(S) s
a
{Q=Q+1} {Q=Q - 1, S=S - 1}
{S=S+1}
QUEUE START FINISHt
(Q)
(S) s
t a t s
Timed Edges become
Transitions
t a
?
EG -> PN Mapping
QUEUE START FINISHt
t
(Q)
(S) s
a
{Q=Q+1} {Q=Q - 1, S=S - 1}
{S=S+1}
QUEUE START FINISHt
(Q)
(S) s
t a t s
Conditional Edges become
PN places
???
t a
?
EG -> PN Mapping
QUEUE START FINISHt
t
(Q)
(S) s
a
{Q=Q+1} {Q=Q - 1, S=S - 1}
{S=S+1}
Q
S
?
QUEUE START FINISHt
(Q)
(S) s
t a t s
State changeson conditional edges
determine labels
t a
?
Run Enter Start1 End1 Start2
End2
ta
ts1
ts2
~~
~
~
~(i)
COMMUNICATIONS BLOCKING: Edges Mapped from Petri Net
Conditions to Start “Activities”:
(i )= (R1&B&Q1)
(ii) = (R2&Q2)
(i)
(i)
(ii)
(ii)
Run Enter Start1 End1 Start2
End2
{R1=1,R2=1,B=4}
{Q1--}
{R1--,B--,
Q1--}{R1++,Q2++}
{R2--,Q2--}
{R2++,B++}
COMMUNICATIONS BLOCKING: State Changes
R1,R2 = Number of idle resources
Q1,Q2 = Number of waiting jobs
B = Number of empty buffer spaces
Run Enter Start1 End1 Start2
End2
{R1=1,R2=1,B=4}
{Q1--}
{R1--,B--,
Q1--}{R1++,Q2++}
{R2--,Q2--}
{R2++,B++}
ta
ts1
ts2
~~
~
~
~(R2&Q2)
(R1&B&Q1)
(R2&Q2)
(R1&B&Q1)
(R1&B&Q1)
COMMUNICATIONS BLOCKING: Final EGM Model
R1,R2 = Number of idle resources
Q1,Q2 = Number of waiting jobs
B = Number of empty buffer spaces
Using Activity Scanning to Develop Process Models
“Color” tokens that represent Transient Entities - - track these tokens’ paths.Parse Activities into “SEIZE”, “DELAY” and “RELEASE” Blocks.
SEIZE
DELAY
RELEASE
Idle Resources
Queue
Process -> EG Mapping
Process World View:Automated SLAM to Event Graphs
(Woodward and Mackulak, ASU)
Resource deadlock detection
SIMAN to Event Graphs (Barton and Gonzalez, PSU)
Premature run termination