Waiting Lines and Queuing Theory Models (2)

50
A Report in Quantitative Management WAITING LINES AND QUEUING THEORY MODELS

Transcript of Waiting Lines and Queuing Theory Models (2)

Page 1: Waiting Lines and Queuing Theory Models (2)

A Report in Quantitative Management

WAITING LINES AND QUEUING THEORY

MODELS

Page 2: Waiting Lines and Queuing Theory Models (2)

Introduction Waiting Line Costs Characteristics of a Queuing System Single-Channel Queuing Model with

Poisson Arrivals and Exponential Service Times

Multichannel Queuing Model with Poisson Arrivals and Exponential Service Times

CHAPTER OUTLINE

Page 3: Waiting Lines and Queuing Theory Models (2)

Queuing theoryQueuing theory is the study of waiting lineswaiting linesIt is one of the oldest and most widely used

quantitative analysis techniquesWaiting lines are an everyday occurrence

for most peopleQueues form in business process as wellThe three basic components of a queuing

process are arrivals, service facilities, and the actual waiting line

Analytical models of waiting lines can help managers evaluate the cost and effectiveness of service systems

INTRODUCTION

Page 4: Waiting Lines and Queuing Theory Models (2)

Most waiting line problems are focused on finding the ideal level of service a firm should provide

In most cases, this service level is something management can control

When an organization doesdoes have control, they often try to find the balance between two extremes

A large stafflarge staff and manymany service facilities generally results in high levels of service but have high costs

WAITING LINE COSTS

Page 5: Waiting Lines and Queuing Theory Models (2)

Having the minimumminimum number of service facilities keeps service costservice cost down but may result in dissatisfied customers

There is generally a trade-off between cost of providing service and cost of waiting time

Service facilities are evaluated on their total total expected costexpected cost which is the sum of service costsservice costs and waiting costswaiting costs

Organizations typically want to find the service level that minimizes the total expected cost

WAITING LINE COSTS

Page 6: Waiting Lines and Queuing Theory Models (2)

Queuing costs and service level

WAITING LINE COSTS

*Optimal Service Level

Co

st

Service Level

Cost of Providing Service

Total Expected Cost

Cost of Waiting Time

Page 7: Waiting Lines and Queuing Theory Models (2)

Three Rivers Shipping operates a docking facility on the Ohio River

An average of 5 ships arrive to unload their cargos each shift

Idle ships are expensiveMore staff can be hired to unload the ships, but

that is expensive as wellThree Rivers Shipping Company wants to

determine the optimal number of teams of stevedores to employ each shift to obtain the minimum total expected cost

THREE RIVERS SHIPPING COMPANY EXAMPLE

Page 8: Waiting Lines and Queuing Theory Models (2)

Three Rivers Shipping waiting line cost analysis

THREE RIVERS SHIPPING COMPANY EXAMPLE

NUMBER OF TEAMS OF STEVEDORES WORKING

1 2 3 4

(a) Average number of ships arriving per shift

5 5 5 5

(b) Average time each ship waits to be unloaded (hours)

7 4 3 2

(c) Total ship hours lost per shift (a x b)

35 20 15 10

(d) Estimated cost per hour of idle ship time

$1,000 $1,000 $1,000 $1,000

(e) Value of ship’s lost time or waiting cost (c x d)

$35,000 $20,000 $15,000 $10,000

(f) Stevedore team salary or service cost

$6,000 $12,000 $18,000 $24,000

(g) Total expected cost (e + f) $41,000 $32,000 $33,000 $34,000

Optimal costOptimal cost

Page 9: Waiting Lines and Queuing Theory Models (2)

There are three parts to a queuing system1. The arrivals or inputs to the system

(sometimes referred to as the calling calling populationpopulation)

2. The queue or waiting line itself3. The service facility

These components have their own characteristics that must be examined before mathematical models can be developed

CHARACTERISTICS OF A QUEUING SYSTEM

Page 10: Waiting Lines and Queuing Theory Models (2)

Arrival Characteristics have three major characteristics, sizesize, patternpattern, and behaviorbehaviorSize of the calling population

