IE 469 Manufacturing Systems

Slides:



Advertisements
Similar presentations
School of Computer Science & Software Engineering
Advertisements

Distributed Snapshots: Determining Global States of Distributed Systems - K. Mani Chandy and Leslie Lamport.
Techniques to analyze workflows (design-time)
1 SE-561 Formal Methods in Software Petri Nets - I.
An Introduction to Petri Nets
Introduction to Petri Nets Hugo Andrés López
A university for the world real R © 2009, Chapter 3 Advanced Synchronization Moe Wynn Wil van der Aalst Arthur ter Hofstede.
Petri Nets Section 2 Roohollah Abdipur.
Based on: Petri Nets and Industrial Applications: A Tutorial
26 September 2003U. Buy -- SEES 2003 Sidestepping verification complexity with supervisory control Ugo Buy Department of Computer Science Houshang Darabi.
A Novel Method For Fast Model Checking Project Report.
Chapter 3 Petri nets Learning objectives : Introduce Petri nets
Merged Processes of Petri nets Victor Khomenko Joint work with Alex Kondratyev, Maciej Koutny and Walter Vogler.
Soundness problem for Resource-Constrained Workflow nets.
Discrete Interaction Design Specification Prof. Dr. Matthias Rauterberg Faculty Industrial Design Technical University of Eindhoven
Lei Bu Petri Nets 11 Dining Philosphier 4 States , 5 transitions.
Petri net modeling of biological networks Claudine Chaouiya.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
Petri Nets Overview 1 Definition of Petri Net C = ( P, T, I, O) Places P = { p 1, p 2, p 3, …, p n } Transitions T = { t 1, t 2, t 3, …, t n } Input.
CS447/ECE453/SE465 Prof. Alencar University of Waterloo 1 CS447/ECE453/SE465 Software Testing Tutorial Winter 2008 Based on the tutorials by Prof. Kontogiannis,
Using Interfaces to Analyze Compositionality Haiyang Zheng and Rachel Zhou EE290N Class Project Presentation Dec. 10, 2004.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
A Schedulability-Preserving Transformation of BDF to Petri Nets Cong Liu EECS 290n Class Project December 10, 2004.
Modeling Worldviews Activity Scanning – Petri Nets and Event Graphs Event Scheduling – Event Graphs State Machines Process Interaction –Block Flow Diagrams.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
12/07/2007Jiacun Wang1 SE-561 Math Foundations Petri Nets - II Dr. Jiacun Wang Department of Software Engineering Monmouth University.
1 Petri Nets Marco Sgroi EE249 - Fall 2002.
1 Petri Nets Marco Sgroi EE249 - Fall 2001 Most slides borrowed from Luciano Lavagno’s lecture ee249 (1998)
Petri Nets: Properties, Analysis and Applications Gabriel Eirea EE249 Discussion 10/8/02 Based on paper by T. Murata.
Merged processes – a new condensed representation of Petri net behaviour V.Khomenko 1, A.Kondratyev 2, M.Koutny 1 and W.Vogler 3 1 University of Newcastle.
Mata kuliah :K0362/ Matematika Diskrit Tahun :2008
Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent.
Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad.
Partial Order Semantics of Types of Nets Robert Lorenz, Gabriel Juhás, Sebastian Mauser SOFSEM 2009, Špindlerův Mlýn, CZ, 27th February 2009.
PETRINETS Nipun Devlekar Zauja Lahtau. PETRINETS DEFINITION : DEFINITION :  PETRINET (place/ transition net): a formal, graphical, executable technique.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Modeling with ordinary Petri Nets Events: Actions that take place in the system The occurrence of these events is controlled by the state of the system.
CY2003 Computer Systems Lecture 7 Petri net. © LJMU, 2004CY2003- Week 72 Overview Petri net –concepts –Petri net representation –Firing a transition –Marks.
Stochastic Activity Networks ( SAN ) Sharif University of Technology,Computer Engineer Department, Winter 2013 Verification of Reactive Systems Mohammad.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Petri nets Introduced in 1962 by Carl Adam Petri in his PhD thesis. Focus.
Generalized stochastic Petri nets (GSPN)
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
CAP 4800/CAP 5805: Computer Simulation Concepts
Modelling by Petri nets
Ch5: Software Specification. 1 Petri Nets  Introduced by C. Adams Petri in  Widely used in the modeling and analysis of computer systems.  Basic.
Rigoros and Adaptive... Information Systems1 Development of Rigorous Adaptive Information Systems Dr. Nasreddine Aoumeur FIN, ITI, DB group
School of Computer Science, The University of Adelaide© The University of Adelaide, Control Data Flow Graphs An experiment using Design/CPN Sue Tyerman.
Learning objectives : Introduce Petri nets Dynamic behavior modeling of manufacturing systems using PN Analysis of Petri net models Textbook : J.-M. Proth.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
School of Computer Science & Software Engineering
CAP 4800/CAP 5805: Computer Simulation Concepts
1 Petri Nets Ina Koch and Monika Heiner. 2 Petri Nets(1962) Carl Adam Petri.
Hardware/Software Codesign of Embedded Systems
Petri-Nets and Other Models
Technology of information systems Lecture 5 Process management.
Process Mining – Concepts and Algorithms Review of literature on process mining techniques for event log data.
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
CPE555A: Real-Time Embedded Systems
Dr. Eng Amr T. Abdel-Hamid
Clockless Computing COMP
COT 5611 Operating Systems Design Principles Spring 2014
Concurrent Systems Modeling using Petri Nets – Part II
CAP 4800/CAP 5805: Computer Simulation Concepts
بسمه‌تعالي فصل چهاردهم شبکه‌هاي پتري.
CSCI1600: Embedded and Real Time Software
Introduction to Petri Nets (PNs)
COT 5611 Operating Systems Design Principles Spring 2012
Petri Net :Abstract formal model of information flow Major use:
CSCI1600: Embedded and Real Time Software
Presentation transcript:

