Presentation is loading. Please wait.

Presentation is loading. Please wait.

Queuing Models (Waiting Lines)

Similar presentations


Presentation on theme: "Queuing Models (Waiting Lines)"— Presentation transcript:

1 Queuing Models (Waiting Lines)

2

3 Service Configuration
Single channel, single phase. One server, one phase of service. Single channel, multi-phase. One server, multiple phases in service. Multi-channel, single phase. Multiple servers, one phase of service. Multi-channel, multi-phase. Multiple servers, multiple phases of service.

4 Single Channel, Single Phase
Arrivals Served units Service facility Queue Service system Dock Waiting ship line Ships at sea Ship unloading system Empty ships 63

5 Single Channel, Multi-Phase
Service system Served units Arrivals Queue Service facility Service facility McDonald’s drive-through Cars in area Cars & food Waiting cars Pay Pick-up 64

6 Multi-Channel, Single Phase
Arrivals Served units Service facility Queue Service system Example: Bank customers wait in single line for one of several tellers. 62

7 Multi-Channel, Multi-Phase
Service facility Arrivals Served units Queue Service system Example: At a laundromat, customers use one of several washers, then one of several dryers. 63

8 Examples of Real World Queuing Systems?
Commercial Queuing Systems Commercial organizations serving external customers Ex. Dentist, bank, ATM, gas stations, plumber, garage … Transportation service systems Vehicles are customers or servers Ex. Vehicles waiting at toll stations and traffic lights, trucks or ships waiting to be loaded, taxi cabs, fire engines, elevators, buses … Business-internal service systems Customers receiving service are internal to the organization providing the service Ex. Inspection stations, conveyor belts, computer support … Social service systems Ex. Judicial process, the ER at a hospital, waiting lists for organ transplants or student dorm rooms …

9 Why is Queuing Analysis Important?
Capacity problems are very common in industry and one of the main drivers of process redesign Need to balance the cost of increased capacity against the gains of increased productivity and service Queuing and waiting time analysis is particularly important in service systems Large costs of waiting and of lost sales due to waiting Prototype Example – ER at County Hospital Patients arrive by ambulance or by their own accord One doctor is always on duty More and more patients seeks help  longer waiting times Question: Should another MD position be instated?

10 Principal Queue Parameters
Calling Population Arrival Process Service Process Number of Servers Queue Discipline

11 1. The Calling Population
Population of customers or jobs The size can be finite or infinite The latter is most common Can be homogeneous Only one type of customers/ jobs Or heterogeneous Several different kinds of customers/jobs

12 2. Arrival Process In what pattern do jobs / customers arrive to the queueing system? Distribution of arrival times? Batch arrivals? Finite population? Finite queue length? Poisson arrival process often assumed Many real-world arrival processes can be modeled using a Poisson process

13 3. Service Process How long does it take to service a job or customer?
Distribution of arrival times? Rework or repair? Service center (machine) breakdown? Exponential service times often assumed Works well for maintenance or unscheduled service situations

14 5. Queue Discipline How are jobs / customers selected from the queue for service? First Come First Served (FCFS) Shortest Processing Time (SPT) Earliest Due Date (EDD) Priority (jobs are in different priority classes) FCFS default assumption for most models

15

16 Notation Example M/M/3/20/1500/FCFS – single queue system with:
Exponentially distributed arrivals Exponentially distributed service times Three servers Capacity 20 (queue size is 20 – 3 = 17) Population is 1500 total Service discipline is FCFS Often, assume infinite queue and infinite population and FCFS, so just  M/M/3

