PBW 654 Applied Statistics - I Urban Operations Research

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

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

Performance Evaluation of Queuing Systems

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

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

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

Slides 9: Queuing Models

Systems Simulation Chapter 6: Queuing Models

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 "

Classification of Queuing Models

BIRTH DEATH PROCESSES AND QUEUEING SYSTEMS

Data analysis and stochastic modeling

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

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

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

Introduction to Queueing Theory with Applications to Air Transportation Systems

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

IOE 202: lectures 11 and 12 outline

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

The effect of probabilities of departure with time in a bank

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

QUEUING SYSTEM. Yetunde Folajimi, PhD

Queues and Queueing Networks

Non Markovian Queues (contd.)

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

Review of Queuing Models

Course Outline Introduction to Transportation Highway Users and their Performance Geometric Design Pavement Design

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

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

Introduction to Queueing Theory

Queueing Theory and Simulation. Introduction

Exercises Solutions. Automation IEA, LTH. Chapter 2 Manufacturing and process systems. Chapter 5 Discrete manufacturing problems

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

Name of the Student:

Figure 10.1: Recording when the event E occurs

Queuing Theory. Using the Math. Management Science

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

Continuous Time Processes

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.

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

Chapter 1. Introduction. 1.1 Stochastic process

Advanced Computer Networks Lecture 3. Models of Queuing

Introduction to Markov Chains, Queuing Theory, and Network Performance

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

Readings: Finish Section 5.2

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

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

The Queue Inference Engine and the Psychology of Queueing. ESD.86 Spring 2007 Richard C. Larson

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

An M/M/1/N Queuing system with Encouraged Arrivals

Sandwich shop : a queuing net work with finite disposable resources queue and infinite resources queue

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

Chapter 2 Queueing Theory and Simulation

Introduction to queuing theory

Chapter 5: Special Types of Queuing Models

Introduction to Queueing Theory

I, A BRIEF REVIEW ON INFINITE QUEUE MODEL M.

Q = (c) Assuming that Ricoh has been working continuously for 7 days, what is the probability that it will remain working at least 8 more days?

SYMBOLS AND ABBREVIATIONS

EE 368. Weeks 3 (Notes)

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

Answers to selected exercises

Part II: continuous time Markov chain (CTMC)

INDEX. production, see Applications, manufacturing

Link Models for Circuit Switching

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

(b) What is the variance of the time until the second customer arrives, starting empty, assuming that we measure time in minutes?

Introduction to Queueing Theory

MULTIPLE CHOICE QUESTIONS DECISION SCIENCE

10.2 For the system in 10.1, find the following statistics for population 1 and 2. For populations 2, find: Lq, Ls, L, Wq, Ws, W, Wq 0 and SL.

Performance Modelling of Computer Systems

IEOR 6711: Stochastic Models I, Fall 2003, Professor Whitt. Solutions to Final Exam: Thursday, December 18.

λ λ λ In-class problems

Lecture 20: Reversible Processes and Queues

Elementary queueing system

Computer Systems Modelling

Name of the Student: Problems on Discrete & Continuous R.Vs

Quiz Queue II. III. ( ) ( ) =1.3333

Classical Queueing Models.

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks

IEOR 6711, HMWK 5, Professor Sigman

Section 1.2: A Single Server Queue

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

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

4.7 Finite Population Source Model

Session-Based Queueing Systems

Solutions to Homework Discrete Stochastic Processes MIT, Spring 2011

Part I Stochastic variables and Markov chains

SOLUTIONS IEOR 3106: Second Midterm Exam, Chapters 5-6, November 8, 2012

Generation of Discrete Random variables

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

Lecture Notes 7 Random Processes. Markov Processes Markov Chains. Random Processes

Queueing. Chapter Continuous Time Markov Chains 2 CHAPTER 5. QUEUEING

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science

1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours)

LIMITS FOR QUEUES AS THE WAITING ROOM GROWS. Bell Communications Research AT&T Bell Laboratories Red Bank, NJ Murray Hill, NJ 07974

Introduction to queuing theory

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

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

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

Transcription:

PBW 654 Applied Statistics - I Urban Operations Research Lecture 2.I Queuing Systems An Introduction

Operations Research Models Deterministic Models Linear Programming Integer Programming Network Optimization Nonlinear Programming explicitly represent uncertain data via random variables or stochastic processes; usually involves estimating system performance by simulating the system Stochastic Models Discrete-Time Markov Chains Continuous-Time Markov Chains Queuing Systems Decision Analysis assume all data are known with certainty; usually involves optimization

