Concurrent Systems Modeling using Petri Nets

Slides:



Advertisements
Similar presentations
School of Computer Science & Software Engineering
Advertisements

1 Petri Nets I Paul Fishwick author From
1 SE-561 Formal Methods in Software Petri Nets - I.
An Introduction to Petri Nets
Principles of Engineering System Design Dr T Asokan
Introduction to Petri Nets Hugo Andrés López
1 Analysis of workflows : Verification, validation, and performance analysis. Wil van der Aalst Eindhoven University of Technology Faculty of Technology.
A university for the world real R © 2009, Chapter 3 Advanced Synchronization Moe Wynn Wil van der Aalst Arthur ter Hofstede.
Based on: Petri Nets and Industrial Applications: A Tutorial
1 Modeling based on Petri-nets. Lecture 8. 2 High-level Petri nets The classical Petri net was invented by Carl Adam Petri in A lot of research.
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
Discrete Interaction Design Specification Prof. Dr. Matthias Rauterberg Faculty Industrial Design Technical University of Eindhoven
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.
XML Documentation of Biopathways and Their Simulations in Genomic Object Net Speaker : Hungwei chen.
Lecture 6 & 7 System Models.
Models of Computation for Embedded System Design Alvise Bonivento.
/faculteit technologie management DEMO CPN-tools Ronny Mans Eindhoven University of Technology, Faculty of Technology Management, Department of Information.
Mata kuliah :K0362/ Matematika Diskrit Tahun :2008
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
PETRINETS Nipun Devlekar Zauja Lahtau. PETRINETS DEFINITION : DEFINITION :  PETRINET (place/ transition net): a formal, graphical, executable technique.
System Models Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn Lecture 6 & 7.
An Introduction to Petri Nets Marjan Sirjani Formal Methods Laboratory University of Tehran.
CY2003 Computer Systems Lecture 7 Petri net. © LJMU, 2004CY2003- Week 72 Overview Petri net –concepts –Petri net representation –Firing a transition –Marks.
Virtual Storytelling Adam Abonyi Daniel Balaš. Agenda 1.Introduction to virtual storytelling 2.Petri Nets 3.Our improvements in Petri Nets 4.Example.
Sept Tracing Status Update - Sept Montreal - Timothy Lethbridge Trace-Directed Modelling Status Update Timothy C. Lethbridge University.
Petri nets refresher Prof.dr.ir. Wil van der Aalst
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
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.
School of Computer Science, The University of Adelaide© The University of Adelaide, Control Data Flow Graphs An experiment using Design/CPN Sue Tyerman.
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
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
Process Mining – Concepts and Algorithms Review of literature on process mining techniques for event log data.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VII. System Specification (I)
Week 8 Computational Level
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
composition of workflows
Animation and Simulation Plus Interaction
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
Marlon Dumas Institute of Computer Science
CPE555A: Real-Time Embedded Systems
CSS 496 Business Process Re-engineering for BS(CS)
Exercise class 1.
Dr. Eng Amr T. Abdel-Hamid
Clockless Computing COMP
State Machine Diagrams
Concurrent Systems Modeling using Petri Nets – Part II
Workflow Management Systems
CAP 4800/CAP 5805: Computer Simulation Concepts
CAP 4800/CAP 5805: Computer Simulation Concepts
CSCI1600: Embedded and Real Time Software
State Machines Massimo Felici.
Modeling based on Petri-nets.
Petri nets refresher Prof.dr.ir. Wil van der Aalst
Dynamic Modeling Lecture # 37.
Marlon Dumas Institute of Computer Science
CSS 496 Business Process Re-engineering for BS(CS)
An Introduction to Petri Nets
CAP 4800/CAP 5805: Computer Simulation Concepts
Petri nets refresher Prof.dr.ir. Wil van der Aalst
Petri nets.
Finite State Machine Continued
CSCI1600: Embedded and Real Time Software
Petri Nets Laurie Frazier.
Presentation transcript:

Concurrent Systems Modeling using Petri Nets Marlon Dumas (Based on lecture material by Wil van der Aalst Eindhoven University of Technology, The Netherlands http://www,workflowcourse.com)

Behavior Modeling: State Machines

Limitations of state machines Three doctors in a medical centre What if there are 6 doctors? What if doctors can arrive and leave (so long as they are not busy)? State explosion…

Concurrent systems modeling State machines are useful to model behaviour of sequential systems But many systems are concurrent by nature Statecharts overcome some of the limitations (cf. concurrent regions), but not all Petri nets are a family of techniques for modeling systems with concurrency, communication and synchronization

Petri nets Simple technique for concurrent systems modeling Three elements: places, transitions and arcs. Graphical and mathematical description. Formal semantics suitable for static analysis. Supported by verification and simulation tools ProM, LoLa, PIPE, Woped Once you understand Petri nets, you will be better equipped to understand other techniques for modeling systems with concurrency, e.g. BPMN UML Activity Diagrams

Elements

Rules Connections are directed. No connections between two places or two transitions. Places may hold zero or more tokens. First, we consider the case of at most one arc between two nodes.

Enabled Transition A transition is enabled if each of its input places contains at least one token. enabled Not enabled Not enabled

Firing An enabled transition can fire (i.e., it occurs). When it fires it consumes a token from each input place and produces a token for each output place. fired

“Token Game” In the new state, make_picture is enabled. It will fire, etc.

Remarks Firing is atomic. Multiple transitions may be enabled, but only one fires at a time By default, choice is non-deterministic The state of a net is a distribution of tokens over places (also referred to as marking). Any state machine can be trivially converted into a Petri net – How?

Non-determinism Two transitions are enabled but only one can fire

Example: Single traffic light

Two traffic lights OR

Problem

Solution How to make them alternate?

Tool Woped: A Petri net drawing and animation tool: http://www.woped.org/

Exercise: Doctor’s scenario in Petri nets Case 1: Patients arrive and leave, number of doctors fixed Case 2: Patients arrive and leave, doctors arrive and leave (but only leave when they are free) Case 3: When patients arrive, they are classified into simple and complex cases. Simple cases require only a doctor, complex cases require a doctor and a nurse. (Assume doctors and nurses do not arrive nor leave)

Exercise: Train system Consider a circular railroad system with 4 (one-way) tracks (1,2,3,4) and 2 trains (A,B). No two trains should be at the same track at the same time and we do not care about the identities of the two trains.

Multiple arcs connecting two nodes The number of arcs between an input place and a transition determines the number of tokens required to be enabled. The number of arcs determines the number of tokens to be consumed/produced.

Which transition(s) is/are enabled? Example: Ball game Which transition(s) is/are enabled?

Exercise: Burning alcohol. Model C2H5OH + 3 * O2 => 2 * CO2 + 3 * H2O Assume that there are two steps: first each molecule is disassembled into its atoms and then these atoms are assembled into other molecules.

Vending Machine A vending machine sells chocolate bars. The machine sells small bars for 1.5 euro and large bars for 2 euros. The machine accepts coins of 50 cents, 1 euro and 2 euro. The machine is not able to return coins back to customers. Accordingly, the machine never allows a user to insert more than 2 euros. Once the user has put 2 euros, the machine will not accept any more bills. Instead, it will only allow the user to push the button and get a large bar. If the user has inserted 1.5 euros, he/she may opt to get a small bar, or put an additional 50 cents to get a large bar.

You should be able to ... Explain what is a Petri net and what are the basic elements of (plain) Petri nets Play a token game on a Petri net. Model simple concurrent systems using Petri nets.