17 Avg Number in System (L )
A Queuing System Average Wait in Queue (Wq ) Service Arrival Rate ( Departure Average Number in Queue (Lq ) Rate ( Avg Time in System (W ) Avg Number in System (L )

18 Queuing Theory Variables
Lambda ( λ ) is the average arrival rate of people or items into the service system. It can be expressed in seconds, minutes, hours, or days.

19 Queuing Theory Variables
Mu ( μ ) is the average service rate of the service system. It can be expressed as the number of people or items processed per second, minute, hour, or day.

20 Queuing Theory Variables
Rho ( ρ ) is the % of time that the service facility is busy on the average. It is also known as the utilization rate. “BUSY” IS DEFINED AS AT LEAST ONE PERSON OR ITEM IN THE SYSTEM

21 Queuing Theory Variables
Po or ( 1 – ρ ) is the percentage of time that the service facility is idle. Ls is the average number of people or items in the service system both waiting to be served and currently being served. Lq is the average number of people or items in the waiting line ( queue ) only !

22 Queuing Theory Variables
Ws is the average time a customer or item spends in the service system, both waiting and receiving service. Wq is the average time a customer or item spends in the waiting line ( queue ) only. Pw is the probability that a customer or item must wait to be served.

23 Queuing Theory Variables
The average number of customers or items processed by the entire service system “Mμ” is the effective service rate.* It can be expressed in seconds, minutes, hours, or days * [ NUMBER OF SERVERS ] x [ AVERAGE SERVICE RATE PER SERVER ]

24 IMPORTANT CONSIDERATION
The average service rate must always exceed the average arrival rate. Otherwise, the queue will grow to infinity. μ > λ THERE WOULD BE NO SOLUTION !

25 Steady State Performance Measures
P0 = Probability that there are no customers in the system. Pn = Probability that there are “n” customers in the system. L = Average number of customers in the system. Lq = Average number of customers in the queue. W = Average time a customer spends in the system. Wq = Average time a customer spends in the queue. Pw = Probability that an arriving customer must wait for service. r = Utilization rate for each server (the percentage of time that each server is busy).

26 Birth-and-Death Processes
The foundation of many of the most commonly used queuing models Birth – equivalent to the arrival of a customer or job Death – equivalent to the departure of a served customer or job Assumptions Given N(t)=n, The time until the next birth (TB) is exponentially distributed with parameter n (Customers arrive according to a Po-process) The remaining service time (TD) is exponentially distributed with parameter n TB & TD are mutually independent stochastic variables and state transitions occur through exactly one Birth (n  n+1) or one Death (n  n–1)

27 A Birth-and-Death Process Rate Diagram
Excellent tool for describing the mechanics of a Birth-and-Death process 0 1 n-1 n 1 2 n-1 n n+1 1 2 n n+1 n = State n, i.e., the case of n customers/jobs in the system

28 Steady State Analysis of B-D Processes (I)
In steady state the following balance equation must hold for every state n (proved via differential equations) The Rate In = Rate Out Principle: Mean entrance rate = Mean departure rate In addition the probability of being in one of the states must equal 1

29 Steady State Analysis of B-D Processes (II)
Balance Equation 1 n C0 C2

30

31

32

33

34 Steady State Analysis of B-D Processes (III)
Steady State Probabilities Expected Number of Jobs in the System and in the Queue Assuming c parallel servers

35

36 q

37

38 M/M/1 Model Type: Single server, single phase system.
Input source: Infinite; no balks, no reneging. Queue: Unlimited; single line; FIFO (FCFS). Arrival distribution: Poisson. Service distribution: Negative exponential.

39 The M/M/1 Model n=  and n = for all values of n=0, 1, 2, …
1 n n-1 2 n+1 Steady State condition:  = (/) < 1 Pn = n(1- ) P0 = 1- P(nk) = k Ls=/(1- ) Lq= 2/(1- ) = Ls- Ws=Ls/=1/(- ) Wq=Lq/=  /( (- ))

40 M/M/1 Model Equations =  -  = 1  - 
Average # of customers in system: L s =  -  Average time in system: W s = 1  -  Average # of customers in queue: L q = 2  ( -  ) Average time in queue: W q =  ( -  ) = System utilization

41

42

43

44

45

46 M/M/S Model Type: Multiple servers; single-phase.
Input source: Infinite; no balks, no reneging. Queue: Unlimited; multiple lines; FIFO (FCFS). Arrival distribution: Poisson. Service distribution: Negative exponential.

47 M/M/S Equations Probability of zero people or units in the system:
Average number of people or units in the system: Average time a unit spends in the system: Note: M = number of servers in these equations

48 M/M/S Equations Average number of people or units waiting for service:
Average time a person or unit spends in the queue:

49 M/M/2 Model Equations  (2 + )(2 -) W = 4 42 - 2 L  W 2 2 -
42 - 2 L q  W 2 P 2 - 2 + Average time in system: Average time in queue: Average # of customers in queue: Average # of customers in system: Probability the system is empty:

50 Example #1 M/M/2/3

51

52

53 Example 2 Consider the M/M/3/4 queue with arrival rate λ = 4 per minute and service rate μ = 1 per minute at each server. a. Draw a transition diagram for this queue. b. Find the steady-state distribution of the system. c. When the system is running in steady state, find: i. The mean number of customers in the system. ii. Ls, Lq, Ws, Wq .

54

55

56

57 Simulation – What is it? Experiment with a model mimicking the real world system Ex. Flight simulation, wind tunnels, … In BPD situations computer based simulation is used for analyzing and evaluating complex stochastic systems Uncertain service and inter-arrival times

58 Simulation – Why use it? Cheaper and less risky than experimenting with the actual system. Stimulates creativity since it is easy to test the effect of new ideas A powerful complement to the traditional symbolical and analytical tools Fun tool to work with!

59 Simulation v.s. Symbolic & Analytical Tools
Strengths Provides a quantitative measure Flexible – can handle any kind of complex system or statistical interdependencies Capable of finding inefficiencies otherwise not detected until the system is in operation Weaknesses Can take a long time to build Usually requires a substantial amount of data gathering Easy to misrepresent reality and draw faulty conclusions Generally not suitable for optimizing system parameters A simulation model is primarily descriptive while an optimization model is by nature prescriptive

60 Modern Simulation Software Packages are Breaking Compromises
Graphical interfaces Achieves the descriptive benefits of symbolic tools like flow charts Optimization Engines Enables efficient automated search for best parameter values

61 Building a Simulation Model
General Principles The system is broken down into suitable components or entities The entities are modeled separately and are then connected to a model describing the overall system A bottom-up approach! The basic principles apply to all types of simulation models Static or Dynamic Deterministic or Stochastic Discrete or continuous In BPD and OM situations computer based Stochastic Discrete Event Simulation (e.g. in Extend) is the natural choice Focuses on events affecting the state of the system and skips all intervals in between

62 Steps in a BPD Simulation Project
1. Problem formulation 2. Set objectives and overall project plan Phase 1 Problem Definition 3. Model conceptualization 4. Data Collection 5. Model Translation 6. Verified 7. Validated Yes No Phase 2 Model Building Phase 3 Experimentation 11. Documentation, reporting and implementation Phase 4 Implementation 8. Experimental Design 9. Model runs and analysis 10. More runs No Yes

63 Model Verification and Validation
Verification (efficiency) Is the model correctly built/programmed? Is it doing what it is intended to do? Validation (effectiveness) Is the right model built? Does the model adequately describe the reality you want to model? Does the involved decision makers trust the model? Two of the most important and most challenging issues in performing a simulation study

64 Model Verification Methods
Find alternative ways of describing/evaluating the system and compare the results Simplification enables testing of special cases with predictable outcomes Removing variability to make the model deterministic Removing multiple job types, running the model with one job type at a time Reducing labor pool sizes to one worker Build the model in stages/modules and incrementally test each module Uncouple interacting sub-processes and run them separately Test the model after each new feature that is added Simple animation is often a good first step to see if things are working as intended

65 Validation - an Iterative Calibration Process
The Real System Calibration and Validation Conceptual validation Conceptual Model Assumptions on system components Structural assumptions which define the interactions between system components 3. Input parameters and data assumptions Operational Model (Computerized representation) Model verification

66 Example – Simulation of a M/M/1 Queue
Assume a small branch office of a local bank with only one teller. Empirical data gathering indicates that inter-arrival and service times are exponentially distributed. The average arrival rate =  = 5 customers per hour The average service rate =  = 6 customers per hour Using our knowledge of queuing theory we obtain  = the server utilization = 5/6  0.83 Lq = the average number of people waiting in line Wq = the average time spent waiting in line Lq = 0.832/(1-0.83)  4.2 Wq = Lq/   4.2/5  0.83 How do we go about simulating this system? How do the simulation results match the analytical ones?

67 Summary

68 Steady State Assumptions
Mean arrival rate , mean service rate , and the number of servers are constant. The service rate is greater than the arrival rate. These conditions have existed for a long time.

69 Performance Measures (4/4)
In order to achieve steady state, the effective arrival rate must be less than the sum of the effective service rates . k servers l< m For one server l< m1 +m2+…+mk For k servers with service rates mi l< km Each with service rate of m

70 Little’s Formulas Little’s Formulas represent important relationships between L, Lq, W, and Wq. These formulas apply to systems that meet the following conditions: Single queue systems, Customers arrive at a finite arrival rate l, and The system operates under a steady state condition. L = l W Lq = l Wq L = Lq + l/m For the case of an infinite population

71 Classification of Queues
Queuing system can be classified by: Arrival process. Service process. Number of servers. System size (infinite/finite waiting line). Population size. Notation M (Markovian) = Poisson arrivals or exponential service time. D (Deterministic) = Constant arrival rate or service time. G (General) = General probability for arrivals or service time. Example: M / M / 6 / 10 / 20

72 M / M /1 Queue - Performance Measures
P0 = 1 – (l/m) Pn = [1 – (l/m)](l/m)n L = l /(m – l) Lq = l2 /[m(m – l)] W = 1 /(m – l) Wq = l /[m(m – l)] Pw = l / m r = l / m The probability that a customer waits in the system more than “t” is P(X>t) = e-(m - l)t

73 Solved Problems

74 The Post Office Queuing Theory
Problem 1 A post office has a single line for customers to use while waiting for the next available postal clerk. There are two postal clerks who work at the same rate. The arrival rate of customers follows a poisson dis- tribution, while the service time follows an exponential distribution. The average arrival rate is one customer every three ( 3 ) minutes and the average service rate is one customer every two ( 2 ) minutes for each of the two clerks. The facility is idle 50% of the time ( Po = .50 ).

75 The Post Office Queuing Theory
REQUIREMENT: What is the average length of the line? How long does the average person spend waiting for a clerk to become available? What proportion of the time are both clerks idle? Po = .50 BUT NOW SHOW ALL SUPPORTING CALCULATIONS

76 The Post Office Queuing Theory
Problem 1 Given: λ = 20 and μ = 30 ( per hour rates ) and M = 2 The average number of customers in the system ( L ) * : Po = .50 2 ( 20 x 30 ) ( .67 ) ( )! (2 x 30 – 20) x ( .50 ) + .67 Ls = 2 600 ( ) X ( .50 ) = Ls = 2 ( 60 – 20 ) * L sneeds to be calculated before Lq can be found.

77 The Post Office Queuing Theory
Problem 1 Given: λ = 20 and μ = 30 ( per hour rates ) and M = 2 The average length of the line ( Lq ) : Lq = Ls – ( λ / μ ) Lq = – ( 20 / 30 ) =

78 The Post Office Queuing Theory
REQUIREMENT: What is the average length of the line? How long does the average person spend waiting for a clerk to become available? What proportion of the time are both clerks idle? Po = .50 BUT NOW SHOW ALL SUPPORTING CALCULATIONS

79 The Post Office Queuing Theory
Problem 1 The average time in the system ( Ws ) : Ws = Ls / λ = ( / 20 ) = of an hour or 2.25 minutes The average time in the queue ( Wq ) : Wq = Lq / λ = ( / 20 ) = of an hour or .25 minutes

80 The Post Office Queuing Theory
REQUIREMENT: What is the average length of the line? How long does the average person spend waiting for a clerk to become available? What proportion of the time are both clerks idle? Po = .50 BUT NOW SHOW ALL SUPPORTING CALCULATIONS

81 The Post Office Queuing Theory
1 Po = 2 1 x x (30) 0! ! (2)(1) (30) - 20 + + 1 Po = [ ] ( ) ( 1.5 ) Po = THE PROBABILITY THAT THE POST OFFICE IS IDLE

82 The Post Office Revisited Queuing Theory
Problem 2 A post office has a single line for customers to use while waiting for the next available postal clerk. There are three postal clerks who work at the same rate. The arrival rate of customers follows a poisson dis- tribution, while the service time follows an exponential distribution. The average arrival rate is one customer every three ( 3 ) minutes and the average service rate is one customer every two minutes for each of the three clerks. The facility is idle 51.22% of the time ( Po = ).

83 The Post Office Revisited Queuing Theory
REQUIREMENT: What is the average length of the line? How long does the average person spend waiting for a clerk to become available? What proportion of the time are all three clerks idle? Po = BUT NOW SHOW ALL SUPPORTING CALCULATIONS

84 The Post Office Revisted Queuing Theory
Problem 2 Given: λ = 20 and μ = 30 ( per hour rates ) and M = 3 The average number of customers in the system ( L ) * : 3 ( 20 x 30 ) ( .67 ) ( )! (3 x 30 – 20) Po = .5122 Given x ( ) + .67 Ls = 2 600 ( ) X ( ) = Ls = 2 2! ( 90 – 20 ) * L sneeds to be calculated before Lq can be found.

85 The Post Office Revisited Queuing Theory
Problem 2 Given: λ = 20 and μ = 30 ( per hour rates ) and M = 3 The average length of the line ( Lq ) : Lq = Ls – ( λ / μ ) Lq = – ( 20 / 30 ) =

86 The Post Office Revisted Queuing Theory
REQUIREMENT: What is the average length of the line? How long does the average person spend waiting for a clerk to become available? What proportion of the time are all three clerks idle? Po = BUT NOW SHOW ALL SUPPORTING CALCULATIONS

87 The Post Office Revisited Queuing Theory
Problem 2 The average time in the system ( Ws ) : Ws = Ls / λ = ( / 20 ) = of an hour or minutes The average time in the queue ( Wq ) : Wq = Lq / λ = ( / 20 ) = of an hour or .028 minutes

88 The Post Office Revisited Queuing Theory
REQUIREMENT: What is the average length of the line? How long does the average person spend waiting for a clerk to become available? What proportion of the time are all three clerks idle? Po = BUT NOW SHOW ALL SUPPORTING CALCULATIONS

89 The Post Office Revisited Queuing Theory
1 Po = 3 1 2 x x (30) 0! ! ! (3)(2)(1) (30) - 20 + + + 1 Po = [ ] ( ) ( ) Po ≈ THE PROBABILITY THAT THE POST OFFICE IS IDLE

90 The Computer Technician Queuing Theory
Problem 3 A technician monitors a group of five (5) computers that run an automated manufacturing facility. It takes an average of fifteen (15) minutes ( exponentially distributed ) to adjust a computer that developes a problem. The computers run for an average of eighty-five (85) minutes ( poisson distributed ) without requiring adjustments.

91 The Computer Technician Queuing Theory
Problem 3 REQUIREMENT : What is the average number of computers waiting for adjustment? What is the average number of computers not in working order? What is the probability that the system is empty? What is the average time in the queue? What is the average time in the system? Note: Po = .344 or 34.4% ( no need to manually compute! )

92 The Computer Technician Queuing Theory
Problem 3 Given: λ = 60/85 = .706 computers ; μ = 4 computers ; N = 5 M = 1 ( technician ) ; Po = .344 Average number of computers waiting for adjustment : Lq = N λ + μ (1 – Po ) λ Lq = 5 – ( .66 ) = 5 – 4.4 = .576 .706

93 The Computer Technician Queuing Theory
Problem 3 REQUIREMENT : What is the average number of computers waiting for adjustment? What is the average number of computers not in working order? What is the probability that the system is empty? What is the average time in the queue? What is the average time in the system? Note: Po = .344 or 34.4% ( no need to manually compute! )

94 The Computer Technician Queuing Theory
Problem 3 The average number of computers not in working order: L s = Lq + ( 1 – Po ) Ls = ( ) = 1.24

95 The Computer Technician Queuing Theory
Problem 3 REQUIREMENT : What is the average number of computers waiting for adjustment? What is the average number of computers not in working order? What is the probability that the system is empty? What is the average time in the queue? What is the average time in the system? Note: Po = .344 or 34.4% ( no need to manually compute! )

96 The Computer Technician Queuing Theory
Problem 3 The probability that the system is empty : Po = ( as given )

97 The Computer Technician Queuing Theory
Problem 3 REQUIREMENT : What is the average number of computers waiting for adjustment? What is the average number of computers not in working order? What is the probability that the system is empty? What is the average time in the queue? What is the average time in the system? Note: Po = .344 or 34.4% ( no need to manually compute! )

98 The Computer Technician Queuing Theory
Problem 3 The average time in the queue : Lq ( N – Ls ) λ Wq = .576 ( 5 – 1.24 )( .706 ) Wq = = of an hour

99 The Computer Technician Queuing Theory
Problem 3 REQUIREMENT : What is the average number of computers waiting for adjustment? What is the average number of computers not in working order? What is the probability that the system is empty? What is the average time in the queue? What is the average time in the system? Note: Po = .344 or 34.4% ( no need to manually compute! )

100 The Computer Technician Queuing Theory
Problem 3 The average time in the system : Ws = W q + ( 1 / μ ) Ws = ( 1 / 4 ) = = of an hour


Download ppt "Queuing Models (Waiting Lines)"

Similar presentations


Ads by Google