860 likes | 982 Views
ADVANCED MANAGEMENT SCIENCE (MSC551D). INSTRUCTOR: Dr. Jose Ramon Albert Statistical Research & Training Center www.srtc.gov.ph Email: srtcres@srtc.gov.ph. QUEUING MODELS. INTRODUCTION. The study of queues (or waiting lines) is one of the oldest and widely used quantitative methods.
E N D
ADVANCEDMANAGEMENT SCIENCE (MSC551D) INSTRUCTOR: Dr. Jose Ramon Albert Statistical Research & Training Center www.srtc.gov.ph Email: srtcres@srtc.gov.ph
INTRODUCTION • The study of queues (or waiting lines) is one of the oldest and widely used quantitative methods. • Queues are a common everyday experience • banks/supermarkets - waiting for service • computers - waiting for a response • failure situations - waiting for a failure to occur e.g. in a piece of machinery • business/industrial service systems • social service systems, e.g. judicial system • public transport - waiting for a train, LRT/MRT, jeepney or a bus
INTRODUCTION • Queues form because resources are limited. • It makes economic sense to have queues. How many buses or trains would be needed if queues were to be avoided/eliminated? How many employees would a bank have to hire if the bank needs to avoid queuing? • In designing queuing systems we need to aim for a balance between service to customers (short queues implying many servers) and economic considerations (not too many servers).
INTRODUCTION • Decisions regarding the amount of capacity to provide are needed. • It is often impossible to predict accurately when units will arrive to seek service and/or how much time will be required to provide that service. This makes decision making difficult. • Queuing theory contributes vital information required for such decisions by predicting various operating characteristics of the waiting line such as the average waiting time.
INTRODUCTION In essence all queuing systems can be broken down into individual sub-systems consisting of entities queuing for some activity. Typically we can talk of this individual sub-system as dealing with customers queuing for service.
INTRODUCTION To analyze a sub-system we need information on: • Arrival process • Service mechanism (including Calling Popn) • Queuing characteristics Queuing system Calling Population (Input Source) Queue Server Served customers Customer Arrivals
INTRODUCTION SINGLE CHANNEL SINGLE PHASE SYSTEM Server Queue Arrivals
INTRODUCTION SINGLE CHANNEL MULTIPHASE SYSTEM Queue Type 1 Server Arrivals Type 2 Server
INTRODUCTION Server 1 MULTICHANNEL SINGLE PHASE SYSTEM Queue Server 2 Arrivals Server 3
INTRODUCTION Type 1 Server 1 Type 2 Server 1 MULTICHANNEL MULTI PHASE SYSTEM Queue Arrivals Type 1 Server 2 Type 2 Server 2
Arrival Process • how big is the size of the calling population (the total number of customers that arrive in the system) • how customers arrive e.g. singly or in groups (batch or bulk arrivals) • how the arrivals are distributed in time, e.g. what is the probability distribution of time between successive arrivals (the interarrival time distribution). • Typical assumption : exponential distribution
The Exponential Distn (w/ parameter l) -lt P ( arrival time < t ) 1 - e = e =the mathematical constant 2.71828 1/l= the population mean of arrivals t= any value of the continuous random variable e.g. Drivers Arriving at a Toll Bridge Customers Arriving at an ATM Machine
The Exponential Distn (w/ parameter l) • Describes time or distancebetweenevents • Used for queues • Density function • Parameters l = 2.0 f(t) l = 0.5 - l t e t f(t) = l m = 1/l, s = 1/l
The Exponential Distn (w/ parameter l) f(t) = l exp{-l t} where t>0 • The mean and variance of the exp distn with parameter l are 1/l; 1/l2 • The distn is the only memoryless distn, i.e. P{ T > s+t | T > t} = P{T > s} • Related to the Poisson distn. If T ~ exp distn with parameter l then X(t) has a Poisson distn with mean lt.
Poisson Process: Discrete Eventsin an ‘Interval’ The Probability ofOne Successin Interval is Stable The Probability of More than One Success in this Interval is 0 Probability of Success is Independentfrom Interval to Interval # Customers Arriving in 15 min. # Defects Per Case of Light Bulbs. P ( X = x | l - l x e l x ! The Poisson Distn
The Poisson Distn -l x e l P ( x ) = x ! P(x ) = probability ofxsuccesses givenl l= expected (mean) number of ‘successes’ e = 2.71828 (base of natural logs) x = number of ‘successes’per unit e.g. Find the probability of4 customers arriving in 3 minutes when the mean is3.6. -3.6 4 e 3.6 P(X)= =.1912 4!
The Poisson Distn Mean l = 0.5 P(X) .6 m = E ( X ) = l .4 N .2 å = 0 X x P ( x ) i i 0 1 2 3 4 5 i = 1 l = 6 P(X) .6 Standard Deviation .4 .2 s = 0 X 0 2 4 6 8 10
Arrival Process • whether there is a finite population of customers or (effectively) an infinite number that could arrive in a certain time interval. • The simplest arrival process is one where we have completely regular arrivals (i.e. the same constant time interval between successive arrivals).
Arrival Process • A Poisson stream of arrivals corresponds to arrivals at random. Here, inter-arrival time of customers are independent, exponentially distributed. The Poisson stream is described by a single parameter - the average arrival rate l. • Other important arrival processes are scheduled arrivals; batch arrivals; and time dependent arrival rates (i.e. the arrival rate varies according to the time of day).
Service Mechanism • a description of the resources needed for service to begin • how long the service will take (the service time distribution) • the number of servers available • whether the servers are in series (each server has a separate queue) or in parallel (one queue for all servers) • whether preemption is allowed (a server can stop processing a customer to deal with another "emergency" customer)
Service Mechanism • Assuming that the service times for customers are independent and do not depend upon the arrival process is common. Another common assumption about service times is that they are exponentially distributed.
Queue Characteristics • Is the queue infinite or finite? • The standard model assumes an infinite queue even for situations where there is a finite upper bound on the no. of permissible customers (as this bound may be rather large) • The queue discipline: How, from the set of customers waiting for service, do we choose the one to be served next • FIFO (first-in first-out) • LIFO (last-in first-out) • randomly
Queue Characteristics • Do we have: • balking (customers deciding not to join the queue if it is too long) • reneging (customers leave the queue if they have waited too long for service) • jockeying (customers switch between queues if they think they will get served faster by so doing)
Queue Characteristics • Changing the queue discipline (the rule by which we select the next customer to be served) can often reduce congestion. • Often the queue discipline "choose the customer with the lowest service time" results in the smallest value for the time (on average) a customer spends queuing.
Typical Questions of Interest • How long does a customer expect to wait in the queue before they are served, and how long will they have to wait before the service is complete? • What is the probability of a customer having to wait longer than a given time interval before they are served? • What is the average length of the queue?
Typical Questions of Interest • What is the probability that the queue will exceed a certain length? • What is the expected utilization of the server and the expected time period during which he will be fully occupied (remember servers cost us money so we need to keep them busy). In fact if we can assign costs to factors such as customer waiting time and server idle time then we can investigate how to design a system at minimum total cost.
Typical Problems • Is it worthwhile to invest effort in reducing the service time? • How many servers should be employed? • Should priorities for certain types of customers be introduced? • Is the waiting area for customers adequate?
Basic Approaches to Solving Problems/Questions • analytic methods or queuing theory (formula based) this is only available for relatively simple queuing systems • simulation (computer based) Complex queuing systems are almost always analyzed using discrete event simulation.
Queuing Notations It is common to use to use the symbols: • lambdal to be the mean (or average) number of arrivals per time period, i.e. the mean arrival rate • mu µ to be the mean (or average) number of customers served per time period, i.e. the mean service rate
Queuing Notations Standard notation system A/B/C/D/E to classify queuing systems where: • A represents the prob’ty distribution for the arrival process • B represents the probability distribution for the service process • C represents the number of channels (servers) • D represents the maximum number of customers allowed in the queuing system (either being served or waiting for service) • E represents the maximum number of customers in total
Queuing Notations Common options for A and B are: • M for an exponential interarrival (Poisson arrival distribution) or an exponential service time distribution • D for a deterministic or constant value (called also a degenerate distribution) • Ek for an Erlang distribution • G for a general distribution (but with a known mean and variance) If D and E are not specified then it is assumed that they are infinite.
Single Server Queue The M/M/1 queuing system, • the simplest queuing system • has a Poisson arrival distribution, an exponential service time distribution and a single channel (one server). • Since D and E are not specified, then it is assumed that they are infinite.
Single Server Queue Example • Suppose we have a single server in a shop and customers arrive in the shop with a Poisson arrival distribution at a mean rate of lambda=24 customers per hour, i.e. on average one customer appears every 1/lambda = 1/24 hours=2.5 minutes. • Interarrival times have an exponential distribution with an average interarrival time of 2.5 minutes.
Single Server Queue Example • The server has an exponential service time distribution with a mean service rate of 30 customers per hour, i.e. the service rate µ=30 customers per hour. • As we have a Poisson arrival rate, an exponential service time, and a single server we have a M/M/1 queue in terms of the standard notation.
P0 = 1 - Probability that no customers are in the system (either in the queue or being served) n n Pn = • P0 Probability of exactly n customers in the system = 1 - Average number of customers in the system L = - ( - ) Average number of customers in the waiting line Lq = Formulas for Single-Server Model
L Average time a customer spends in the queuing system 1 - W = = Average time a customer spends waiting in line to be served ( - ) Wq = Probability that the server is busy and the customer has to wait = Probability that the server is idle and a customer can be served = 1 - = 1 - = P0 Formulas for Single-Server Model
Probability of no customers in the system 24 30 P0 = 1 - = 1 - = 0.20 Average number of customers in the system 24 30 - 24 L = = = 4 - Average number of customers waiting in line (24)2 30(30 - 24) 2 ( - ) Lq = = = 3.2 A Single-Server Model Given = 24 per hour, = 30 customers per hour
1 - 1 30 - 24 Average time in the system per customer W = = = 0.167 hour 24 30(30 - 24) (-) Average time waiting in line per customer Wq = = = 0.133 24 30 Probability that the server will be busy and the customer must wait = = = 0.80 Probability the server will be idle 1 - = 1 - 0.80 = 0.20 A Single-Server Model Given = 24 per hour, = 30 customers per hour
Single Server Queue Example Note the first line of the output says that the results are from a formula. For this very simple queuing system, there are exact formulae that give these statistics in the output under the assumption that the system has reached a steady state - that is that the system has been running long enough so as to settle down into some kind of equilibrium position.
Single Server Queue Example If customers are served faster than they arrive, i.e., l<m • System utilization or traffic intensity U= (arrival rate)/(departure rate) =l/m Traffic intensity is a measure of the congestion of the system. If it is near to zero there is very little queuing and in general as the traffic intensity increases (to near 1) the amount of queuing increases. For the system we have considered above the arrival rate is 24 and the departure rate is 30 so the traffic intensity is 24/30 = 0.80
Single Server Queue Example • Average number of customers in the queuing system (customers being serviced and in the waiting line) is L= l/(m-l) Here, 24/(30-24) = 4.0 • Average number of customers in the waiting line is Lq= (U) l/(m-l) Here, (0.8) 24/(30-24) = 3.2
Single Server Queue Example • Average time a customer spends in the queuing system is W= L/l Here, 4.0/24=0.1667 • Average time a customer spends in the waiting line is Wq= Lq/ l Here, (3.2)/24=0.1333 Note: The relationship L= lW is called Little’s formula. (John D. C. Little, 1961)
Single Server Queue Example • Probability server is idle (i.e. an arriving customer can be served) is I= (1- l/m) Here, 1-24/30=0.20 Note this is the same as the probty that no customers are in the queuing system. • Probability an arriving customer has to wait 1-I Here, 1-0.2 =0.8