Applications of Queueing Theory Some familiar queues, Airport check-in Automated Teller Machines (ATMs) Fast food restaurants On hold on an 800 phone line Urban intersection Aircraft in a holding pattern Calls to the police or to utility companies Level-of-service (LOS) standards Queuing theory predicts various characteristics of waiting lines (or queues) such as average waiting time Economic analyses involving trade-offs among operating costs, capital investments and LOS

Structure of a Waiting Line System Queuing theory is the study of waiting lines In many service systems, queues form when demand for service exceeds capacity of service Queuing theory is the study of: Waiting times Delays Interaction between service demand and service capacity Four characteristics of a queuing system are, the manner in which customers arrive the time required for service the priority determining the order of service the number and configuration of servers in the system

Queueing Process and Queueing System Arrival point at the system Source of users/ customers Queue Queueing System C C C C C C C C C C C C C Servers Departure point from the system Arrivals process Size of user source Queue discipline and Queue capacity Service process Number of servers

Structure of a Waiting Line System Distribution of Arrivals Generally, the arrival of customers into the system is a random event Frequently, the arrival pattern is modeled as a Poisson process Distribution of Service Times Service time is also usually a random variable A distribution commonly used to describe service time is the exponential distribution

Structure of a Waiting Line System Queue Discipline Most common queue discipline is first come, first served (FCFS) Book stacks are examples of last come, first served (LCFS) queue discipline Other disciplines assign priorities to the waiting units and then serve the unit with the highest priority first

Structure of a Waiting Line System Single Service Channel System Customer arrives Waiting line S 1 Customer leaves Multiple Service Channels System S 1 Customer arrives Waiting line S 2 Customer leaves S 3

Structure of a Waiting Line System Queuing Analysis is useful for Setting level-of-service standards Congestion pricing Economic analysis involving trade-offs among operating costs, capital investments and LOS Cost Total cost Optimal cost Cost of building the capacity Cost of losses due to waiting Optimal capacity Capacity

A Code for Queueing Models: A/B/m A three part code of the form A/B/k is used to describe various queuing systems A identifies the arrival distribution, B the service (departure) distribution, and k the number of channels for the system Distribution of service time Queueing System Number of servers / / Distribution of interarrival time Customers Queue C C C C C C C C C C S S S S Service facility

A Code for Queueing Models: A/B/m Symbols used for the arrival and service processes are, M - Markov distributions (Poisson/exponential), D - Deterministic (constant) and G - General distribution (with a known mean and variance) For example, M/M/k refers to a system in which arrivals occur according to a Poisson distribution, service times follow an exponential distribution and there are k servers working at identical service rates

Terminology and Notation State of system, number of customers in queueing system Queue length, number of customers waiting for service N(t) = number of customers in queueing system at time t P n (t) = probability that N(t) is equal to n n, mean arrival rate of new customer when N(t) = n n, mean (combined) service rate when N(t) = n Transient condition, state of system at t depends on the state of the system at t=0 or on t-1 Steady state condition, system is independent of initial state and t K, number of servers (parallel service channels) If arrival rate and the service rate per busy server are constant, then n =, n =s 1 1 Expected interarrival time = Expected service time =

Quantities of Interest at Steady State Given = arrival rate = service rate per service channel Unknowns L = expected number of users in queueing system (L = lim t-> E(N(t))) L q = expected number of users in queue (L q = lim t-> E(N q (t))) W = expected time in queueing system per user (W = lim i-> E(w(i))) W q = expected waiting time in queue per user (W q = lim i-> E(w q (i))) Four unknowns, four equations

Little s Law... Number of users The expected # of users in the system at any instant between 0 & T is denoted by L T A(t), cumulative arrivals to the system C(t), cumulative service completions in the system A(t) N(t) C(t) N(t) = A(t) - C(t) The area between the 2 curves is the total customer time i.e. total time in the system spent by all users up to time T It is the total customer time between 0 & T divided by T L T T 0 N( t) dt T A( T ) T t T 0 N( t) dt A( T) T T W T Time

Relationships between L, L q, W, W q 4 unknowns, L, W, L q, W q Need 4 equations. We have the following 3 equations, 1. L = W (Little s law) 2. L q = W q 3. W = W q + 1/µ If we know L (or any one of the four expected values), we can determine the value of the other three The determination of L may be hard or easy depending on the type of queueing model at hand (i.e. M/M/1, M/M/s, etc.) L np n (P n : probability that n customers are in the system) n 0 As T->, the state of the system is independent of initial condition - That is, it is in steady state The expected # of users in a system indicates well the expected waiting time in that system & vice versa