Can be either unlimited (essentially infiniteinfinite) or limited (finitefinite)

Pattern of arrivals Can arrive according to a known pattern or can arrive randomlyrandomly Random arrivals generally follow a Poisson distributionPoisson distribution

CHARACTERISTICS OF A QUEUING SYSTEM

Page 11: Waiting Lines and Queuing Theory Models (2)

The Poisson distribution is

CHARACTERISTICS OF A QUEUING SYSTEM

4,... 3, 2, 1, 0, for

XX

eXP

X

!)(

where

P(X) = probability of X arrivalsX = number of arrivals per unit of time = average arrival ratee = 2.7183

Page 12: Waiting Lines and Queuing Theory Models (2)

We find the values of e–

If = 2, we can find the values for X = 0, 1, and 2

CHARACTERISTICS OF A QUEUING SYSTEM

!)(

Xe

XPX

%.)(.

!)( 1413530

1113530

02

002

e

P

%.)(.

!)( 2727060

1213530

12

12

1212

ee

P

%.)(.

)(!)( 2727060

2413530

124

22

2222

ee

P

Page 13: Waiting Lines and Queuing Theory Models (2)

Two examples of the Poisson distribution for arrival rates

CHARACTERISTICS OF A QUEUING SYSTEM

0.30 –

0.25 –

0.20 –

0.15 –

0.10 –

0.05 –

0.00 –

Pro

bab

ilit

y

= 2 Distribution

|0

|1

|2

|3

|4

|5

|6

|7

|8

|9

X

0.25 –

0.20 –

0.15 –

0.10 –

0.05 –

0.00 –P

rob

abil

ity

= 4 Distribution

|0

|1

|2

|3

|4

|5

|6

|7

|8

|9

X

Page 14: Waiting Lines and Queuing Theory Models (2)

Behavior of arrivalsMost queuing models assume customers are patient and will wait in the queue until they are served and do not switch lines

BalkingBalking refers to customers who refuse to join the queue

RenegingReneging customers enter the queue but become impatient and leave without receiving their service

That these behaviors exist is a strong argument for the use of queuing theory to managing waiting lines

CHARACTERISTICS OF A QUEUING SYSTEM

Page 15: Waiting Lines and Queuing Theory Models (2)

Waiting Line CharacteristicsWaiting lines can be either limitedlimited or unlimitedunlimitedQueue discipline refers to the rule by which customers in the line receive service

The most common rule is first-in, first-outfirst-in, first-out (FIFOFIFO)

Other rules are possible and may be based on other important characteristics

Other rules can be applied to select which customers enter which queue, but may apply FIFO once they are in the queue

CHARACTERISTICS OF A QUEUING SYSTEM

Page 16: Waiting Lines and Queuing Theory Models (2)

Service Facility Characteristics Basic queuing system configurations Service systems are classified in terms of the number of channels,

or servers, and the number of phases, or service stops A single-channel systemsingle-channel system with one server is quite common MultichannelMultichannel systemssystems exist when multiple servers are fed by one

common waiting line In a single-phase systemsingle-phase system the customer receives service form just

one server If a customer has to go through more than one server, it is a

multiphase systemmultiphase system

CHARACTERISTICS OF A QUEUING SYSTEM

Page 17: Waiting Lines and Queuing Theory Models (2)

Four basic queuing system configurations

CHARACTERISTICS OF A QUEUING SYSTEM

Single-Channel, Single-Phase System

ArrivalsArrivalsDepartures Departures after Serviceafter Service

Queue

Service Facility

Single-Channel, Multiphase System

ArrivalsArrivalsDepartures Departures after after ServiceService

Queue

Type 1 Service Facility

Type 2 Service Facility

Page 18: Waiting Lines and Queuing Theory Models (2)

Four basic queuing system configurations

CHARACTERISTICS OF A QUEUING SYSTEM

Multichannel, Single-Phase System

ArrivalsArrivals

Queue

Service Facility

1DeparturesDepartures

afterafterService Facility

2

ServiceServiceService Facility

3

Page 19: Waiting Lines and Queuing Theory Models (2)

Four basic queuing system configurations

CHARACTERISTICS OF A QUEUING SYSTEM

Multichannel, Multiphase System

ArrivalsArrivals

Queue

Departures Departures after after ServiceService

Type 2 Service Facility

1

Type 2 Service Facility

2

Type 1 Service Facility

2

Type 1 Service Facility

1

Page 20: Waiting Lines and Queuing Theory Models (2)

Service time distribution Service patterns can be either constant or

random Constant service times are often machine

controlled More often, service times are randomly

distributed according to a negative exponential negative exponential probability distributionprobability distribution

Models are based on the assumption of particular probability distributions

Analysts should take to ensure observations fit the assumed distributions when applying these models

CHARACTERISTICS OF A QUEUING SYSTEM

Page 21: Waiting Lines and Queuing Theory Models (2)

Two examples of exponential distribution for service times

CHARACTERISTICS OF A QUEUING SYSTEM

f (x) = e–x

for x ≥ 0 and > 0

= Average Number Served per Minute

Average Service Time of 1 Hour

Average Service Time of 20 Minutes

f (x)

Service Time (Minutes)

|0

|30

|60

|90

|120

|150

|180

Page 22: Waiting Lines and Queuing Theory Models (2)

D. G. Kendall developed a notation for queuing models that specifies the pattern of arrival, the service time distribution, and the number of channels

It is of the form

IDENTIFYING MODELS USING KENDALL NOTATION

Specific letters are used to represent probability distributions

M = Poisson distribution for number of occurrencesD = constant (deterministic) rateG = general distribution with known mean and

variance

Arrival distribution

Service time distribution

Number of service channels open

Page 23: Waiting Lines and Queuing Theory Models (2)

So a single channel model with Poisson arrivals and exponential service times would be represented by

M/M/1If a second channel is added we would have

M/M/2A three channel system with Poisson arrivals

and constant service time would beM/D/3

A four channel system with Poisson arrivals and normally distributed service times would be

M/G/4

IDENTIFYING MODELS USING KENDALL NOTATION

Page 24: Waiting Lines and Queuing Theory Models (2)

Assumptions of the modelArrivals are served on a FIFO basisNo balking or renegingArrivals are independent of each other but rate is constant over time

Arrivals follow a Poisson distributionService times are variable and independent but the average is known

Service times follow a negative exponential distribution

Average service rate is greater than the average arrival rate

SINGLE-CHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/1)