IE 469 Manufacturing Systems 469 صنع نظم التصنيع Petri Nets

Outline Petri nets Introduction Examples Properties Analysis techniques Outline

Petri net models and graphical representation A Petri net (PN) is defined as a directed bipartite graph having a structure, C, and a marking, M. we use the definition C = (P, T, I, O), where: P = a set of places. P = {pl, p2, p3,... pn} T = a set of transitions. T = {t 1, t2, t3 ... tm} I = a mapping from places to transitions. (PXT) N O= a mapping from transitions to places. (PXT) N Each of these concepts has a graphical representation. The place is represented by a circle, the transition by a bar, and the input and output mapping by a set of directed arcs.

In this illustration there are four places, P = {p 1, p2, p3, p4}, and three transitions, T = {t 1, t2, t3}. There are also eight directed arcs which define I and O Tokens: black dots t1 p1 p2 t2 p4 t3 p3 2 3

Petri net, unmarked and marked. mappings can be described in matrix form as follows:

Petri Net Places/Transition: conditions/events 2 3 A PN (N,M0) is a Petri Net Graph N places: represent distributed state by holding tokens (Activities) marking (state) M is an n-vector (m1,m2,m3…), where mi is the non-negative number of tokens in place pi. initial marking (M0) is initial state transitions: represent actions/events enabled transition: enough tokens in predecessors firing transition: modifies marking …and an initial marking M0. What places and transitions represent. Places represent state Transitions actions See also as condition/event p2 t2 2 t1 p1 p4 3 Places/Transition: conditions/events t3 p3

Transition firing rule A marking is changed according to the following rules: A transition is enabled if there are enough tokens in each input place An enabled transition may or may not fire The firing of a transition modifies marking by consuming tokens from the input places and producing tokens in the output places Firing rule: only PN rule. May or may not fire: asynchronicity 2 2 2 2 3 3

Concurrency, causality, choice Sequencing Conflict t3 t4 t6

Concurrency, causality, choice

Concurrency, causality, choice Causality, sequencing t3 t4 t6

Concurrency, causality, choice conflict t3 t4 t6

Concurrency, causality, choice conflict t3 t4 t6

Example

Producer-Consumer Problem Buffer Unbounded channel PNs are an infinite state model but most properties are decidable with finite time and memory Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Bounded channel with complementary arcs Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer Problem Buffer Consume

Producer-Consumer with priority A Consumer B can consume only if buffer A is empty Inhibitor arcs B Unbounded channel PNs are an infinite state model but most properties are decidable with finite time and memory

