Introduction to Petri Nets - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Introduction to Petri Nets

Description:

Title: Introduction to Petri Nets Last modified by: Hugo Andres Lopez Document presentation format: Personalizado Other titles: Chalkboard Pro W3 ... – PowerPoint PPT presentation

Number of Views:192
Avg rating:3.0/5.0
Slides: 32
Provided by: ituDkpeopl
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Petri Nets


1
Introduction to Petri Nets
  • Hugo Andrés López
  • lopez_at_dit.unitn.it

2
Plan for lectures
  • 6th November 07
  • Informal Introduction, Intuitions.
  • Formal definition
  • Properties for PNets.
  • 8th November 07
  • Examples on specifications.
  • Analysis Techniques
  • Applications.
  • Petri Net Variants.

3
The Scheduler
Deadlock-free
  • A marked PNet is deadlock free iff for every
    marking mi there is a successor marking mi1.
  • No deadlock-free marked PNet is terminating
  • (but the converse does not necessarily hold)

4
The Scheduler
Liveness
  • Every live marked PNet is deadlock-free
  • (this does not hold for nets without transitions)

A marked PNet is live iff there is no reachable
marking where a transition is dead (cannot become
enabled again)
5
The Scheduler
Reversibility
  • A marked PNet is reversible iff
  • from any marking it is possible to reach the
    initial marking

1-safe non reversible PNet
Unbounded non reversible PNet
6
Behavioural Properties of Marked Petri Nets
  • A marked p/t-net is
  • terminating if there is no infinite occurrence
    sequence
  • deadlock-free if each reachable marking enables
    a transition
  • live if each reachable marking enables an
    occurrence sequence containing all transitions
  • bounded - if, for each place p, there is a bound
    b(p) s.t. m(p) lt b(p) for every reachable
    marking m
  • 1-Safe - if b(s) 1 is a bound for each place s
  • Reversible if m0 is reachable from each other
    reachable marking

7
Analysis Techniques
  • Petri Nets as powerful models for
  • Simulation. ----(Execution of the token
    game)
  • Verification.
  • Techniques
  • Marking Graphs
  • Place/Transition Invariants
  • Causal Semantics.
  • ...

8
Marking Graph
  • A PNet can be represented as a graph connecting
    markings and transitions.
  • Initial vertex m0
  • Vertices reachable markings mi
  • Labeled edges tuples ltmi,t,mjgt

9
Representing Properties
  • Instead of inspecting PNets, inspect the marking
    graph.


A marked PNet is deadlock-free if and only if
its marking graph has no vertex without successor
Deadlock-Free

A marked PNet is reversible iff its marking graph
is strongly connected
Reversibility
10
Linear-Algebraic Representation of PNets
  • Firing a transition can be represented as an
    algebraic operation between the marking and the
    transition.

M0 lt 4, 0, 0, 0, 1gt t2 lt-1, 1, 1, 0, -1gt
t
S
The composition of transitions can be seen as a
sum of vectors
t
S
See Van Der Aalst Tutorial
11
Linear-Algebraic Representation of PNets
  • Firing a transition can be represented as an
    algebraic operation between the marking and the
    transition.

Marking equation
A marking M is only reachable from M0 if
12
Place Invariants
  • Critical Places P2,P4.
  • A place invariant will constraint the markings
    for a set of critical places.
  • Place Invariant m(P2) m(P4) lt 1

13
Place Invariants
for N, the sum of P2, P4 and P4 do not change
14
Transition Invariants
  • A transition invariant is a Parikh vector J such
    that any firing sequence s with J enabled in a
    marking M brings the system back to M.

j1 lt1,1,0,0gt (either allocation or deallocation
of a resource) j2 lt0,0,1,1gt j3 lt2,2,1,1gt
(multiple resources enable multiple firings)
15
Applications
  • Modelling
  • Place passive element
  • Transition active element
  • Arc causal relation
  • Token elements subject to change
  • The state (space) of a process/system is modeled
    by places and tokens and state transitions are
    modeled by transitions (cf. transition systems).

16
Modelling
  • a physical object, for example a product, a part,
    a drug, a person
  • an information object, for example a message, a
    signal, a report
  • a collection of objects, for example a truck with
    products, a warehouse with parts, or an address
    file
  • an indicator of a state, for example the
    indicator of the state in which a process is, or
    the state of an object
  • an indicator of a condition the presence of a
    token indicates whether a certain condition is
    fulfilled.

17
Modelling (II)
  • a type of communication medium, like a telephone
    line, a middleman, or a communication network
  • a buffer for example, a depot, a queue or a post
    bin
  • a geographical location, like a place in a
    warehouse, office or hospital
  • a possible state or state condition for example,
    the floor where an elevator is, or the condition
    that a specialist is available.

18
Modelling (III)
  • an event for example, starting an operation, the
    death of a patient, a change seasons or the
    switching of a traffic light from red to green
  • a transformation of an object, like adapting a
    product, updating a database, or updating a
    document
  • a transport of an object for example,
    transporting goods, or sending a file.

19
PNets Variants
Extensions of Petri nets for
  • zero-testing conditions.
  • Compacting Models.
  • Reflecting temporal aspects
  • Structuring large models, cf. top-down and
    bottom-up design

20
Zero-Testing
  • The transition t will be fired whenever the event
    is out of tokens.

21
Compacting Models
  • More agents, more interactions HUGE models

22
Timing aspects
  • How to model event duration? How to model
    deadlines? delays?

??
23
Modularization
  • How to re-use a Petri-net? how to
    compact/hierarchize it?

24
Color Petri Nets
  • Extension for modelling different data structures
    in a single PNet.
  • Coloured tokens (instances).
  • Coloured Places (restrict tokens).
  • Transition Includes a Coloring Function (Color
    the e according to the events of e).

25
CPN (II)
  • Example (assembly line)

26
CPN (III)
27
Modular PNets
  • colored Petri nets result in more compact models.
  • However, for complex systems/processes the model
    does not fit on a single page.
  • Moreover, putting things at the same level does
    not reflect the structure of the process/system.
  • Many hierarchy concepts are possible. In this
    course we restrict ourselves to transition
    refinement.

28
Modular PNets
tl1
tl2
29
Timed Petri Nets
  • Each token has a timestamp.
  • The timestamp specifies the earliest time when it
    can be consumed.
  • The transition consumes x units of time (firing
    time) with a possible delay (_at_).

4
x_at_
2
30
Timed Petri Nets
  • The enabling time of a transition is the maximum
    of the tokens to be consumed.
  • If there are multiple tokens in a place, the
    earliest ones are consumed first.
  • A transition with the smallest firing time will
    fire first.
  • Transitions are eager.
  • The timestamp of a produced token is the firing
    time plus its delay.

31
Timed Petri Nets (III)
32
Bibliography
  • J.L. Peterson. Petri Nets. Computing Surveys,
    Vol. 9 No. 3, 1977.
  • Wil van Der aalst. Petri Nets Refresher.
    Eindhoven University of Technology, Faculty of
    Technology Management,
  • Balbo et al. Lecture notes of the 21st. Int.
    Conference on Application and Theory of Petri
    Nets. 2000.
  • The World of Petri netshttp//www.daimi.au.dk/Pe
    triNets/
  • C. Ling. The Petri Net Method. http//www.utdallas
    .edu/gupta/courses/semath/petri.ppt
Write a Comment
User Comments (0)
About PowerShow.com