Review of Queuing Models

Similar documents
Basic Queueing Theory

Introduction to queuing theory

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

λ λ λ In-class problems

Chapter 8 Queuing Theory Roanna Gee. W = average number of time a customer spends in the system.

Queuing Theory. Using the Math. Management Science

Chapter 5: Special Types of Queuing Models

PBW 654 Applied Statistics - I Urban Operations Research

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

Queueing Theory. VK Room: M Last updated: October 17, 2013.

Data analysis and stochastic modeling

Queueing Theory I Summary! Little s Law! Queueing System Notation! Stationary Analysis of Elementary Queueing Systems " M/M/1 " M/M/m " M/M/1/K "

Queuing Analysis. Chapter Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

Performance Evaluation of Queuing Systems

Queuing Theory. 3. Birth-Death Process. Law of Motion Flow balance equations Steady-state probabilities: , if

Introduction to Markov Chains, Queuing Theory, and Network Performance

Waiting Line Models: Queuing Theory Basics. Metodos Cuantitativos M. En C. Eduardo Bustos Farias 1

Systems Simulation Chapter 6: Queuing Models

Chapter 6 Queueing Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

Performance Modelling of Computer Systems

Slides 9: Queuing Models

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

Classification of Queuing Models

IEOR 6711, HMWK 5, Professor Sigman

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/6/16. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

Queuing Theory. Richard Lockhart. Simon Fraser University. STAT 870 Summer 2011

M/G/1 and M/G/1/K systems

Queueing Systems: Lecture 3. Amedeo R. Odoni October 18, Announcements

Queuing Theory. Queuing Theory. Fatih Cavdur April 27, 2015

Introduction to Queueing Theory

Queueing Review. Christos Alexopoulos and Dave Goldsman 10/25/17. (mostly from BCNN) Georgia Institute of Technology, Atlanta, GA, USA

EE 368. Weeks 3 (Notes)

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER I EXAMINATION MH4702/MAS446/MTH437 Probabilistic Methods in OR

Figure 10.1: Recording when the event E occurs

The exponential distribution and the Poisson process

EE126: Probability and Random Processes

CS418 Operating Systems

