Performance Analysis and Monitoring Facilities in CPN Tools Tutorial CPN’05 October 25, 2005 Lisa Wells.

Slides:



Advertisements
Similar presentations
Based on Law & Kelton, Simulation Modeling & Analysis, McGraw-Hill
Advertisements

Introduction into Simulation Basic Simulation Modeling.
1 Analysis of workflows : Verification, validation, and performance analysis. Wil van der Aalst Eindhoven University of Technology Faculty of Technology.
Arena modeling Conceptual model can be converted into Arena model. Arena model: connected building blocks. Building blocks must be parameterized. Arena.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Output analyses for single system
Chapter 2: Algorithm Discovery and Design
Components and Organization of Discrete-event Simulation Model
Simulation.
Simulation with ArenaChapter 2 – Fundamental Simulation Concepts Discrete Event “Hand” Simulation of a GI/GI/1 Queue.
Lecture 9 Output Analysis for a Single Model. 2  Output analysis is the examination of data generated by a simulation.  Its purpose is to predict the.
Building Industrial-Sized Models and Performance Analysis Lisa Wells CPN Workshop 2004 CPN Tools Tutorial, Session 3 October 8, 2004.
Variance Reduction Techniques
Introduction to Arena A Simple Simulation. Model1 We examine a simple model: parts arrive at a server, are served, and depart the system. There will be.
1 Validation and Verification of Simulation Models.
EE694v-Verification-Lect5-1- Lecture 5 - Verification Tools Automation improves the efficiency and reliability of the verification process Some tools,
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
Introduction to C Programming
/faculteit technologie management DEMO CPN-tools Ronny Mans Eindhoven University of Technology, Faculty of Technology Management, Department of Information.
Future Plans for CPN Tools - General. 2 Plans for CPN Tools CPN’0624-Oct-2006 Version plans Improvements for current marking feedback Support for.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Simulation Output Analysis
REPETITION STRUCTURES. Topics Introduction to Repetition Structures The while Loop: a Condition- Controlled Loop The for Loop: a Count-Controlled Loop.
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
SIMULATION MODELING AND ANALYSIS WITH ARENA
Capacity analysis of complex materials handling systems.
Verification & Validation
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
EGR 2261 Unit 5 Control Structures II: Repetition  Read Malik, Chapter 5.  Homework #5 and Lab #5 due next week.  Quiz next week.
Lecture Set 5 Control Structures Part D - Repetition with Loops.
Lecture 2 Process Concepts, Performance Measures and Evaluation Techniques.
Generic Approaches to Model Validation Presented at Growth Model User’s Group August 10, 2005 David K. Walters.
Kurt Jensen Lars M. Kristensen 1 Coloured Petri Nets Department of Computer Science Coloured Petri Nets Modelling and Validation of Concurrent Systems.
Structure of a Waiting Line System Queuing theory is the study of waiting lines Four characteristics of a queuing system: –The manner in which customers.
Entities and Objects The major components in a model are entities, entity types are implemented as Java classes The active entities have a life of their.
Data Structures Using C++ 2E Chapter 8 Queues. Data Structures Using C++ 2E2 Objectives Learn about queues Examine various queue operations Learn how.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
Design of Bio-Medical Virtual Instrumentation Tutorial 2.
Chapter 2 Fundamental Simulation Concepts
Chapter 3 System Performance and Models Introduction A system is the part of the real world under study. Composed of a set of entities interacting.
1 OUTPUT ANALYSIS FOR SIMULATIONS. 2 Introduction Analysis of One System Terminating vs. Steady-State Simulations Analysis of Terminating Simulations.
REPETITION STATEMENTS - Part2 Structuring Input Loops Counter-Controlled Repetition Structure Sentinel-Controlled Repetition Structure eof()-Controlled.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity.
(C) J. M. Garrido1 Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that.
Queuing Theory.  Queuing Theory deals with systems of the following type:  Typically we are interested in how much queuing occurs or in the delays at.
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
MODELING AND SIMULATION CS 313 Simulation Examples 1.
Simulation Examples And General Principles Part 2
Simulation. Types of simulation Discrete-event simulation – Used for modeling of a system as it evolves over time by a representation in which the state.
Building Valid, Credible & Appropriately Detailed Simulation Models
Distributed Systems Lecture 6 Global states and snapshots 1.
OPERATING SYSTEMS CS 3502 Fall 2017
Prepared by Lloyd R. Jaisingh
Introduction to Programming for Mechanical Engineers (ME 319)
Single-Server Queue Model
Modeling and Simulation CS 313
Chapter 6: CPU Scheduling
Discrete Event Simulation - 4
Process Scheduling B.Ramamurthy 12/5/2018.
Single-Server Queue Model
Vectors and Matrices In MATLAB a vector can be defined as row vector or as a column vector. A vector of length n can be visualized as matrix of size 1xn.
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Inferential Statistics
Presentation transcript:

Performance Analysis and Monitoring Facilities in CPN Tools Tutorial CPN’05 October 25, 2005 Lisa Wells

Oct. 25, 2005 Lisa Wells, CPN'05 2 Plan Observing and controlling simulations Introduction to monitors Example: queue system Demo 1 Performance facilities Demo 2

Oct. 25, 2005 Lisa Wells, CPN'05 3 Simulations Simulations of CP-nets are run for many reasons:  Debugging  Analysis of system behavior (performance or functional)  Presentation of a model to project team  Communication with external programs The usefulness of the simulations is heavily dependent on the flexibility and functionality of the simulator.  Access to simulation information  Stopping simulations

Oct. 25, 2005 Lisa Wells, CPN'05 4 Accessing simulation information It is often useful to be able to exchange information between the CPN simulator and external processes or files. Code segments can be added to transitions for:  Reading and writing in files  Calculating some performance measures  Sending and receiving information from external processes

Oct. 25, 2005 Lisa Wells, CPN'05 5 Controlling a simulation Simulation stop criteria  Number of steps executed  Dependent on model time  Dependent on markings or transitions

Oct. 25, 2005 Lisa Wells, CPN'05 6 Common functionality These controlling and accessing activities share a common pattern: If certain conditions are fulfilled, then do something.  If transition T occurs, then save information in a file.  If there are no tokens on place P, then stop the simulation.  If model time is greater than C, then calculate the average number of tokens on place P.  If transition T occurs, send the values of variables x, y, and z to the animation facilities.

Oct. 25, 2005 Lisa Wells, CPN'05 7 Current problems in CPN Tools Problems controlling and accessing simulation information:  Cannot access marking information.  Net structure may have to be changed to obtain desired functionality.  If multiple transitions need to be inspected, then code segments must be duplicated.  Code segments cannot be disabled.  Only low-level support, which is difficult to use.

Oct. 25, 2005 Lisa Wells, CPN'05 8 Monitors in CPN Tools monitor (verb) to watch, keep track of, or check, usually for a special purpose Merriam-Webster’s Collegiate Dictionary A monitor is a mechanism that is used to observe, inspect, control or modify a simulation of a CP-net. Important characteristics of monitors:  They can inspect the states and events of a simulation, and take appropriate actions based on the observations.  There is an explicit separation between monitoring the behavior of a net, and modeling the behavior of the system.

Oct. 25, 2005 Lisa Wells, CPN'05 9 Levels of monitors Standard monitors  Very easy to define  Do not require users to write any code Parameterized monitors  Similar to standard monitors, but slightly more flexible, and require some programming User-defined monitors  Very flexible, but require more programming

Oct. 25, 2005 Lisa Wells, CPN'05 10 Kinds of monitors Simulation breakpoint monitors Write-in-file monitors User-defined monitors Data collector monitors