Page 25: Waiting Lines and Queuing Theory Models (2)

When these assumptions are met, we can develop a series of equations that define the queue’s operating characteristicsoperating characteristics

Queuing EquationsWe let

SINGLE-CHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/1)

= mean number of arrivals per time period = mean number of people or items served

per time period

The arrival rate and the service rate must be for the same time period

Page 26: Waiting Lines and Queuing Theory Models (2)

1. The average number of customers or units in the system, L

SINGLE-CHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/1)

L

2. The average time a customer spends in the system, W

3. The average number of customers in the queue, Lq

1W

)(

2

qL

Page 27: Waiting Lines and Queuing Theory Models (2)

4. The average time a customer spends waiting in the queue, Wq

SINGLE-CHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/1)

)(

qW

5. The utilization factorutilization factor for the system, , the probability the service facility is being used

Page 28: Waiting Lines and Queuing Theory Models (2)

6. The percent idle time, P0, the probability no one is in the system

SINGLE-CHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/1)

10P

7. The probability that the number of customers in the system is greater than k, Pn>k

1

k

knP

Page 29: Waiting Lines and Queuing Theory Models (2)

Arnold’s mechanic can install mufflers at a rate of 3 per hour

Customers arrive at a rate of 2 per hour = 2 cars arriving per hour = 3 cars serviced per hour

ARNOLD’S MUFFLER SHOP CASE

2311

W 1 hour that an average car spends in the system

12

232

L 2 cars in the system

on the average

Page 30: Waiting Lines and Queuing Theory Models (2)

ARNOLD’S MUFFLER SHOP CASE