PN properties Behavioral: depend on the initial marking (most interesting) Reachability Boundedness Schedulability Liveness Conservation Structural: do not depend on the initial marking (often too restrictive) Consistency Structural boundedness Most interesting properties are behavioral because we know the initial marking of the system and we are interested in analysis that start from there. Structural properties are properties that hold for any initial marking, therefore they are too restrictive. Usually we know the initial marking of the system we design.

Reachability Marking M is reachable from marking M0 if there exists a sequence of firings s = M0 t1 M1 t2 M2… M that transforms M0 to M. The reachability problem is decidable. p2 t2 M0 = (1,0,1,0) t3 M1 = (1,0,0,1) t2 M = (1,1,0,0) p1 t1 p4 The reachability problem is decidable. t3 p3 M0 = (1,0,1,0) M = (1,1,0,0)

When the transition tj fires it results in a new marking M’, (by removing I(pi, tj) tokens from each of its input places and adding O(pi, tj) tokens to each of its output places. Then, M’ is reachable from M as: M’(pi)=M(pi)+O(pi,tj)-I(pi,tj) Example: The following figure shows the change in state from Mk-1 to Mk by firing t1.Let u be a firing vector, where uT=[u(t1), u(t2), u(t3)]. Then Mk = Mk-1+Ouk-Iuk =Mk-1+Auk

Petri net invariants An invariant of a PN depends on its topology. P-invariant. T-invariant. If there exists a set of non-negative integers x such that xTA=0, then x is called a P-invariant of the PN. Let x be a weighting vector of places x=[w1, w2, w3, …wn]. There are (n-r) minimal P-invariants. n= number of places. r= the rank of A.

which has the following solutions:

T-invariant A vector y of non-negative integers is a T-invariant if there exists a marking M and a firing sequence back to M whose firing count vector is y. A T-invariant is a solution to the equation Ay=0. Let y be a vector y=[u1, u2, u3, …..um]. Which yields the T-invariant yT=(1,1,1). y defines the number of times each transition must be fire in one complete cycle from M0 back to it self. In general there are (m-r) T-invariants. m= number of transitions.

Liveness Liveness: from any marking any transition can become fireable Liveness implies deadlock freedom, not viceversa Not live The transition is not live because it can be fired only once and after that is dead. The net is not live but it is deadlock free because I can keep firing the two transitions on the right

Liveness Liveness: from any marking any transition can become fireable Liveness implies deadlock freedom, not viceversa Not live

Liveness Deadlock-free Liveness: from any marking any transition can become fireable Liveness implies deadlock freedom, not viceversa Deadlock-free

Liveness Deadlock-free Liveness: from any marking any transition can become fireable Liveness implies deadlock freedom, not viceversa Deadlock-free

Boundedness Unbounded Boundedness: the number of tokens in any place cannot grow indefinitely (1-bounded also called safe) Application: places represent buffers and registers (check there is no overflow) Finite number of token can accumulate Unbounded

Boundedness Unbounded Boundedness: the number of tokens in any place cannot grow indefinitely (1-bounded also called safe) Application: places represent buffers and registers (check there is no overflow) Unbounded

Boundedness Unbounded Boundedness: the number of tokens in any place cannot grow indefinitely (1-bounded also called safe) Application: places represent buffers and registers (check there is no overflow) Unbounded

Boundedness Unbounded Boundedness: the number of tokens in any place cannot grow indefinitely (1-bounded also called safe) Application: places represent buffers and registers (check there is no overflow) Unbounded

Boundedness Unbounded Boundedness: the number of tokens in any place cannot grow indefinitely (1-bounded also called safe) Application: places represent buffers and registers (check there is no overflow) Unbounded

Conservation Not conservative Conservation: the total number of tokens in the net is constant Not conservative

Conservation Not conservative Conservation: the total number of tokens in the net is constant Not conservative This net is not coservative

Conservation Conservative 2 2 Conservation: the total number of tokens in the net is constant Conservative This is conservative 2 2

Analysis techniques Structural analysis techniques Incidence matrix T- and P- Invariants State Space Analysis techniques Coverability Tree Reachability Graph Let us consider now analysis techniques. They are of two types. Structural: incidence matrix and algebraic techniques. PNs firing rules have links to linear algebra. State-based: Reachability tree State-based are exhaustive but expensive.

Incidence Matrix t2 p1 t1 p2 p3 t1 t2 t3 p1 t3 p2 p3 -1 0 0 1 1 -1 -1 0 0 1 1 -1 0 -1 1 p2 p3 Necessary condition for marking M to be reachable from initial marking M0: there exists firing vector v s.t.: M = M0 + A v Build an incidence matrix that gives info about the PN structure: I/O relationship between nodes. Necessary condition is that exists a solution. Not sufficient!

State equations t2 p1 p2 p3 t1 t3 E.g. reachability of M =|0 0 1|T from M0 = |1 0 0|T t2 p1 p2 p3 t1 t3 A= -1 0 0 1 1 -1 0 -1 1 v1 = 1 1 + -1 0 0 1 1 -1 0 -1 1 = The solution is one of the vectors

Reachability xTM’ = xTM0 Example: Show that M=(0 0 1 1) is reachable from M0 but M =(1 0 1 0) is not reachable from M0. Testing: M=(0 0 1 1)

Testing M=(1 0 1 0)

Reachability graph p1 p2 p3 t1 t2 t3 100 For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings

Reachability graph t2 p1 t1 p2 p3 100 t1 010 t3 For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings

Reachability graph t2 p1 t1 p2 p3 100 t1 010 t3 t3 001 For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings

Reachability graph t2 p1 t1 p2 p3 100 t1 010 t3 t2 t3 001 For bounded nets the Coverability Tree is called Reachability Tree since it contains all possible reachable markings

Coverability Tree Build a (finite) tree representation of the markings Karp-Miller algorithm Label initial marking M0 as the root of the tree and tag it as new While new markings exist do: select a new marking M if M is identical to a marking on the path from the root to M, then tag M as old and go to another new marking if no transitions are enabled at M, tag M dead-end while there exist enabled transitions at M do: obtain the marking M’ that results from firing t at M on the path from the root to M if there exists a marking M’’ such that M’(p)>=M’’(p) for each place p and M’ is different from M’’, then replace M’(p) by w for each p such that M’(p) >M’’(p) introduce M’ as a node, draw an arc with label t from M to M’ and tag M’ as new. Build coverability tree starting from initial marking

Coverability Tree 1000 p1 p2 p3 p4 t1 t2 t3 Boundedness is decidable with coverability tree 1000 p1 p2 p3 p4 t1 t2 t3 Build coverability tree starting from initial marking

Coverability Tree 1000 t1 0100 t2 p1 t1 p2 p3 p4 t3 Boundedness is decidable with coverability tree 1000 t1 0100 t2 p1 t1 p2 p3 p4 t3

Coverability Tree 1000 t1 0100 t2 p1 t1 p2 p3 t3 0011 p4 t3 Boundedness is decidable with coverability tree 1000 t1 0100 t2 p1 t1 p2 p3 t3 0011 p4 t3

Coverability Tree 1000 t1 0100 t2 p1 t1 p2 p3 t3 0011 t2 p4 0101 t3 Boundedness is decidable with coverability tree 1000 t1 0100 t2 p1 t1 p2 p3 t3 0011 t2 p4 0101 t3

Coverability Tree 1000 t1 0100 t2 p1 t1 p2 p3 t3 0011 t2 010 p4 t3 Boundedness is decidable with coverability tree 1000 t1 0100 t2 p1 t1 p2 p3 t3 0011 t2 010 p4 t3 Introduce the omega symbol that means infinite accumulation of tokens. It cannot solve reachability problems

Petri Net extensions Add interpretation to tokens and transitions Colored nets (tokens have value) Add time Time/timed Petri Nets (deterministic delay) type (duration, delay) where (place, transition) Stochastic PNs (probabilistic delay) Generalized Stochastic PNs (timed and immediate transitions) Add hierarchy Place Charts Nets Stochastic PNs have exponentially distributed random variable expressing the delay between the enabling and the firing of a transition. GSPNs have immediate transitions that take negligible amount of time. Place Charts Nets: exponential reduction in size. Good for preemption.