Queuing System Input Characteristics = the average arrival rate 1/ = the average time between arrivals µ = the average service rate for each server 1/µ = the average service time P 0 = probability the service facility is idle P n = probability of n units in the system P w = probability an arriving unit must wait for service (P K ) L q = average number of units in the queue awaiting service L = average number of units in the system W q = average time a unit spends in the queue awaiting service W = average time a unit spends in the system

Analytical Formulas For nearly all queuing systems, there is a relationship between the average time a unit spends in the system or queue and the average number of units in the system or queue These relationships, known as Little's flow equations are, L = W and L q = W q

Analytical Formulas When the queue discipline is FCFS, analytical formulas have been derived for several different queuing models including the following: M/M/1 M/M/k M/G/1 others Analytical formulas are not available for all possible queuing systems. In this event, insights may be gained through a simulation of the system (covered later in the course)

Interarrival Time and Service Time 0, 0 0, ) ( Density function : t t e t f t T time random variable (service) Interarrival T : 2 1 ) var(, 1 ) (, 1 } {0 T T E e t T P t } {0, small For t t T P t Service Time : ; Time : Interarrival

Birth-and-Death Queuing Systems Characteristics of B&D Queuing Systems m parallel, identical servers Infinite queue capacity Whenever n users are in the system (in queue plus in service) arrivals are Poisson at rate of n per unit of time Whenever n users are in the system, service completions are Poisson at rate of n per unit of time First-Come-First-Served Discipline We are now interested in determining L for the B&D Queuing Systems then use equations 1, 2 and 3 to determine the 3 other unknowns We know that L n 0 np n

Birth-and-Death Queuing Systems Let s derive P n from first principles Time t Probability of one arrival in the next t n users n+1 users n t 1 n n t n t n 1 t Time t+ t n+1 users n users n-1 users n+2 users n+1 users n users n1 t n users n-1 users n-1 users n-2 users

Birth-and-Death Queuing Systems The probability of n users in the system at time (t+ t) is P n (t+ t) P n t t P n t1 n n t After a simple manipulation P n t t P n t t P 0 t t P n t t 1 P 1 t 0 P 0 t for n = 0 P n1 t n1 t P n1 t n1 t n n P n t n 1 P n 1 t n1 P n1 t n = 1,2,3, This system of equations is known as Chapman-Kolmogorov equations for a B&D system

Birth-and-Death Queuing Systems We know consider the situation in which the queuing system has reached steady state, i.e. t is large enough to have P n (t)= P n independent of t or P n t t 0 Then the system of equations provide the state balance (or equilibrium equations) 0 P 0 1 P 1 for n = 0 n n P n n1 P n 1 n1 P n1 n = 1,2,3,

Birth-and-Death Queuing Systems The state balance equations can also be written directly from the state transition diagram State transition diagram for the B&D system For a birth-death process 0 P 0 1 P 1 1 P 1 2 P 2 n P n n 1 P n 1 0 1 2 0 1 2 n-1 n n+1 1 2 3 n2 n1 n n1 n n 1 n 1 n 2

Birth-and-Death Queuing Systems We need to calculate P n (to compute L) 0 P 0 1 P 1 --> n n P n n1 P n 1 n1 P n1 for n = 1 --> P 1 0 1 P 0 1 1 P 1 2 P 2 0 P 0 1 P 1 1 P 1 2 P 2 0 P 0 P 2 1 2 P 1 P 2 1 2 0 1 P 0

Birth-and-Death Queuing Systems In general P n n1 n2... 1 0 n n1... 2 1 P 0 k n P 0 We also have 1 P n k n P 0 k 0 P 0 k n P 0 n 0 n 0 1 P 0 1 k n P 0 n1 n1 P 0 K 0 = 1,why? 1 1 k n P 0 n1

Birth-and-Death Queuing Systems Since at steady state the probability of 0 users in the system have to be positive (otherwise queue will grow indefinitely), then k n n1 The condition for steady state Also, if Po is zero, all other probabilities will be zero (i.e. the # of users in the system never stabilizes) Note that P n is a function of 1, 2 & 1, 2,.

State Transition Diagram for M/M/1 States, 0 1 2 n-1 n n+1 During t: P0 t 0 1 2 n-1 n+1 n P1 t P1 t P2 t 2 P n 2 t P n 1 t P n t P t P t 3 n 1 P n t P t P n 1 t 1 t P n 2 t P n State Transition Diagram 0 1 2 n-1 n+1 n

Observing State Transition Diagram from One Point At state 1, P 1 P 1 P 0 P 2 For a birth-death process λp 0 P 1 P1 P2 0 1 2 n-1 n+1 n Pn Pn 1

Derivation of P 0 and P n Putting it all together: 0 0 2 2 0 1,,, P P P P P P n n Since 0 0 0 0 0 1 1 1, n n n n n n P P P Let 1) ( 1 1 1 1 then, 0 0 n n n n Therefore ) (1 and 1 1 0 0 n n n n P P r r a n 1 1

Derivation of L, W, W q, and L q 1 ) (1 ) (1 1 ) (1 1 1 ) (1 ) (1 ) (1 ) (1 ) (1 2 0 1 1 0 0 0 d d d d n n n np L n n n n n n n n n n 1 1 L W ) ( 1 1 1 W W q ) ( ) ( 2 q L q W

Back to Queuing Systems Significant amount of time spent in waiting lines by people, products, etc. Providing quick service is an important aspect of quality customer service The basis of waiting line analysis is the trade-off between the cost of improving service and the costs associated with making customers wait

Elements of Waiting Line Analysis Waiting lines form because people or things arrive at a service faster than they can be served Most operations have sufficient server capacity to handle customers in the long run Customers, however, do not arrive at a constant rate nor are they served in an equal amount of time Waiting lines are continually increasing and decreasing in length and approach an average rate of customer arrivals and an average service time, in the long run Decisions concerning the management of waiting lines are based on these averages for customer arrivals and service times They are used in formulas to compute operating characteristics of the system which in turn form the basis of decision making

Elements of Waiting Line Analysis If there are s servers, each with same service rate, then = customer arrival rate per unit time s = customer service capacity per unit time ρ = /s = utilization factor The systems we study will have ρ < 1, because otherwise the # of customers in the system will grow without bound We will be interested in the steady-state behavior of queuing systems (the behavior for large t)

Performance Questions What is the... 1 - average number of customers in system/queue? 2 - average time a customer spends in system/queue? 3 - probability a customer is rejected? 4 - fraction of time a server is idle? These questions are aimed at characterizing complex systems, analyses used to support decision-making In queuing, OR takes the form of asking what if questions rather than trying to optimize the design

Telephone Answering System Example Situation, A utility company wants to determine a staffing plan for its customer representatives Calls arrive at an average rate of 10 per minute, and it takes an average of 1 minute to respond to each inquiry Both arrival and service processes are Poisson Problem, Determine the number of operators that would provide a satisfactory level of service to the calling population Analysis, = /s < 1 or s > / = 10

Single-Server Waiting Line System Characteristics for Fast Shop Market = 24 customers per hour arrive at checkout counter = 30 customers per hour can be checked out P 0 = (1 - /) = (1 24/30) = 0.2, the percentage of the system being idle L = / ( - ) = 24/ (30-24) = 4, the avg. no. of customers in the system L q = 2 / ( - ) = 24 2 / 30(30-24) = 3.2, the avg. no. of customers waiting in the queue

Single-Server Waiting Line System Characteristics for Fast Shop Market W = 1/( - ) = L / = 1/ (30 24) = 0.167 hours [10 mins], the avg. time in the system per customer W q = / ( - )=L q /= 24/ [30(30 24)]=0.133 hours [8 mins], the avg. time in the waiting line per customer U = / = 24/ 30 = 0.8, the probability the server is busy

M/M/1 Queuing System Single channel Poisson arrival-rate distribution Exponential service-time distribution Unlimited maximum queue length Infinite calling population Examples, Single-window theatre ticket sales booth Single-scanner airport security station Single-lane right-turn stop-sign intersection

Stop-Sign Intersection Example M/M/1 Queuing Systems Cars arrive at a single-lane right-turn stop-sign intersection at a mean rate of 10 per minute, according to a Poisson process with the interarrival time being exponentially distributed. Each car arriving at the intersection requires an average of four seconds to cross the intersection, with the crossing time being exponentially distributed

Stop-Sign Intersection Example Question What is the mean service rate per minute? Answer Since one car can cross the intersection in an average time of 4 seconds (= 4/60 min.), then the mean service rate, µ, is µ = 1/(mean service time), or 60/4 m = 15/min

Stop-Sign Intersection Example Question What is the average time a car must wait from the time it arrives at the intersection until it is finished crossing the intersection (i.e. its turnaround time)? Answer This is an M/M/1 queue with = 10 per minute and = 15 per minute. The average time a car waits in the system is: W = 1/(µ - ) = 1/(15-10) = 1/5 minute or 12 seconds

Stop-Sign Intersection Example Question What is the average number of cars that are waiting at the intersection to cross? Answer Average number of cars waiting in the queue is: L q = 2 /[µ(µ - )] = (10) 2 /[(15)(15-10)] = 100/75 = 4/3

Stop-Sign Intersection Example Question What percentage of the time is the intersection busy? Answer The percentage of time the intersection is busy is equivalent to the utilization factor, /. Thus, the percentage of time is: / = 10/15 = 2/3 or 66.67%

Stop-Sign Intersection Example Poisson Arrival Rate (min) Exponential Service Rate (min) Operating Characteristics Probability of no cars at the intersection Average number of cars waiting Average number of cars at the intersection Average time a car waits Average time a car spends at the intersection Probability a car must wait upon arrival 10 15 Po 0.333 Lq 1.333 L 2.000 Wq 0.133 W 0.200 Pw 0.667

M/M/1 Queuing System - Details M / M / 1 arrival service # of process process servers M stands for Markovian, meaning exponential inter-arrival exponential service times M/M/1 systems with FCFS queue discipline and infinite queue capacity at steady state 0 1 2 3 where = /, utilization factor...

M/M/1 Queuing System - Details L W 1 W q ( ) L q 2 ( ) Two points to observe: 1 - L is not equal to L q +1 It can be shown that L q = L - /, and / is <1 If you visit the system at steady state a very long # of times and each time you observe the # of customers in system and the # of customers in queue. In several times, you will find 0 customers in the system & 0 customers in the queue. Hence, L q L - 1

M/M/1 Queuing System - Details Two points to observe: 1 - L is not equal to L q +1 You can think of the equation [L q = L - /] as: At any point in time during the steady state, the expected # of customers in the queue is the expected # of customers in the system minus a portion of a customer in service

M/M/1 Queuing System - Details Two points to observe: 2 - High sensitivity of delay at high levels of Utilization Recall: [W= 1 / ( - )] Expected Delay capacity = 1 An increase in demand at point X 2 would result in much higher increase in delay compared to the increase caused by increase in demand at point X 1 X 1 X 2 demand i.e. L, L q, W, W q all grow in proportion to [(1- )] which becomes very high as approach 1

M/M/1 Queuing System - Details An alternative, direct derivation of L & W For M/M/1 system with FCFS discipline 1 W P P 1 1 1 0 1 P 2 1 1... Probability of finding 1 person in system Wait time for arriving customers is the expected service time of the customer already in service plus the expected service time for the arriving customer

M/M/1 Queuing System - Details An alternative, direct derivation of L & W For M/M/1 system with FCFS discipline W n 0 n 1 P n E n 1 E n 1 W L 1 & from Little s Law, we have L W 1 L W

M/M/1 Queuing System - Details What is the expected length of a busy period, E[B]? if you observe the system for a very long period of time during steady state You will observe periods of Busy (B) & periods of Idle (I) I B I B I B

M/M/1 Queuing System - Details What is the expected length of a busy period, E[B]? Total Time when System is Idle P 0 Total Time EI P 0 EI EB but P 0 1 & EI 1 If at some instant the system had one customer only who has just departed, time to the next arrival is exponential distributed with mean 1/

M/M/1 Queuing System - Details What is the expected length of a busy period, E[B]? EB 1 EI EIP 0 P 0 EB 1 1 1 1 1 EB 1 1 1 E B 1 W

M/M/1 Queuing System - Details f W f W w 1 e w e w 1 w e w,w 0 e 1 w Let a f W w ae aw,w 0 an exponential distribution The time per customer spent in M/M/1 system at steady state is a RV that is exponentially distributed with parameter (-) Ew 1 Vw 1 2 As 1, the expected wait time grows fast, but the variance grows even faster

Two-Lanes Stop-Sign Intersection M/M/2 Queuing System Consider the previous example with the new configuration. Note that the arrival rate of cars at the two-lanes stop sign intersection is now 15 cars per minute, with the same 4 seconds required for crossing the intersection, through any of the two-lanes available

M/M/m Queuing System Let s consider now M/M/m system with FCFS discipline & infinite queue capacity: Define n : # of customers in system m : # of parallel & identical servers : arrival rate : service rate of each server

M/M/m Queuing System When n < m rate of arrivals & n rate of departures When n m & m P 0 P 1 0 1 2 m-1 m m+1 P 1 2P 2 2 3 P 1 P 0 P 2 2 P 1 P 2 2 2 P 0 2! n P n P 0,n 0,1,2,...,m 1 n! P 0 m 1 m P n mp n 1 m m n P n m nm m! P 0 for n m,m 1,m 2,...

M/M/m Queuing System P n P 0 n P 0 n 0,1,...,m 1 n! n m! P 0 n m,m 1,m 2,... m1 n0 m nm n! n m! m We know that 1 1 1 m n 0 m 1 P n 1

M/M/m Queuing System 1 1 0 0 1 1!! m m n P m m n n m 1 m m m m m m m n Consider z z z z z z z m z / 1 1! ) / ( ) / (! ) / (! ) / ( 0 0

M/M/m Queuing System We can derive that L q m m m! 1 P 2 0 m W q L q W W q 1 L W

ABC Bank Queuing System Problem Statement, ABC Bank loan officer customer interviews Inputs, Customer arrival rate of four per hour, Poisson distributed; Officer interview service time of 12 minutes per customer Questions, Determine operating characteristics for this system Assume an additional officer creating a multiple-server queuing system with two channels; determine operating characteristics for this system

ABC Bank Queuing System Solution for M/M/1, Determine Operating Characteristics for the Single-Server System = 4 customers per hour arrive, = 5 customers per hour are served P o = (1 - / ) = ( 1 4 / 5) =.20 the probability of no customers in the system L = / ( - ) = 4 / (5-4) = 4 customers on average in the queuing system L q = 2 / ( - ) = 4 2 / 5(5-4) = 3.2 customers on average in the waiting line

ABC Bank Queuing System W = 1 / ( - ) = 1 / (5-4) = 1 hour the average time in the system W q = / (u - ) = 4 / 5(5-4) = 0.80 hour (48 minutes) the average time in the waiting line P w = / = 4 / 5 = 0.80 the probability the new accounts officer is busy and a customer must wait

ABC Bank Queuing System Solution for M/M/2, = 4 customers per hour arrive, = 5 customers per hour are served per server S = 2 servers P o = 0.429 the probability of no customers in the system L = 0.952 customers on average in the queuing system L q = 0.152 customers on average in the waiting line

ABC Bank Queuing System W = 0.238 hour the average time in the system W q = 0. 038 hour the average time in the waiting line - P w = 0.229 = (1 P0 P1) = Pw = Pk, probability of having m and m + customers = (1 sum (Pi) where I = 0 to number of servers.. - probability the system is busy = U the probability the new accounts officers are busy and a customer must wait

ABC Bank Queuing System M/M/1 M/M/2 P o 0.2 0.429 L 4 0.952 L q 3.2 0.152 W 1 hour 0.238 hour W q 0.8 hour 0. 038 hour P w 0.8 0.229

M/M/ Queuing System A special case of M/M/m is M/M/ (i.e. infinite # of servers) In this case, no customer has to wait in queue Each arriving customer will find a server available P 0 P 1 0 1 2 n-1 n n+1 P 1 2P 2 2 3 n 1 n P n n 1P n 1 n 1 n 2

M/M/ Queuing System P n n 0 n n! n n! P n P 0 P 0 n n! 1 P 0 e n 0,1,..., n 0 1 n n! n 0,1,2,..., 1 P 0 e What distribution is this?

M/M/ Queuing System Remarkable results The number of customers in system (which is also the # of busy servers) at steady state is Poisson distributed with parameter (/) W q W 1 0 L E n W L 1 L q L 0 This special case of M/M/ is applicable when you have a system of multiple servers where you have a very low probability that all servers are busy simultaneously (e.g. fire station)

M/M/1 Queuing System - with finite system capacity K 0 1 2 k-1 k recall that P n n P 0 k k P n 1 n P 0 n 0 n 0 P n n 1 1 k1 n 0,1,2,...,k New customers finding the system full are lost n 0,1,...,k 1 P 0 1 1 k 1 Now we have expressions for L, Lq, W, Wq -- see Table 4.1 in the text book

M/M/1 Queuing System - with finite system capacity K Note that: Steady state is always reached, even when > 1 There is an upper limit on how low the queue can get Be careful in applying Little s Law must count only the customers who actually join the system Effective arrival rate (i.e. discounting customers who get turned away) 1 P k Probability that the queue is saturated (i.e. full) It is also the fraction of potential customers who get turned away L L q W W q W W q 1

M/M/m Queuing System - with finite system capacity K QuickTime and a TIFF (Uncompressed) decompressor are needed to see this picture. Check Table 4.1 for closed-form expressions (derived from system balance equations) for Pn, L, Lq, W, Wq

M/M/m Queuing System - with finite system capacity K A special case of the above system is M/M/m with finite capacity m (i.e. k = m, that is no queuing space is available) QuickTime and a TIFF (Uncompressed) decompressor are needed to see this picture. P n n n! i i! m i 0 n 0,1,2,...,m The probability of full system is Pm, is known as Erlang s loss formula -- it is widely tabulated for different value of (/)

Two-Lanes Stop-Sign Intersection M/M/2 Queuing System Consider the previous example with the new configuration. Note that the arrival rate of cars at the two-lanes stop sign intersection is now 15 cars per minute, with the same 4 seconds required for crossing the intersection, through any of the two-lanes available

Two-Lanes Stop-Sign Intersection Question Is a single lane sufficient to handle the new arrival pattern of cars at the intersections? Answer Since one lane handles arriving cars at a mean rate of µ = 15 per minute, then = µ = 15 and the utilization factor is 1 This implies the queue of cars will grow infinitely large. Hence, a single lane is not sufficient and cannot handle this increase in demand

Two-Lanes Stop-Sign Intersection Question What is the probability that the right-turn two-lanes are not busy at any point in time? Answer Given that = 15, µ = 15, k = 2 and ( /µ) = 1, the probability that both lanes are empty is: P 0 k1 n 0 ( /) n n! 1 ( /)k k! ( k k ) = 1/[(1 + (1/1!)(15/15)1] + [(1/2!)(1) 2 ][2(15)/(2(15)-15)] = 1/(1 + 1 + 1) = 1/3 =.333 (33.3%)

Two-Lanes Stop-Sign Intersection Question What is the average turnaround time for a car arriving at the two-lanes right-turn stop-sign intersection? Answer The average turnaround time is the average waiting time in the system, W L = L q + (/µ) = 1/3 + (15/15) = 4/3 W = L/= (4/3)/15 = 4/45 min. = 5.33 sec

Two-Lanes Stop-Sign Intersection Question What is the average number of cars waiting at the two-lanes right-turn stop-sign intersection to cross? Answer The average number of orders waiting to be filled is L q, this was calculated earlier as 1/3

Two-Lanes Stop-Sign Intersection Spreadsheet Solution Number of Lanes Mean Arrival Rate (Poisson) Mean Service Rate (Exponential ) Operating Characteristics Probability of no cars in system Average number of cars waiting Average number of cars in system Average time (min) a car waits Average time (min) a car is in system Probability a car must wait k 2 15 15 Po 0.333 Lq 0.333 L 1.333 Wq 0.022 W 0.089 Pw 0.500

Two-Lanes Stop-Sign Intersection Economic Analysis of Queuing Systems Over time, it was observed that the demand at this right-turn intersection increased to 20 cars per minute. The city needs to decide whether to add a new lane to the two-lanes street or not. Given that a car needs 4 seconds to cross the intersection using any lane, and the following, The maintenance cost for one lane is $20/min Based on a number of factors, it was determined that the average waiting cost per second for a car to be $0.50 Assess the feasibility of this project, based on the minute cost (i.e. compare the cost per minute of having 2 lanes with that of having 3 lanes)

Two-Lanes Stop-Sign Intersection Economic Analysis of Queuing Systems Total Cost per Minute = (Total maintenance cost per minute) + (Total cost per minute for cars in the system) = ($20 per lane per minute) x (Number of lanes) + ($30 waiting cost per minute) x (Average number of cars in the system) = 20k + 30L Thus, L must be determined for k = 2 lanes and for k = 3 lanes with = 20/min. and = 15/min

Two-Lanes Stop-Sign Intersection Cost of Two Lanes P 0 k1 n 0 ( /) n n! 1 ( /)k k! ( k k ) P 0 = 1 / [1+(1/1!)(20/15)]+[(1/2!)(20/15) 2 (2(15)(2(15)-20))] = 1 / [1 + (4/3) + (8/3)] = 1/5

Two-Lanes Stop-Sign Intersection Cost of Two Lanes Thus, L = L q + ( /µ) = 16/15 + 4/3 = 2.40 Total Cost = (20)(2) + 30(2.40) = $112.00 per minute

Two-Lanes Stop-Sign Intersection Cost of Three Lanes P 0 k1 n 0 ( /) n n! 1 ( /)k k! k ( k ) P 0 = 1/[[1+(1/1!)(20/15)+(1/2!)(20/15)2]+ [(1/3!)(20/15)3(45/(45-20))] ] = 1 / [1 + 4/3 + 8/9 + 32/45] = 15/59

Two-Lanes Stop-Sign Intersection Cost of Three Servers (continued) Thus, L =.1446 + 40/30 = 1.4780 Total Cost = (20)(3) + 30(1.4780) = $104.35 per hour

Two-Lanes Stop-Sign Intersection System Cost Comparison Mainten. Waiting Total Cost/min Cost/min Cost/min 2 Lanes $40.00 $82.00 $112.00 3 Lanes 60.00 44.35 104.35 Thus, the cost of having 3 lanes is less than that of 2 lanes

Queueing Models Can Be Essential in Analysis of Capital Investments Cost Total cost Optimal cost Cost of building the capacity Cost of losses due to waiting Optimal capacity Capacity

Extensions and Variations M/M/m, FCFS with a finite queue capacity m (cont d) The above equation turns out to be the exact same expression for Pn of M/G/m systems with k=m Variations and extensions of B&D queuing systems Most common is arrival rates and service rates that depend on the state of the system = c n n = d n n n=0,1,2,. n=0,1,2,. Some (not all) lead to closed-form expressions

Extensions and Variations Variations and extensions of B&D queuing systems Often-observed phenomena Balking: after arriving and observing the state of the system, a prospective customer will decide to not wait and go elsewhere Reneging: those who already joined the queue become discouraged after a while and leave without obtaining service Speed-up: by human operators whenever queues grow very long

M/G/1 Queuing System Spatially Distributed Queues When arrivals and service occur at different locations e.g. Ambulance for an EMF Calls arrive at the dispatch desk, according to a Poisson Process The ambulance spends a time Z at the location Service time is the summation of travel time and time on the scene

Queuing Systems with Priorities So far we have been focused on systems with FCFS (i.e. FIFO) and computed the 4 values E[L], E[W], E[L q ] and E[W q ] for this regime For example, a calling center with one operator might be interested in choosing one of the following queuing disciplines FCFS LIFO SIRO It can be shown that E[W FIFO ] = E[W LIFO ] = E[W SIRO ] (why?) The same is true for E[L], E[L q ] and E[W q ] (why?)

Queuing Systems with Failures Traffic Lights Example, 95 Cycle Time Fig. 1 North-South Direction (70 seconds) During the first 45 seconds (Fig 1) During the second 25 seconds (Fig 2) Fig. 2 Easterly Direction (25 seconds) [Fig 3] Fig. 3

Queuing Systems with Failures Traffic Lights Example, We have 6 independent U/D/1 queuing processes a uniform arrival rate deterministic service rate one server (lane) for each direction one queue (approaching vehicles from one lane) Services are interrupted by traffic lights cycles. We can assume this as a server 75% 25% 50% 50% failure 60% 40% Queuing processes are independent, while server cycles are dependent Failure of one server (red lights) signals another server to be ready (green lights)

Queuing Systems with Failures 45 seconds 25 seconds 25 seconds Server 1, South (S) Up Up Down Server 2, SouthEast (SE) Down Up Down Server 3, North (N) Up Down Down Server 4, NorthEast (NE) Up Up Up Server 5, WestNorth (WN) Up Up Up Server 6, WestSouth (WS) Down Down Up Server Queue S SE WN WS N NE

Word-processing support system A department has one word-processor operator. Documents produced in the department are delivered for word processing according to a Poisson process with an expected interarrival time of 20 minutes. When the operator has just one document to process, the expected processing time is 15 minutes. When she has more than one document, then editing assistance that is available reduces the expected processing time for each document to 10 minutes. In both cases, the processing times have an exponential distribution - draw the steady-state diagram for this queuing system - Find the steady state distribution of the number of documents that the operator has received but not yet processed - Derive L, Lq, W, Wq for this queuing system

Word-processing support system Answer 0 3 3 3 3 1 2 3 4 6 6 6... P 1 3 4 P 0 P 2 3 6 P 1 1 2 3 4 P 0... P n 3 6 P 1 n1 2 n1 3 4 P 0

Word-processing support system Answer 1 P n n 0 0 3 3 3 3 4 1 2 6 6 P 0 P 1 P 2... P n 1 P 0 3 4 P 0 1 2 3 4 P 0... 1 2 n1 3 6 3 4 P 0 1 P 0 3 4 P 0 1 1 2... P 0 3 4 P 1 0 1 0.5... 1 5 2 P 0 P 0 2 5

Word-processing support system Answer 0 3 3 3 3 4 1 2 6 6 P 0 2 5, P 1 3 10, P n 3 3 10 1 2 n1 6... steady state i : documents have Let P i been received but not yet completed P 0 P0 P 1 2 5 3 10 7 10 P n Pn 1 3 10 1 n,n 1 2

Word-processing support system Answer L 0 3 3 3 3 4 1 2 6 6 np n 0.P 0 1 3 1 0 102 n 0 L 3 10 1 2 1 2 3 1 2... 2 L 3 10 4 1 2 2 2 2 3 3 2... 4 L 6 5 1 2 1 6 2 5 2 3 10 3 6 1 1 2... 3 3 10 1 2 2...

Word-processing support system Answer 0 3 3 3 3 1 2 3 4 6 6 6... W L 6 5 3 2 5 L q 6 5 1 2 5 n 1P n L 1 P 0 3 5 n1 W q L q 3 5 3 1 5