Oct. 25, 2005 Lisa Wells, CPN'05 11 Monitoring subnets A monitor can inspect markings and occurring transitions, with variable bindings, during a simulation  Zero or more places  Zero or more transitions Monitors are activated after simulation steps  After every simulation step, if no transitions are monitored  After every relevant transition has occurred

Oct. 25, 2005 Lisa Wells, CPN'05 12 Monitoring functions A monitor typically has several functions:  Initialization function Called once before a simulation  Predicate function Called after simulation steps  Observation function Called when predicate function returns true Extracts relevant data from the model  Action function Does something appropriate with the observed value  Stop function Called once after a simulation

Oct. 25, 2005 Lisa Wells, CPN'05 13 Example: simple queue system A single server processes two kinds of jobs. If the server is busy when a job arrives, the job is added to a queue. Job inter-arrival times and server processing times are exponentially distributed. Queuing strategy is FIFO. Server Queue Job arrival

Oct. 25, 2005 Lisa Wells, CPN'05 14 Template code: Write-in-File Monitor one place, and two transitions fun pred (bindelem, System'Queue_1_mark : Jobs ms) = let fun predBindElem (Arrivals'Arrive (1, {jobs, job})) = true | predBindElem (Server'Start (1, {jobs, job})) = true | predBindElem _ = false in predBindElem bindelem end fun init (System'Queue_1_mark : Jobs ms) = ""

Oct. 25, 2005 Lisa Wells, CPN'05 15 Demo 1 Monitoring tools, monitor index entries, marking menus, syntax checking, …

Oct. 25, 2005 Lisa Wells, CPN'05 16 Performance analysis using CPN CP-nets have the potential to be used to model and analyze the performance, i.e. quantitative aspects, of systems. In practice, there are very few studies using CPN for performance analysis. This is due, in part, to lack of tool support.

Oct. 25, 2005 Lisa Wells, CPN'05 17 Performance facilities for CPN Tools High-level support for simulation-based performance analysis is currently being implemented for CPN Tools.  Monitors Data collection during simulations Net-specific simulation breakpoints  Simulation output  Managing data files  Running multiple simulations Generating a status file for multiple simulations Collecting data from independent, terminating simulations Calculating confidence intervals for performance measures

Oct. 25, 2005 Lisa Wells, CPN'05 18 Performance analysis of the queue system Data collection monitors for calculating performance measures, such as:  Expected average delay in queue  Expected average queue length  Expected utilization of the server Breakpoint monitor:  Stop a simulation when 100 jobs have passed through the queue The system can be modeled in CPN Tools, but until now it has been very difficult to collect and process data, and to create net-specific breakpoints.

Oct. 25, 2005 Lisa Wells, CPN'05 19 Data collector monitors The data that is collected is numerical data, i.e. integers, infinite integers, reals. Statistics are calculated. Data can be saved in log files. Data can be post- processed, e.g. plotted in graphs, after a simulation has completed. #data counter step time

Oct. 25, 2005 Lisa Wells, CPN'05 20 Estimating average queue delay Wish to calculate average queue delay for the first n jobs in the queue. When a job arrives in the system, the time of its arrival must be noted and saved. When a job leaves the queue, its queue delay is (current time – arrival time).

Oct. 25, 2005 Lisa Wells, CPN'05 21 Estimating average queue length Wish to calculate the time- average queue length until n jobs have left the queue. When calculating statistics, the length of the queue is weighted with a time interval. Measure the length of the queue when the length changes. The time-average queue length is equal to the area under an appropriate curve divided by the appropriate interval of time.

Oct. 25, 2005 Lisa Wells, CPN'05 22 Estimating server utilization Wish to calculate the utilization of the server until n jobs have left the queue. Use an indicator variable: server is busy => 1, server is idle => 0. Weight the values with appropriate intervals of time. The utilization of the server is then equal to the area under an appropriate curve divided by the appropriate interval of time.

Oct. 25, 2005 Lisa Wells, CPN'05 23 Demo Performance analysis of the queue system…