petri nets an overview ie 680 presentation april 30, 2007 renata kopach- konrad

34
Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Post on 22-Dec-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Petri NetsAn Overview

IE 680 PresentationApril 30, 2007

Renata Kopach- Konrad

Page 2: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Overview

• The building blocks of Petri Nets• An example• Analysis tools• Extensions• Elements of steady-state

simulation theory for SPNs

Page 3: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

What are Petri Nets?

• Mathematical modeling tools that capture operational dynamics of discrete event systems

• Graphical Representation• Modeling Language• State-transition mechanism• Event Scheduling

mechanism

Not this kind of Petri!

Page 4: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Applications

• Software design• Workflow management• Data Analysis• Reliability Engineering

Page 5: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Suitable for Modeling

• Concurrency• Synchronization• Precedence• Priority• Bottom up and top-down modeling

Page 6: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Modeling Tool: Petri Nets

• Supports modularity and abstraction• Supports system simulation• Supports formal analysis for operational

properties such as boundedness, liveness, reachabiltiy, etc.

• Petri Nets have a rich research literature

Page 7: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

What is a Petri Net?

Page 8: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

System State: Tokens and Net Marking

Page 9: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Initial State: (1,1,2,1)

t2 is enabled

Page 10: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Fire t2, New State: (1,0,3,2)

Page 11: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Fire t3, New State: (2,0,2,2)

Page 12: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Fire t1, New State: (1,2,2,2)

Page 13: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Fire t4, New State: (1,3,2,0)

Page 14: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

In the context of DES

• Marking of the SPN = state of the system

• Firing of a transition = occurrence of an event

Page 15: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Notation…

A Petri net is a 5-tuple , where• S is a set of places• T is a set of transitions • F is a set of arcs s.t.• M0 is an initial marking

• W is the set of arc weights/transition matrix/incidence matrix

Page 16: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

…allows for many things

The state of a net is an M vector so

State equations are possible

• Where is how many times each transition fires

• WT state transition matrix

Page 17: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

• S={p1,p2,p3,p4} T={t1,t2,t3,t4}

• F={(p1,t1) (p2,t2) (p3,t3) (p4,t4) (t1,p2)(t2,p3)(t2 p4) (t3,p1) (t4,p2)}

2010

0110

1012

0101

CW

M0 Initial state (1,1,2,1)σ Firing sequence (t2 t3 t1 t4)Mn Final state (1,3,2,0)

Page 18: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Analysis Techniques

• Reachability: used to find erroneous state (Karp and Miller, Hack)

• Liveness: related to deadlock• Boundedness: if the # of tokens in

any place cannot exceed k. (Covering)

• Fairness: will there be an infinite sequence?

Page 19: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

1

1

1

1

*

2010

0110

1012

0101

1

2

1

1

0

2

3

1

Reachability

How do we get there? What

sequence of event firings will get us to

the final state?

Final State

Starting State (Initial

Marking)

Page 20: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Reachability Example• Obtain the min sequence of events

(transition firings) from an initial state to a final state

• MIP Problem: solved multiple times• Constraints: State Equations• Objective Function: minimize the

difference between the final and the intermediate state

Page 21: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

An example

Page 22: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Part 1: Min number of events – Finding the Parikh Vector

• Min

my

y

y

...

...2

1

m

...

...2

1

mn

......

...

...

...11

nx

x

x

...

...2

1

+

n

jjx

1

S.t.

X j>= 0 j Є J, Є Zwhere,αi >= 0 initial marking (given) i Є I yi >= 0 final marking (given) i Є I, ZФij- coefficient on the Incidence Matrix for place i, transition j; i Є I, j Є J,

x is the number of times transition j fires j Є J

=

Page 23: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Part 2: Identifying the Sequence of Events using

MIPConstraint (i) state equationConstraint (ii) limits the transitions

per sequence to 1. Constraint (iii) enforces the total

number of times a transition can fire across all sequences to be equal to the PV

Page 24: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Many extensions are possible

• Coloured • Hierarchy• Prioritized• Timed Petri Nets

• Stochastic

Page 25: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

The Stochastic Element

• Clocks

• X(t) is the marking process of an SPN

Ref: Haas, 2004 page 102

Page 26: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

A Queuing Example

The SPN of the model is

Ref: Haas, 2004 page 103

2 Service Centers

N(>2) jobs

p: rework at Center 1

Page 27: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Stability and Simulation

• Interested in performance characteristics

• Typically interested in terms of the marking process

• Can apply• Regenerative Simulation Method

Page 28: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

][

][

NE

LE

Expected value of data collected in regenerative interval

Expected number of data

Concerns:

How do you find regenerative point in an SPN?

Page 29: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Key Assumptions

There exists • a marking• set of transitions

Such that the marking process probability restarts whenever the marking is and the transitions in fire simultaneously.

s

E

s

E

Page 30: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Regenerative method for the Marking Process

1. Select a sequence of regeneration points for the process 2. Simulate the process and observe a

fixed number n of cycles defined by the random times

3. Compute the length of the kth cycle and the quantity

4. Form the strongly consistent point estimate (e.g. using jackknife method)

5. Haas (2004) provides the theorem for defining the sequence of regeneration points for a marking process

0:)( ttX

0: kTk

0:)( ttX

0: kTk

k

k

T

T

k duuXffY1

))(()(

Page 31: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Challenges

• Difficult to identify regeneration points in practice

• Can be long intervals/ high utilization

• Haas suggests using Standardized Time Series

Page 32: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Software

• STNPlay• CPNTools (Colored PNs)• Petri Net Kernel (in Java)• YASPER (workflow analysis)

Page 33: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

Summary

• Petri Nets are a powerful modeling tool

• Many extensions are possible• Allows for rigorous formulalism

Page 34: Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad

References

• J. Peterson. Petri Net Theory and the Modeling of Systems. Prentice Hall. 1981

• T. Murata, “Petri nets: Properties, Analysis And Applications”, Proc. Of The IEEE, Vol. 77 No.4, pp. 541-580, April 1989.

• C. Cassandras. Discrete Event Systems: Modeling and Performance Analysis. Homewood, IL: Richard D. Irwin, Inc., and Aksen Associates, Inc., 1993.

• P. Haas, “Stochastic Petri Nets for Modelling and Simulation,” Proc. Of the 2004 Winter Simulation Conference, Washington, D.C, pp. 101-112, December 2004.