SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM

Slides:



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

Introduction into Simulation Basic Simulation Modeling.
Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
IE 429, Parisay, January 2003 Review of Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete, continuous.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Lab Assignment 1 COP 4600: Operating Systems Principles Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University of.
 1  Outline  performance measures for a single-server station  discrete-event simulation  hand simulation  process-oriented simulation approach.
Simulation of multiple server queuing systems
Based on Law & Kelton, Simulation Modeling & Analysis, McGraw-Hill
#11 QUEUEING THEORY Systems Fall 2000 Instructor: Peter M. Hahn
Performance Analysis and Monitoring Facilities in CPN Tools Tutorial CPN’05 October 25, 2005 Lisa Wells.
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.
Variance Reduction Techniques
Chapter 1 Basic Simulation Modeling
Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
Fundamental Simulation Concepts
Simulation Based on Law & Kelton, Simulation Modeling & Analysis, McGraw-Hill.
Lecture 4 Mathematical and Statistical Models in Simulation.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
 1  Outline  simulating GI/G/1 queues  M/M/1 queues  theoretical results of queueing systems  an inventory system  simulation program with an event.
Graduate Program in Engineering and Technology Management
Simulation Output Analysis
Introduction to Computer Simulation
Simulation Examples ~ By Hand ~ Using Excel
1 Chapter 2 Fundamental Simulation Concepts. Simulation with Arena Fundamental Simulation Concepts C2/2 What We’ll Do... Underlying ideas, methods, and.
1 Chapter 2 Fundamental Simulation Concepts Dr. Jason Merrick.
Simulation with ArenaChapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Fundamental Simulation Concepts Chapter 2.
ETM 607 – Discrete Event Simulation Fundamentals Define Discrete Event Simulation. Define concepts (entities, attributes, event list, etc…) Define “world-view”,
0 K. Salah 2. Review of Probability and Statistics Refs: Law & Kelton, Chapter 4.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
IE 429, Parisay, January 2010 What you need to know from Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete,
Dept. Computer Science, Tianjin Uni. 系统仿真 System Simulation 2008.
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
Slide 1 of 46 Fundamental Simulation Concepts Last revision June 7, 2003.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Fundamental Simulation Concepts.
Slide 1 of 46 Fundamental Simulation Concepts Chapter 2.
SIMULATION EXAMPLES QUEUEING SYSTEMS.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems with Multi-programming Chapter 4.
NETW 707 Modeling and Simulation Amr El Mougy Maggie Mashaly.
1 Simulation Implementation Using high-level languages.
Network Simulation Motivation: r learn fundamentals of evaluating network performance via simulation Overview: r fundamentals of discrete event simulation.
1 OUTPUT ANALYSIS FOR SIMULATIONS. 2 Introduction Analysis of One System Terminating vs. Steady-State Simulations Analysis of Terminating Simulations.
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,
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.
Basic Simulation Modeling Qianlan Dong Simulation Modeling and Analysis – Chapter 1 – Basic Simulation ModelingSlide 1 of 51.
Discrete Event Simulation
Network Performance modelling and simulation
(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.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Chapter 2 Basic Simulation Modeling
 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,
Unit 4 Simulation software. Introduction Software used to develop simulation models can be divided into 3 categories: – General-purpose programming languages:
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.
Simulation Modeling and Analysis – Chapter 1 – Basic Simulation ModelingSlide 1 of 51 Chapter 1 Basic Simulation Modeling.
Simulation of single server queuing systems
Chapter 2 Simulation Examples. Simulation steps using Simulation Table 1.Determine the characteristics of each of the inputs to the simulation (probability.
Modeling and Simulation CS 313
Demo on Queuing Concepts
More Explanation of an example in chapter4
Discrete Event “Hand” Simulation of a GI/GI/1 Queue
Fundamental Simulation Concepts
MECH 3550 : Simulation & Visualization
Chapter 1 Basic Simulation Modeling
SIMULATION EXAMPLES QUEUEING SYSTEMS.
Presentation transcript:

SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM Will show how to simulate a specific version of the single-server queuing system Though simple, it contains many features found in all simulation models

1- Problem Statement Recall single-server queuing model Assume interarrival times are independent and identically distributed (IID) random variables Assume service times are IID, and are independent of interarrival times Queue discipline is FIFO Start empty and idle at time 0 First customer arrives after an interarrival time, not at time 0 Stopping rule: When nth customer has completed delay in queue (i.e., enters service) … n will be specified as input

1- Problem Statement (cont’d.) Quantities to be estimated Expected average delay in queue (excluding service time) of the n customers completing their delays Why “expected?” Expected average number of customers in queue (excluding any in service) A continuous-time average Area under Q(t) = queue length at time t, divided by T(n) = time simulation ends … see book for justification and details Expected utilization (proportion of time busy) of the server Another continuous-time average Area under B(t) = server-busy function (1 if busy, 0 if idle at time t), divided by T(n) … justification and details in book Many others are possible (maxima, minima, time or number in system, proportions, quantiles, variances …)

2- Intuitive Explanation Given (for now) interarrival times (all times are in minutes): 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Given service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, … n = 6 delays in queue desired “Hand” simulation: Display system, state variables, clock, event list, statistical counters … all after execution of each event Use above lists of interarrival, service times to “drive” simulation Stop when number of delays hits n = 6, compute output performance measures

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, … Status shown is after all changes have been made in each case …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …

2- Intuitive Explanation (cont’d) Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, … Final output performance measures: Average delay in queue = 5.7/6 = 0.95 min./cust. Time-average number in queue = 9.9/8.6 = 1.15 custs. Server utilization = 7.7/8.6 = 0.90 (dimensionless)

3- Program Organization and Logic C program to do this model (FORTRAN as well is in book) Event types: 1 for arrival, 2 for departure Modularize for initialization, timing, events, library, report, main Changes from hand simulation: Stopping rule: n = 1000 (rather than 6) Interarrival and service times “drawn” from an exponential distribution (mean b = 1 for interarrivals, 0.5 for service times) Density function Cumulative distribution function

3- Program Organization and Logic (cont’d.) How to “draw” (or generate) an observation (variate) from an exponential distribution? Proposal: Assume a perfect random-number generator that generates IID variates from a continuous uniform distribution on [0, 1] … Algorithm: 1. Generate a random number U 2. Return X = – b ln U Proof that algorithm is correct:

ALTERNATIVE APPROACHES TO MODELING AND CODING SIMULATIONS Parallel and distributed simulation Various kinds of parallel and distributed architectures Break up a simulation model in some way, run the different parts simultaneously on different parallel processors Different ways to break up model By support functions – random-number generation, variate generation, event-list management, event routines, etc. Decompose the model itself; assign different parts of model to different processors – message-passing to maintain synchronization, or forget synchronization and do “rollbacks” if necessary … “virtual time” Web-based simulation Central simulation engine, submit “jobs” over the web Wide-scope parallel/distributed simulation