Presentation is loading. Please wait.

Presentation is loading. Please wait.

Queuing Theory.

Similar presentations


Presentation on theme: "Queuing Theory."— Presentation transcript:

1 Queuing Theory

2 Overview 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. Queuing analysis is a probabilistic form of analysis. The results are referred to as operating characteristics. Results are used by managers of queuing operations to make decisions. Chapter 13 - Queuing Analysis

3 Some Queuing Terminology
To describe a queuing system, an input process and an output process must be specified. Examples of input and output processes are: Situation Input Process Output Process Bank Customers arrive at bank Tellers serve the customers Pizza parlor Request for pizza delivery are received Pizza parlor send out truck to deliver pizzas

4 The Input or Arrival Process
The input process is usually called the arrival process. Arrivals are called customers. We assume that no more than one arrival can occur at a given instant. If more than one arrival can occur at a given instant, we say that bulk arrivals are allowed. Models in which arrivals are drawn from a small population are called finite source models. If a customer arrives but fails to enter the system, we say that the customer has balked.

5 The Output or Service Process
To describe the output process of a queuing system, we usually specify a probability distribution – the service time distribution – which governs a customer’s service time. We study two arrangements of servers: servers in parallel and servers in series. Servers are in parallel if all servers provide the same type of service and a customer needs only pass through one server to complete service. Servers are in series if a customer must pass through several servers before completing service.

6 Queue Discipline The queue discipline describes the method used to determine the order in which customers are served. The most common queue discipline is the FCFS discipline (first come, first served), in which customers are served in the order of their arrival. Under the LCFS discipline (last come, first served), the most recent arrivals are the first to enter service. If the next customer to enter service is randomly chosen from those customers waiting for service it is referred to as the SIRO discipline (service in random order).

7 Finally we consider priority queuing disciplines.
A priority discipline classifies each arrival into one of several categories. Each category is then given a priority level, and within each priority level, customers enter service on a FCFS basis. Another factor that has an important effect on the behavior of a queuing system is the method that customers use to determine which line to join.

8 Modeling Arrival and Service Processes
We define ti to be the time at which the ith customer arrives. In modeling the arrival process we assume that the inter arrival times are independent, continuous random variables. The assumption that each inter arrival time is governed by the same random variable implies that the distribution of arrivals is independent of the time of day or the day of the week. This is the assumption of stationary inter arrival times.

9 Modeling Arrival and Service Processes
X = t

10 The syntax of the EXCEL EXPONDIST function is as follows:
=EXPONDIST(x,Lambda,TRUE) gives the probability that an exponential random variable with parameter Lambda assumes a value less than or equal to x. =EXPONDIST(x,Lambda,FALSE) gives the probability that an exponential random variable with parameter Lambda assumes a value less than or equal to x.

11 Exponential Distribution Properties
Memoryless property. No additional information about the time left for the completion of a service, is gained by recording the time elapsed since the service started Exponential and the Poisson distributions are related to one another. If customer arrivals follow a Poisson distribution with mean rate l, their interarrival times are exponentially distributed with mean time 1/l.

12 The Waiting Time Paradox
Suppose the time between the arrival of buses at the student center is exponentially distributed with a mean of 60 minutes. If we arrive at the student center at a randomly chosen instant, what is the average amount of time that we will have to wait for a bus? The no-memory property of the exponential distribution implies that no matter how long it has been since the last bus arrived, we would still expect to wait an average of 60 minutes until the next bus arrived.

13 The Poisson Arrival Process
(lt)ke- lt k! P(X = k) = Where l = mean arrival rate per time unit t = the length of the interval e = (base of natural logarithms) k! = k (k -1) (k -2) (k -3) … (3) (2) (1)

14 Relations between Poisson Distribution and Exponential Distribution
If interarrival times are exponential, the probability distribution of the number of arrivals occurring in any time interval of length t is given by the following important theorem. Theorem 1: Interarrival times are exponential with parameter λ if and only if the number of arrivals to occur in an interval of length t follows the Poisson distribution with parameter λt.

15 Using EXCEL to Computer Poisson and Exponential Probabilities
EXCEL contains functions that facilitate the computation of probabilities concerning the Poisson and Exponential random variable. The syntax of the Poisson EXCEL function is as follows: =POISSON(x,Mean,True) gives probability that a Poisson random variable with mean = Mean is less than or equal to x. =POISSON(x,Mean,False) gives probability that a Poisson random variable with mean =Mean is equal to x.

16 The Erlang Distribution
If interarrival times do not appear to be exponential they are often modeled by an Erlang distribution. An Erlang distribution is a continuous random variable (call it T) whose density function f(t) is specified by two parameters: a rate parameter R and a shape parameter k (k must be a positive integer). Given values of R and k, the Erlang density has the following probability density function:

17 The Kendall-Lee Notation for Queuing Systems
Standard notation used to describe many queuing systems. The notation is used to describe a queuing system in which all arrivals wait in a single line until one of s identical parallel servers is free. Then the first customer in line enters service, and so on. To describe such a queuing system, Kendall devised the following notation. Each queuing system is described by six characters: 1/2/3/4/5/6

18 The first characteristic specifies the nature of the arrival process
The first characteristic specifies the nature of the arrival process. The following standard abbreviations are used: M = Interarrival times are independent, identically distributed (iid) and exponentially distributed D = Interarrival times are iid and deterministic Ek = Interarrival times are iid Erlangs with shape parameter k. GI = Interarrival times are iid and governed by some general distribution

19 The second characteristic specifies the nature of the service times:
M = Service times are iid and exponentially distributed D = Service times are iid and deterministic Ek = Service times are iid Erlangs with shape parameter k. G = Service times are iid and governed by some general distribution

20 The third characteristic is the number of parallel servers.
The fourth characteristic describes the queue discipline: FCFS = First come, first served LCFS = Last come, first served SIRO = Service in random order GD = General queue discipline The fifth characteristic specifies the maximum allowable number of customers in the system. The sixth characteristic gives the size of the population from which customers are drawn.

21 In many important models 4/5/6 is GD/∞/∞
In many important models 4/5/6 is GD/∞/∞. If this is the case, then 4/5/6 is often omitted. M/E2/8/FCFS/10/∞ might represent a health clinic with 8 doctors, exponential interarrival times, two-phase Erlang service times, a FCFS queue discipline, and a total capacity of 10 patients.

22 Birth-Death Processes
We subsequently use birth-death processes to answer questions about several different types of queuing systems. We define the number of people present in any queuing system at time t to be the state of the queuing systems at time t. We call πj the steady state, or equilibrium probability, of state j.

23 A birth-death process is a continuous-time stochastic process for which the system’s state at any time is a nonnegative integer.

24 M|M|1 Queue Poisson arrival process.
Exponential service time distribution. A single server. Potentially infinite queue. Departures at rate l Arrivals at rate l Service at rate m

25 Notation = Utilization factor (% of time server is busy)
P0 = Probability of no customers in system Pn = Probability n customers in system L = Average number of customers in system Lq = Average number of customers in queue W = Average time in system Wq = Average time in queue

26 M|M|1- Performance Measures
r = l / m P0 = 1 – r Pn = rn (1 – r) L = r /(1 – r) Lq = r2 /(1 – r) W = 1 /(m – l) Wq = r /(m – l) Probability a customer is in the system for more than t periods: P(X>t) = e-(m - l)t

27 Little’s Formulas Little’s Formulas represent important relationships between L, Lq, W, and Wq. Provided: System is Single Queue, Customers arrive at a finite arrival rate l, and System operates in steady state L = l W Lq = l Wq L = Lq + l/m

28 M|M|1- Models  = 24 customers per hour arrive at checkout counter
 = 30 customers per hour can be checked out

29 M|M|1- Models

30 Example Suppose that all car owners fill up when their tanks are exactly half full. At the present time, an average of 7.5 customers per hour arrive at a single-pump gas station. It takes an average of 4 minutes to service a car. Assume that interarrival and service times are both exponential. For the present situation, compute L and W.

31 Suppose that a gas shortage occurs and panic buying takes place.
To model the phenomenon, suppose that all car owners now purchase gas when their tank are exactly three-fourths full. Since each car owner is now putting less gas into the tank during each visit to the station, we assume that the average service time has been reduced to 3 1/3 minutes. How has panic buying affected L and W?

32 Solutions We have an M/M/1/GD/∞/∞ system with λ = 7.5 cars per hour and µ = 15 cars per hour. Thus p = 7.5/15 = .50. L = .50/1-.50 = 1, and W = L/λ = 1/7.5 = 0.13 hour. Hence, in this situation, everything is under control, and long lines appear to be unlikely. We now have an M/M/1/GD/∞/∞ system with λ = 2(7.5) = 15 cars per hour. Now µ = 60/3.333 = 18 cars per hour, and p = 15/18 = 5/6. Then Thus, panic buying has cause long lines.

33 A Simple Example Example Solution
A restaurant uses an average of 10,000 pounds of potatoes per week. The average number of pounds of potatoes on hand is 5000 pounds. On the average, how long do potatoes stay in the restaurant before being used? Solution We are given that L=5000 pounds and λ = 10,000 pounds/week. Therefore W = 5000 pounds/(10,000 pounds/week)=.5 weeks.

34 A Queueing Model Optimization
Problems in which a decision maker must choose between alternative queueing systems Example: An average of 10 machinists per hour arrive seeking tools. At present, the tool center is staffed by a clerk who is paid $6 per hour and who takes an average of 5 minutes to handle each request for tools. Since each machinist produces $10 worth of goods per hour, each hour that a machinists spends at the tool center costs the company $10. The company is deciding whether or not it is worthwhile to hire (at $4 per hour) a helper for the clerk. If the helper is hired the clerk will take an average of only 4 minutes to process requirements for tools. Assume that service and arrival times are exponential. Should the helper be hired?

