Modeling. Conceptual modeling: Petri nets Implementation: Arena, CPN tools Simulation needed: build models. Start with concepts, then select appropriate.

Slides:



Advertisements
Similar presentations
1 Petri Nets I Paul Fishwick author From
Advertisements

Formal Methods in Software Engineering
Chapter 3 Process Description and Control
CS370 – Spring 2003 Hazards/Glitches. Time Response in Combinational Networks Gate Delays and Timing Waveforms Hazards/Glitches and How To Avoid Them.
1 Analysis of workflows : Verification, validation, and performance analysis. Wil van der Aalst Eindhoven University of Technology Faculty of Technology.
Digital System Design Verilog ® HDL Behavioral Modeling (3) Maziar Goudarzi.
Arena modeling Conceptual model can be converted into Arena model. Arena model: connected building blocks. Building blocks must be parameterized. Arena.
Chapter 101 Cleaning Policy When should a modified page be written out to disk?  Demand cleaning write page out only when its frame has been selected.
Fundamentals of Python: From First Programs Through Data Structures
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.
Soundness problem for Resource-Constrained Workflow nets.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 17 Scheduling III.
Introduction to Data Flow Graphs and their Scheduling Sources: Gang Quan.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
Business Process Simulation Marc Voorhoeve HG 7.86(247)2420.
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.
Give qualifications of instructors: DAP
Modeling Worldviews Activity Scanning – Petri Nets and Event Graphs Event Scheduling – Event Graphs State Machines Process Interaction –Block Flow Diagrams.
Review: Process Communication Sequential Communication –Result of P1 becomes at termination the input to P2 –Tools: Redirect (>,>>) and Pipe (|) Concurrent.
Simscript II.5 Building simulation model with SIMSCRIPT II.5.
1 of 20 Octopus: document handling Document handling: three modeling approaches Marc Voorhoeve Venkatesh Kannan TUE.
Overview Finite State Machines - Sequential circuits with inputs and outputs State Diagrams - An abstraction tool to visualize and analyze sequential circuits.
Problem definition and Analysis. Scope Performance indicators (system time, resource occupation, cost,...) Key object classes (order, delivery,...) and.
Silberschatz, Galvin and Gagne  Operating System Concepts Deadlock and Starvation Deadlock – two or more processes are waiting indefinitely for.
CS 151 Digital Systems Design Lecture 32 Hazards
Introduction to Data Flow Graphs and their Scheduling Sources: Gang Quan.
Mapping Petri Nets into Event Graphs. Alternative Implementations Activity World View Petri Net Formalism: Simple fundamental elements and behavior Concurrent.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Deadlock Characterization
Introduction to Discrete Event Simulation Customer population Service system Served customers Waiting line Priority rule Service facilities Figure C.1.
CHP-4 QUEUE.
TK1924 Program Design & Problem Solving Session 2011/2012 L6: Queues.
1 Petri Nets III Wednesday, October 26, Review -Timed Petri Net  Time can be associate with places, arcs, or transitions. There are real life.
Data Structures Using C++ 2E Chapter 8 Queues. Data Structures Using C++ 2E2 Objectives Learn about queues Examine various queue operations Learn how.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 18: Stacks and Queues (part 3)
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 7: Deadlocks.
Towards a High-Level Petri Net Type DefinitionWorkshop on Interchange Formats for Petri Nets 1/18 June 26, 2004 Towards a High-Level Petri Net Type Definition.
Chapter 7 – Deadlock (Pgs 283 – 306). Overview  When a set of processes is prevented from completing because each is preventing the other from accessing.
Simulation of a Generic Cellular Manufacturing System Using Rockwell Arena Simulation Software This document provides a generic simulation model of a cellular.
EMERGENCY SERVICE: A GENERALIZED FLEXIBLE SIMULATION MODEL Paola FACCHIN Department of Paediatrics, University of Padova, Italy Giorgio ROMANIN JACUR Department.
Arena Simulation Language. Simulation with ArenaChapter 3 – A Guided Tour Through ArenaSlide 2 of 58 The Create Flowchart Module “Birth” node for entities.
CAP 4800/CAP 5805: Computer Simulation Concepts
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
Ch8. Analysis Joosung, Ko.
Resource Management Reusable  Disk blocks  File descriptors  Semaphores Consumable  Messages  Packets.
CAP 4800/CAP 5805: Computer Simulation Concepts
CSC 322 Operating Systems Concepts Lecture - 10: by Ahmed Mumtaz Mustehsan Special Thanks To: Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Lecture 12 Handling Deadlock – Prevention, avoidance and detection.
Capturing Requirements. Questions to Ask about Requirements 1)Are the requirements correct? 2)Consistent? 3)Unambiguous? 4)Complete? 5)Feasible? 6)Relevant?
CS333 Intro to Operating Systems Jonathan Walpole.
MAY I’VE SWITCHED ON! So What Happens Next?
Waiting Line Theroy BY, PRAYASH NEUPANE, KARAN CHAND & SANTOSH SHERESTHA.
Homework-6 Questions : 2,10,15,22.
Readers/Writers Problem  Multiple processes wanting to read an item, and one or more needing to write (Think of airline reservations…)  Rather than enforce.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Concurrent Systems Modeling using Petri Nets
Exercise class 1.
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
Process Description and Control
Pipeline Implementation (4.6)
Concurrent Systems Modeling using Petri Nets – Part II
CAP 4800/CAP 5805: Computer Simulation Concepts
CAP 4800/CAP 5805: Computer Simulation Concepts
RFID for Patient Flow Management in Emergency Unit
Modeling based on Petri-nets.
CAP 4800/CAP 5805: Computer Simulation Concepts
CSCS-200 Data Structure and Algorithms
Behavioural modelling
Presentation transcript:

