mapping petri nets into event graphs. alternative implementations activity world view petri net...

37
Mapping Petri Nets into Event Graphs

Post on 22-Dec-2015

241 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

Mapping Petri Netsinto

Event Graphs

Page 2: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 3: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

Transitions become timed edges

Places become conditional edges

PN->EG MAPPING

Page 4: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

PN->EG Mapping: eg. G/G/s queue

PN:

Q

sTaT

S

A

Page 5: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

PN->EG Mapping: eg. G/G/s queue

PN:

EG:

Q

sTaT

S

A

{A--} {A++, Q++}

{Q--, S--}

{S++}

TsaT

Page 6: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 7: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

PN->EG Mapping: eg. G/G/s queue

(S&Q)(A)

(S&Q)

{A--} {A++, Q++}

{Q--, S--}

{S++}

TsaT

Variable A is unnecessary!

Page 8: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

PN->EG Mapping: eg. G/G/s queue

(S&Q)

(S&Q)

{ Q++} {Q--, S--}

{S++}

TsaT

Empty Vertex is unnecessary!

Page 9: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

PN->EG Mapping: eg. G/G/s queue

(S&Q)

(S&Q)

{ Q++} {Q--, S--}

{S++}

TsaT

S&Q conditions redundant too...

Page 10: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 11: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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.

Page 12: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

Analytical Methods and Conditions

• PNsReachabilty, decidability, liveness, and

deadlock

• EGsState definition, event reduction, priorities,

equivalence, boundary conditions, resource deadlock, MIP representations

Page 13: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

...

Page 14: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 15: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

Each transition becomes a timed edge...

ta

A Q1

R1

ta ts1

Q2

R2

Bts20

W

ts1 0 ts2

Page 16: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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)

Page 17: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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)

Page 18: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

{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)

Page 19: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

{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

Page 20: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

ImplicationsPN analysis of Event Graphs

State reachability LivenessDeadlock

EG analysis of Petri NetsState spaceModel reductionEquivalenceBoundary ConditionsResource Deadlock

Page 21: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

Petri Net Simulator

Page 22: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

tf t r

tf tr

Fail-Repair PN:

EG:

0

0

a A B C

D

(A&!B)

(D&B) (C)

(D&B)

Page 23: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 24: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

PN->EG Mapping

Reduced EG Failure-Repair Model

{N- -} {N++}

tf

trFail Fix

Page 25: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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)

Page 26: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 27: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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)

Page 28: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

EG -> PN Mapping

QUEUE START FINISHt

t

(Q)

(S) s

a

{Q=Q+1} {Q=Q - 1, S=S - 1}

{S=S+1}

Page 29: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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”

Page 30: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

?

Page 31: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

?

Page 32: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

?

Page 33: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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)

Page 34: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 35: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 36: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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

Page 37: Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent

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