YORK UNIVERSITY FACULTY OF ARTS DEPARTMENT OF MATHEMATICS AND STATISTICS MATH , YEAR APPLIED OPTIMIZATION (TEST #4 ) (SOLUTIONS)

IE 5112 Final Exam 2010

Part II: continuous time Markov chain (CTMC)

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

Computer Systems Modelling

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

GI/M/1 and GI/M/m queuing systems

Non Markovian Queues (contd.)

Introduction to Queueing Theory

Queuing Networks: Burke s Theorem, Kleinrock s Approximation, and Jackson s Theorem. Wade Trappe

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

Since D has an exponential distribution, E[D] = 0.09 years. Since {A(t) : t 0} is a Poisson process with rate λ = 10, 000, A(0.

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

Queuing Theory. The present section focuses on the standard vocabulary of Waiting Line Models.

Introduction to queuing theory

Birth-Death Processes

QUEUING SYSTEM. Yetunde Folajimi, PhD

Continuous Time Processes

Lecture 20: Reversible Processes and Queues

Chapter 2. Poisson Processes. Prof. Shun-Ren Yang Department of Computer Science, National Tsing Hua University, Taiwan

Name of the Student:

All models are wrong / inaccurate, but some are useful. George Box (Wikipedia). wkc/course/part2.pdf

Chapter 11 Output Analysis for a Single Model. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

Multiaccess Problem. How to let distributed users (efficiently) share a single broadcast channel? How to form a queue for distributed users?

Stochastic Models of Manufacturing Systems

Probability and Statistics Concepts

Kendall notation. PASTA theorem Basics of M/M/1 queue

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Link Models for Packet Switching

λ, µ, ρ, A n, W n, L(t), L, L Q, w, w Q etc. These

Bernoulli Counting Process with p=0.1

Part I Stochastic variables and Markov chains

Intro to Queueing Theory

IOE 202: lectures 11 and 12 outline

Computer Systems Modelling

Link Models for Circuit Switching

Continuous-time Markov Chains

2905 Queueing Theory and Simulation PART III: HIGHER DIMENSIONAL AND NON-MARKOVIAN QUEUES

Markov Processes and Queues

Analysis of A Single Queue

Chapter 2 Queueing Theory and Simulation

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Introduction to Queueing Theory with Applications to Air Transportation Systems

Exponential Distribution and Poisson Process

Computer Networks More general queuing systems

Engineering Mathematics : Probability & Queueing Theory SUBJECT CODE : MA 2262 X find the minimum value of c.

Class 11 Non-Parametric Models of a Service System; GI/GI/1, GI/GI/n: Exact & Approximate Analysis.

ISyE 2030 Practice Test 2

57:022 Principles of Design II Final Exam Solutions - Spring 1997

Statistics 150: Spring 2007

Chapter 1. Introduction. 1.1 Stochastic process

Waiting Time Analysis of A Single Server Queue in an Out- Patient Clinic

Queueing Theory and Simulation. Introduction

Generation of Discrete Random variables

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

Chapter 11. Output Analysis for a Single Model Prof. Dr. Mesut Güneş Ch. 11 Output Analysis for a Single Model

CS 798: Homework Assignment 3 (Queueing Theory)

16:330:543 Communication Networks I Midterm Exam November 7, 2005

Introduction to Queuing Theory. Mathematical Modelling

QUEUING MODELS AND MARKOV PROCESSES

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

Intro Refresher Reversibility Open networks Closed networks Multiclass networks Other networks. Queuing Networks. Florence Perronnin

Transcription:

Review of Queuing Models Recitation, Apr. 1st Guillaume Roels 15.763J Manufacturing System and Supply Chain Design http://michael.toren.net/slides/ipqueue/slide001.html 2005 Guillaume Roels

Outline Overview, Notations, Little s Law Counting Process vs. Interarrival Times Memoryless Process Markovian Queues M/M/1 M/M/k General Queues M/G/1 M/G/k M/G/ M/G/k/k GI/G/k

Queuing Applications Situation Customers Server Bank Customers Tellers Airport Airplanes Runaway Telephone Calls Switches, routers

Queue Representation System Arrival Rate λ Service Rate µ Server Queue L: expected number of people in the system W: expected time spent in the system Q: expected number of people in queue D: expected time spent in queue

Service time/rate Service rate: µ (Customers/minute) Average service time: 1/µ (Minutes/cust.) Service Process is equivalent to Departure Process only if the queue is always nonempty. Customers in system time

Little s Law L=λW (system view) or Q=λD (waiting line view) Also, W=D+1/µ Service Time Time spent in the system Time spent in the queue Therefore, compute one quantity (say, L), and get the three others (W, D, Q) for free!

Notations: A/B/m A: Arrival Process M: Memoryless (or Markovian or Poisson) G: General B: Service Process M: Memoryless G: General m: Number of servers Also: A/B/m/k if system has capacity k

Outline Overview, Notations, Little s Law Counting Process vs. Interarrival Times Memoryless Process Markovian Queues M/M/1 M/M/k General Queues M/G/1 M/G/k M/G/ M/G/k/k GI/G/k

Counting Process vs. Interarrival Times Number of arrivals Markovian Process (M) Interarrival Time is Exponentially Distributed Time between Customer 2 s arrival and Customer 3 s arrival At time t,n(t)=3 N(t) is a Poisson Process t time

Markovian Arrival Process Poisson Counting Process (λ=5) 0.2 0.18 0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Counts the number of people that have arrived in a time interval t (Discrete Distribution) Memoryless: the number of people who arrive in [t, t+s] is independent of the number of people who have arrived in [0,t]

Markovian Arrival Process P(N(t)=n)=exp(-λt)(λt) n /n! E[N(t)]=λt; Var[N(t)]= λt Excel: =POISSON(n,λ,0) When λt>20, very close to a Normal distribution

Properties of a Poisson Process Merging two Poisson processes, with rates λ 1 and λ 2 gives rise to a Poisson process with rare λ 1 +λ 2. λ 1 λ 1 +λ 2 λ 2 Randomly splitting a Poisson process with rate λ, according to probabilities p and (1-p), gives rise to two Poisson processes with rates λp and λ(1 p). λp λ p 1-p 2005 Guillaume Roels λ(1-p)

Markovian Arrival Process Exponential Interarrival times (λ=5) 6 5 4 3 2 1 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Time between two arrivals; time between now and the next arrival (Continuous Distribution) Memoryless: the time between now and the next arrival is independent of when was the last arrival!

Markovian Arrival Process P(T t)=1-exp(-λt); t>0 E[T]=1/λ; Var[T]=(1/λ) 2 Coeff. Of Var=1 (highly random) Excel: =EXPONDIST(t,λ,1)

Example The number of glasses of beer ordered per hour at Dick s Pub follows a Poisson distribution, with an average of 30 beers per hour being ordered. 1. Find the probability that exactly 10 beers are ordered between 10 PM and 10:30PM. Poisson with parameter (1/2)(30)=15. Probability that 10 beers are ordered in 1/2 hour is e 15 15 10 =.048 10! Example from Winston, Operations Research, Applications and Algorithms (1993) 2005 Guillaume Roels

Example cont d 2. Find the mean and standard deviation of the number of beers ordered between 9 PM and 1 AM. λ=30 beers per hour; t=4 hours. Mean=4(30)=120 beers Standard Deviation=(120) 1/2 =10.95 3. Find the probability that the time between two consecutive orders is between 1 and 3 minutes. X=time between successive orders X is exponential with rate 30/60=0.5 beers/min. 1 3 0.5t 0.5 1.5 P( 1 X 3) = (0.5e ) dt = e e =.38

Outline Overview, Notations, Little s Law Counting Process vs. Interarrival Times Memoryless Process Markovian Queues M/M/1 M/M/k General Queues M/G/1 M/G/k M/G/ M/G/k/k GI/G/k

M/M/1 Queue λ λ λ λ 0 1 2 3 µ µ µ µ Memoryless Queuing System: State of the system: number of people in the system Utilization Rate ρ=λ/µ (<1)

M/M/1 Balance Equations In steady state, the rate of entry into a state must equal the rate of entry out of a state, if ρ<1. λ λ λ λ 0 1 2 3 µ µ µ µ λπ 1 +µπ 3 =(λ+µ)π 2

M/M/1: Solving the Balance Equations Π i =(λ/µ) i Π 0 =ρ i Π 0 0.25 i= 0 Π i = 1 0. 2 0.15 Solution 0. 1 Π 0 =1-ρ 0.05 Π i = (1-ρ)ρ i 0 0 2 4 6 8 10 12 14 Geometric distribution

Performance Analysis Q L ρ = iπi = i= 0 (1 ρ) 10 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 10 2 ρ = ( i 1) Πi = L (1 P0 ) = i= 1 (1 ρ) W = L = λ D = Q = λ ρ λ( 1 ρ) 2 ρ λ(1 ρ)

Example An average of 10 cars per hour arrive at a singleserver drive-in teller. Assume the average service time for each customer is 4 minutes, and both interarrival times and service times are exponential. M/M/1 with λ=10 cars/hour and µ=15 cars/hour. Answer the following questions: 1. What is the probability that the teller is idle? Π 0 =1 ρ=1 2/3=1/3 Example from Winston, Operations Research, Applications and Algorithms (1993)

Example (cont d) 2. What is the average number of cars waiting in line for the teller? (A car that is being served is not considered to be waiting in line) 2 Q = 2 ρ (1 ρ) 2 3 = 2 1 3 customers 3. What is the average amount of time a drive-in customer spends in the bank parking lot (including service time)? ρ 1 W = = hour λ( 1 ρ) 5 = 4 3 2005 Guillaume Roels

Example (cont d) 4. On the average, how many customers per hour will be served by the teller? If the teller were always busy, he would serve an average of µ=15 cust./hour. From (1), we know that he is only busy twothirds of the time. Thus, during each hour, the teller will serve an average of (2/3) 15 = 10 customers.

M/M/1 Further Analysis If ρ<1, the departure process of an M/M/1 queuing system is Poisson with rate λ. Same as arrival process! Very useful for series of queues. The distribution of the waiting time in the system is exponential with rate (µ λ). Better measure of service.

M/M/k Queue k servers available Utilization rate ρ=λ/(kµ) If less than k customers in the system, use as many servers as the number of customers λ λ λ λ λ 0 1 2 k µ 2µ 3µ kµ kµ

M/M/k Steady-State Probabilities Same kind of derivation as for M/M/1 1 1 0 0 1 1! ) (! ) ( = + = Π ρ ρ ρ k k n k k k n n 0 2 1 )!(1 Π = + ρ ρ k k Q k k λ Q / D = µ W = D +1/ kρ Q L + =

M/M/k Example Consider a bank with two tellers. An average of 80 customers per hour arrive at the bank and wait in a single line for an idle teller. The average time it takes to serve a customer is 1.2 minutes. Assume that interarrival times and service times are exponential. Determine the expected number of customers present in the bank. Example from Winston, Operations Research, Applications and Algorithms (1993)

M/M/k Example M/M/2 with λ=80 cust./hour and µ=50 cust./hour. Thus ρ=80/(2(50))=0.80<1. 1 k 1 n k 2 ( kρ) ( kρ) 1 (2(0.8)) 1 Π0 = + = 1 + 2(0.8) + = n= 0 n! k! 1 ρ 2 1 0.8 Q = k k + 1 k ρ k!(1 ρ) 2 Π 0 = 2 3 2 (.8) 2!(1.8) 2 1 9 = 2.84customers 1 1 9 L = Q + 2 (0.8) = 4. 44customers M/M/k model is very useful for capacity planning (try different k s)

Outline Overview, Notations, Little s Law Counting Process vs. Interarrival Times Memoryless Process Markovian Queues M/M/1 M/M/k General Queues M/G/1 M/G/k M/G/ M/G/k/k GI/G/k

M/G/1 Queue Exponential service time often unrealistic because of memoryless property. General Service Time T, with mean E(T)=1/µ and Variance Var(T)=σ 2 (ρ=λ/µ). Q = 2 λ { Var( T ) + E( T ) 2(1 λe( T )) 2 } = 2 2 2 λ σ + ρ 2(1 ρ) Not an approximation! Observe that Q, L, D, and W increase with σ 2.

M/G/k Queue -- Approximation SCV s =squared coefficient of variation for service times Q (Expected waiting time for M/M/k) [(1+SCV s )/2]

M/G/ Queue Infinite number of servers; hence, D=Q=0. L has a steady-state Poisson distribution, with rate λ/µ. Applications of M/G/ : (S-1,S) inventory control; order one item as soon as you sell one. Number of firms in an industry

M/G/k/k Queue General service time with mean τ. No waiting space. All potential customers that arrive when all k servers are busy depart the system. Blocked customers are cleared. Steady-state distribution of customers in system: n ( λτ ) P( L = n) = n! k ( λτ ) i= 0 i! i

M/G/k/k Queue: Loss Probability Loss Probability = P(L=k) Probability that all servers are busy. The rate of customers that observe this state of the system, λ P(L=k), will balk. If small loss probability, good approximation with M/G/.

Example An average of 20 ambulance calls per hour are received by Gotham City Hospital. An ambulance requires an average of 20 minutes to pick up a patient and take the patient to the hospital. The ambulance is then available to pick up another patient. How many ambulances should the hospital have to ensure that there is at most 1% probability of not being able to respond immediately to an ambulance call? Assume that interarrival times are exponentially distributed.

Example cont d M/G/k/k model with λ=20 and τ=1/3. Consider k=13. 13 (20 / 3) P( L = 13) = 13! 13 (20 / 3) i! i= 0 i = 0.01059 Consider k=14. P(L=14)=.005019

GI/G/k Queue -- Approximation General (and independent) arrival process, general service time distribution. Assume ρ<1. SCV a =squared coefficient of variation for interarrival times SCV s =squared coefficient of variation for service times D Utilization Rate Scale Variability ρ 1 SCV a + SCV s 1 ρ µ 2 Q=λ D, W=D+1/µ, L=λ W

GI/G/k Network of Queues The departure process from one queue is the arrival process to the next one. Approximate the SCV of the departure process as: SCV d = (1-ρ 2 ) SCV a + ρ 2 SCV s

Conclusions Various models Closed-form solutions only for simplistic models If complex models, use Approximations Simulation Descriptive models Building block for optimization models: size of waiting room, capacity, comparison of technology