35 A Queueing Model Optimization
Goal: Minimize the sum of the hourly service cost and expected hourly cost due to the idle times of machinists Delay cost is the component of cost due to customers waiting in line Goal: Minimize Expected cost/hour = service cost/hour + expected delay cost/hour Expected delay cost/hour = (expected delay cost/customer) (expected customers/hour) Expected delay cost/customer = ($10/machinist-hour)(average hours machinist spends in the system) = 10W Expected delay cost/hour = 10W Now compute expected cost/hour if the helper is not hired and also compute the same if the helper is hired

36 A Queueing Model Optimization
If the helper is not hired  = 10 machinists per hour and  = 12 machinists per hour W = 1/(-) for M/M/1/GD//. Therefore, W = 1/(12-10) = ½ = 0.5 hour Service cost /hour = $6/hour and expected delay cost/hour = 10(0.5)(10) = $50 Without the helper, the expected hourly cost is $6 + $50 = $56 With the helper,  = 15 customers/hour. Then W = 1/(-)= 1/(15-10) = 0.2 hour and the expected delay cost/hour = 10(0.2)(10) = $20 Service cost/hour = $6 + $4 = $10/hour With the helper, the expected hourly cost is $10 + $20 = $30

37 8.5 The M/M/1/GD/c/∞ Queuing System
The M/M/1/GD/c/∞ queuing system is identical to the M/M/1/GD/∞/∞ system except for the fact that when c customers are present, all arrivals are turned away and are forever lost to the system.

38 A one-man barber shop has a total of 10 seats
A one-man barber shop has a total of 10 seats. Inter-arrival times are exponentially distributed, and an average of 20 prospective customers arrive each hour at the shop. Those customers who find the shop full do not enter. The barber takes an average of 12 minutes to cut each customer’s hair. Haircut times are exponentially distributed. On the average how many haircuts per hour will the barber complete? On the average, how much time will be spent in the shop by a customer who enters?

39 The M/M/s/GD/∞/∞ Queuing System
We now consider the M/M/s/GD/∞/∞ system. We assume that interarrival times are exponential (with rate λ), service times are exponential (with rate µ), and there is a single line of customers waiting to be served at one of the s parallel servers. If j ≤ s customers are present, then all j customers are in service; if j >s customers are present, then all s servers are occupied, and j – s customers are waiting in line.

40 An M/M/s Queueing Optimization Example

41 M/M/s 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 inter-arrival times and service times are exponential. Determine The expected number of customers present in the bank The expected length of time a customer spends in the bank The fraction of time that a particular teller is idle.

42 M/M/s/GD/c/∞ - Multiple server waiting queue problem with exponential arrival and service times with finite capacity

43 An M/M/s Queueing Example
Bank Staffing Example: The manager of a bank must determine how many tellers should work on Fridays. For every minute a customer stands in line, the manager believes that a delay cost of 5 cents is incurred. An average of 2 customers per minute arrive at the bank. On the average it takes, a teller 2 minutes to complete a customer’s transaction. It costs the bank $9 per hour to hire a teller. Inter-arrival times and service times are exponential. To minimize the sum of service costs and delay costs, how many tellers should the bank have working on Fridays?  = 2 customer per minute and  = 0.5 customer per minute, /s requires that 4/s < 1. Thus, there must be at least 5 tellers, or the number of customers present will “blow up.” Now compute for s = 5, 6…. Expected service cost/minute + expected delay cost/minute

44 An M/M/s Queueing Optimization Example
Each teller is paid $9/60 = 15 cents per minute. Expected service cost/minute = 0.15s Expected delay cost/minute = (expected customers/minute) (expected delay cost/customer) Expected delay cost/customer = 0.05Wq Expected delay cost/minute = 2(0.05) Wq = 0.10 Wq For s = 5,  =/s = 2/.5(5) = 0.8

45 An M/M/s Queueing Optimization Example
P(j  5)=0.55 Wq = .55/(5(.5)-2) = 1.1 minutes For s = 5, expected delay cost/minute = 0.10(1.1) = 11 cents For s = 5, total expected cost/minute = 0.15(5) = 86 cents Since s = 6 has a service cost per minute of 6(0.15) = 90 cents, 6 tellers cannot have a lower total cost than 5 tellers. Hence, having 5 tellers serve is optimal

46 A Township Police Department has 5 patrol cars
A Township Police Department has 5 patrol cars. A patrol car breaks down and requires service once every 30 days. The police department has two repair workers, each of whom takes an average of 3 days to repair a car. Breakdown times and repair times are exponential. Determine the average number of police cars in good condition Find average down time for car needing repairs Find the fraction of time a particular repair worker is idle


Download ppt "Queuing Theory."

Similar presentations


Ads by Google