Modeling

Conceptual modeling: Petri nets Implementation: Arena, CPN tools Simulation needed: build models. Start with concepts, then select appropriate tool.

Conceptual modeling: objects To be modeled: dynamic system, possessing a state composed of objects from various classes. Two types of classes: case and resource classes. The life cycle of a case object contains object states with transitions in between. Petri net: state machine with source / sink transitions. create dispose choice

Resource objects are not created or disposed of. They may be needed for state change of case objects. The start activity may claim one or more free resources. End activity: release some or all resources claimed. A resource can be used by only one case object at a time. Resources Place invariant for each resource type

Time dependency Transition of object may take time. Simulation clock indicates current time. Objects possess time stamp indicating availability time. After transition, an object may be unavailable for a while, due to a delay. 11:51 stamp: 11:56 11:5211:56 delay: 5

System state: many case objects in various object states with various time stamps. System state change by creation / disposal / update of single object. System 11:5511:56

Model with different (sub)classes. Alternative models

The two models are trace equivalent; they differ in the moment of choice. This difference is relevant for dynamic systems, but not for simulation models ("batch processing"). Moment of choice

Removal of redundant transition. Reduction Here too?

Object needing server resource for 5 time units. Start activity Queue model 11:5512:00 constant delay: 5 free Ready after 5 time units

Object needing resource for 5 time units. Start activity Queue 11:5512:00 constant delay: 5 free First ready at 12:00, More arrivals, resource still occupied 11:58 second at12:05

Object needing one resource for 5 time units. Start activity Two server queue 11:5512:00 constant delay: 5 free More arrivals, another resource available 11:58 First ready at 12:00,second at12:03

Ferry model Get on/off board should be restricted. Resource: free place on ferry. Give examples of incorrect behavior. delay

Improved ferry model A2B and B2A have lower priority than other transitions.

Conceptual model analysis Resource invariants (per resource type) Case invariants (per case type) N Abstract from timing.

Liveness analysis Avoid resource locks. The depicted sequence results in a resource lock. No release possible, since all depend on extra claim. It is dangerous to depend on timing to avoid this. Solution: preserve option to terminate before claiming.

Resource lock prevention If a resource lock is possible, add test arcs as shown. Last case is able to release claimed resources. No lock!

Conclusion (conc. model) Conceptual model: Petri net Places represent case stages and resources. Transitions reflect state changes of case /resource. Checks: place invariants and absence of locks.

Classwork A hospital has three treatment rooms and five doctors. Patients needing treatment go to the waiting room and wait there until a doctor is available. The patient and the doctor then have a consultation. In 50% of the cases, a treatment is required. In this case, the patient and doctor need a treatment room to finish the consultation. If there is none, the doctor and patient wait together. In a second model, the patient waits alone. If a room becomes available, the patient is installed there (e.g. by a nurse) and the doctor joins him/her (with priority) when he is available again. Analysis and conceptual model asked

Homework If needed, study appendix A of lecture notes and do additional exercises 2,3 on page 17. Assignment Make conceptual model(s) for DCT case. Indicate invariants and show your model to be lock-free.