hour 32

)(

qW 40 minutes average

waiting time per car

)()()( 134

233222

qL 1.33 cars waiting in line

on the average

67032

. percentage of time

mechanic is busy

33032

110 .

P probability that there are 0 cars in the system

Page 31: Waiting Lines and Queuing Theory Models (2)

Probability of more than k cars in the system

ARNOLD’S MUFFLER SHOP CASE

k Pn>k = (2/3)k+1

0 0.667 Note that this is equal to 1 – Note that this is equal to 1 – PP00 = 1 – 0.33 = 0.667 = 1 – 0.33 = 0.667

1 0.444

2 0.296

3 0.198 Implies that there is a 19.8% chance that more Implies that there is a 19.8% chance that more than 3 cars are in the systemthan 3 cars are in the system

4 0.132

5 0.088

6 0.058

7 0.039

Page 32: Waiting Lines and Queuing Theory Models (2)

Introducing costs into the modelArnold wants to do an economic analysis of the queuing system and determine the waiting cost and service cost

The total service cost is

ARNOLD’S MUFFLER SHOP CASE

Total service cost = (Number of channels)

x (Cost per channel)

Total service cost = mCs

wherem = number of channelsCs = service cost of each channel

Page 33: Waiting Lines and Queuing Theory Models (2)

Waiting cost when the cost is based on time in the system

ARNOLD’S MUFFLER SHOP CASE

Total waiting cost = (W)Cw

Total waiting cost = (Total time spent waiting by all

arrivals) x (Cost of waiting)

= (Number of arrivals) x (Average wait per arrival)Cw

If waiting time cost is based on time in the queue

Total waiting cost = (Wq)Cw

Page 34: Waiting Lines and Queuing Theory Models (2)

So the total cost of the queuing system when based on time in the system is

ARNOLD’S MUFFLER SHOP CASE

Total cost = Total service cost + Total waiting cost

Total cost = mCs + WCw

And when based on time in the queue

Total cost = mCs + WqCw

Page 35: Waiting Lines and Queuing Theory Models (2)

Arnold estimates the cost of customer waitingwaiting time in line is $10 per hour

ARNOLD’S MUFFLER SHOP CASE

Total daily waiting cost = (8 hours per day)WqCw

= (8)(2)(2/3)($10) = $106.67 Arnold has identified the mechanics wage $7 per

hour as the serviceservice costTotal daily service cost = (8 hours per day)mCs

= (8)(1)($7) = $56 So the total cost of the system is

Total daily cost of the queuing system = $106.67 + $56 = $162.67

Page 36: Waiting Lines and Queuing Theory Models (2)

Arnold is thinking about hiring a different mechanic who can install mufflers at a faster rate

The new operating characteristics would be = 2 cars arriving per hour = 4 cars serviced per hour

ARNOLD’S MUFFLER SHOP CASE

2411

W 1/2 hour that an average car spends in the system

22

242

L 1 car in the system

on the average

Page 37: Waiting Lines and Queuing Theory Models (2)

ARNOLD’S MUFFLER SHOP CASE

hour 41

)(

qW 15 minutes average

waiting time per car

)()()( 184

244222

qL 1/2 cars waiting in line

on the average

5042

. percentage of time

mechanic is busy

5042

110 .

P probability that there are 0 cars in the system

Page 38: Waiting Lines and Queuing Theory Models (2)

Probability of more than k cars in the system

ARNOLD’S MUFFLER SHOP CASE

k Pn>k = (2/4)k+1

0 0.500

1 0.250

2 0.125

3 0.062

4 0.031

5 0.016

6 0.008

7 0.004

Page 39: Waiting Lines and Queuing Theory Models (2)

The customer waitingwaiting cost is the same $10 per hour

ARNOLD’S MUFFLER SHOP CASE

Total daily waiting cost = (8 hours per day)WqCw

= (8)(2)(1/4)($10) = $40.00 The new mechanic is more expensive at $9 per

hourTotal daily service cost = (8 hours per day)mCs

= (8)(1)($9) = $72 So the total cost of the system is

Total daily cost of the queuing system = $40 + $72 = $112

Page 40: Waiting Lines and Queuing Theory Models (2)

The total time spent waiting for the 16 customers per day was formerly

(16 cars per day) x (2/3 hour per car) = 10.67 hours

It is now is now

(16 cars per day) x (1/4 hour per car) = 4 hours

The total system costs are less with the new mechanic resulting in a $50 per day savings

$162 – $112 = $50

ARNOLD’S MUFFLER SHOP CASE

Page 41: Waiting Lines and Queuing Theory Models (2)

Reducing waiting time is not the only way to reduce waiting cost

Reducing waiting cost (Cw) will also reduce total waiting cost

This might be less expensive to achieve than reducing either W or Wq

ENHANCING THE QUEUING ENVIRONMENT

Page 42: Waiting Lines and Queuing Theory Models (2)

Assumptions of the modelArrivals are served on a FIFO basisNo balking or renegingArrivals are independent of each other but rate is constant over time

Arrivals follow a Poisson distributionService times are variable and independent but the average is known

Service times follow a negative exponential distribution

Average service rate is greater than the average arrival rate

MULTICHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/M)

