Date post: | 12-Jan-2016 |
Category: |
Documents |
Upload: | mervyn-ramsey |
View: | 213 times |
Download: | 0 times |
An Introduction to Petri Nets
An Introduction to Petri Nets
Marjan SirjaniMarjan SirjaniFormal Methods LaboratoryFormal Methods Laboratory
University of TehranUniversity of Tehran
An Introduction to Formal Methods
Spring 2006
Petri Net ReferencesPetri Net References
Tadao Murata, Tadao Murata, Petri nets: properties, Petri nets: properties, analysis and applicationsanalysis and applications, , Proceedings of the IEEE, 77(4), 541-Proceedings of the IEEE, 77(4), 541-80, April 1989.80, April 1989.
Wil van der Aalst, Wil van der Aalst, Process Modeling Process Modeling Using Petri NetsUsing Petri Nets, lecture notes., lecture notes.
An Introduction to Formal Methods
Spring 2006
IntroductionIntroduction
Petri Nets: Graphical Petri Nets: Graphical andand Mathematical modeling toolsMathematical modeling tools graphical toolgraphical tool
visual communication aidvisual communication aid
mathematical toolmathematical tool state equations, algebraic equations, etcstate equations, algebraic equations, etc
concurrent, asynchronous, concurrent, asynchronous, distributed, parallel, nondeterministic distributed, parallel, nondeterministic and/or stochastic systemsand/or stochastic systems
An Introduction to Formal Methods
Spring 2006
HistoryHistory 19621962: C.A. Petri’s dissertation (U. : C.A. Petri’s dissertation (U.
Darmstadt, W. Germany)Darmstadt, W. Germany) 19701970: Project MAC Conf. on Concurrent : Project MAC Conf. on Concurrent
Systems and Parallel Computation (MIT, Systems and Parallel Computation (MIT, USA)USA)
19751975: Conf. on Petri Nets and related : Conf. on Petri Nets and related Methods (MIT, USA)Methods (MIT, USA)
19791979: Course on General Net Theory of : Course on General Net Theory of Processes and Systems (Hamburg, W. Processes and Systems (Hamburg, W. Germany)Germany)
19801980: First European Workshop on : First European Workshop on Applications and Theory of Petri Nets Applications and Theory of Petri Nets (Strasbourg, France)(Strasbourg, France)
19851985: First International Workshop on : First International Workshop on Timed Petri Nets (Torino, Italy)Timed Petri Nets (Torino, Italy)
An Introduction to Formal Methods
Spring 2006
Informal Definition
The graphical presentation of a Petri net is a bipartite graph
There are two kinds of nodesPlaces: usually model resources or
partial state of the systemTransitions: model state transition and
synchronization Arcs are directed and always connect
nodes of different types
An Introduction to Formal Methods
Spring 2006
ExampleExample
p2
t1p1
t2
p4
t3
p3
An Introduction to Formal Methods
Spring 2006
StateState
The state of the system is modeled by marking the places with tokens
A place can be marked with a finite number (possibly zero) of tokens
An Introduction to Formal Methods
Spring 2006
FireFire
A transition t is called enabled in a certain marking, if:For every arc from a place p to t, there
exists a distinct token in the marking An enabled transition can fire and
result in a new marking Firing of a transition t in a marking is
an atomic operation
An Introduction to Formal Methods
Spring 2006
Fire (cont.)Fire (cont.)
Firing a transition results in two things:
1. Subtracting one token from the marking of any place p for every arc connecting p to t
2. Adding one token to the marking of any place p for every arc connecting t to p
An Introduction to Formal Methods
Spring 2006
NondeterminismNondeterminism
Execution of Petri nets is Execution of Petri nets is nondeterministicnondeterministic
1.1. Multiple transitions can be enabled at Multiple transitions can be enabled at the same time, any one of which can the same time, any one of which can firefire
2.2. None are required to fire - they fire at None are required to fire - they fire at will, between time 0 and infinity, or not will, between time 0 and infinity, or not at allat all
An Introduction to Formal Methods
Spring 2006
ElevatorElevator
An Introduction to Formal Methods
Spring 2006
One PhilosopherOne Philosopher
An Introduction to Formal Methods
Spring 2006
Four PhilFour Phil
An Introduction to Formal Methods
Spring 2006
Four Phil (cont.)Four Phil (cont.)
An Introduction to Formal Methods
Spring 2006
Formal DefinitionFormal Definition
A classical Petri net is a four-tuple A classical Petri net is a four-tuple (P,T,I,O) satisfying the following (P,T,I,O) satisfying the following conditions:conditions:
1.1. P is a finite set of places, and T is a P is a finite set of places, and T is a finite set of functionsfinite set of functions
2.2. I:P×T→N is a function which I:P×T→N is a function which determines the input multiplicity for determines the input multiplicity for each input arceach input arc
3.3. O:T×P→N is a function which O:T×P→N is a function which determines the output multiplicity determines the output multiplicity for each output arcfor each output arc
An Introduction to Formal Methods
Spring 2006
ExerciseExercise
Model a fair traffic lightModel a fair traffic light