Page 43: Waiting Lines and Queuing Theory Models (2)

Equations for the multichannel queuing modelWe let

MULTICHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/M)

m = number of channels open = average arrival rate = average service rate at each channel

1. The probability that there are zero customers in the system

m

mm

mn

Pmmn

n

n for

11

11

0

0

!!

Page 44: Waiting Lines and Queuing Theory Models (2)

2. The average number of customer in the system

MULTICHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/M)

021P

mmL

m

)()!()/(

3. The average time a unit spends in the waiting line or being served, in the system

L

Pmm

Wm

1

1 02)()!()/(

Page 45: Waiting Lines and Queuing Theory Models (2)

4. The average number of customers or units in line waiting for service

MULTICHANNEL MODEL, POISSON ARRIVALS, EXPONENTIAL SERVICE TIMES

(M/M/M)

LLq

5. The average number of customers or units in line waiting for service

6. The average number of customers or units in line waiting for service

q

q

LWW

1

m

Page 46: Waiting Lines and Queuing Theory Models (2)

Arnold wants to investigate opening a second garage bay

He would hire a second worker who works at the same rate as his first worker

The customer arrival rate remains the same

ARNOLD’S MUFFLER SHOP REVISITED

m

mm

mn

Pmmn

n

n for

11

11

0

0

!!

500 .P

probability of 0 cars in the system

Page 47: Waiting Lines and Queuing Theory Models (2)

Average number of cars in the system

ARNOLD’S MUFFLER SHOP REVISITED

7501 02 .

)()!()/(

Pmm

Lm

minutes 2122hours

83

L

W

Average time a car spends in the system

Page 48: Waiting Lines and Queuing Theory Models (2)

Average number of cars in the queue

ARNOLD’S MUFFLER SHOP REVISITED

Average time a car spends in the queue

0830121

32

43

.

LLq

minutes 212hour 0.0415

208301

.

q

q

LWW

Page 49: Waiting Lines and Queuing Theory Models (2)

Effect of service level on Arnold’s operating characteristics

ARNOLD’S MUFFLER SHOP REVISITED

LEVEL OF SERVICE

OPERATING CHARACTERISTIC

ONE MECHANIC = 3

TWO MECHANICS = 3 FOR BOTH

ONE FAST MECHANIC = 4

Probability that the system is empty (P0)

0.33 0.50 0.50

Average number of cars in the system (L) 2 cars 0.75 cars 1 car

Average time spent in the system (W) 60 minutes 22.5 minutes 30 minutes

Average number of cars in the queue (Lq)

1.33 cars 0.083 car 0.50 car

Average time spent in the queue (Wq)

40 minutes 2.5 minutes 15 minutes

Table 14.2

Page 50: Waiting Lines and Queuing Theory Models (2)

Adding the second service bay reduces the waiting time in line but will increase the service cost as a second mechanic needs to be hired

ARNOLD’S MUFFLER SHOP REVISITED

Total daily waiting cost = (8 hours per day)WqCw

= (8)(2)(0.0415)($10) = $6.64

Total daily service cost = (8 hours per day)mCs

= (8)(2)($7) = $112

So the total cost of the system is

Total system cost = $6.64 + $112 = $118.64

The fast mechanic is the cheapest option