Operations management Assignment

profilen123
QueuingWaitingTimeModels.pdf

Queuing (Waiting Time) Models

• Variability and its impact on process performance

• Can we use waiting time models to ensure customers get timely access to service ?

ADM3301 - Operations Management Davood Astaraky, Telfer School of Management

Outline & Learning Objectives • Variability and waiting time models

- Motivation example

- Waiting time (queuing) analysis

- Applications and setting of queuing models

- Process Analysis - a good first step

- Queuing Modelling - a second better step

- Analyzing the arrival process

- Analyzing the service time variability

- So what can queuing theory tell us? (Modelling single service process)

- Modelling single service process with poisson arrivals and exponential service times

- Multi-Server queues (multiple identical parallel servers)

- G/G/c and M/M/c queuing system

- Service levels in waiting systems

- Economic Implications

- Pooling

- Summarizing what queuing analysis can tell us

Motivation Example

Motivation • Imagine you are the CEO of an 800 bed hospital

• The average length of stay (LOS) in your hospital is exactly 5 days and on average 159 patients are admitted through various means each day.

• How long do you think the average patient will wait for a bed in the ED?

• What would be the impact of increased capacity or reduced LOS?

Wait Time • Length of wait (hrs) as a function of LOS

Wait Time • Length of wait (hrs) as a function of LOS

1) Significant difference between average WT and 90th percentile

2) Improvement as LOS decreases much more dramatic in 90th percentile

3) Non-linear relationship between service time and wait time

Wait Time (days) as a function of Number of beds • Length of wait (hrs) as a function of Number of beds

80% 82% 84% 86% 88% 90% 92% 94% 96%

0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6

80 82 84 86 88

U ti

liz at

io n

A ve

ra ge

W ai

t Ti

m e

s (d

ay s)

Number of Beds

Expected Wait Time 90th Percentile Wait Time Utilization

BUT… • Assumed :

- Demand arrived according to a Poisson distribution

- Service time was exponentially distributed

- Arrivals rates were constant over time

- Increased capacity does not lead to increased demand

- No prioritization of demand – beds assigned on a FCFS basis

• Removing these assumptions requires more sophisticated queuing theory methodologies!

Waiting Time (Queuing) Analysis

Capacity and Resources • How do we measure capacity?

- What is the capacity of a 20 seat restaurant?

- What is the capacity of a 16 bed ward?

• Capacity is a RATE - Customers/hour

- Patients/day

• We can view a 16 bed ward as a queuing system with 16 servers - What is the capacity of a bed?

- Does this analogy apply to the restaurant?

• A system is composed of resources with capacities - Often we use the expressions “resource” and “capacity” interchangeably (hopefully without confusion)

Types of waiting time - What generates queues? • Types of waiting time:

- Queues that occur when expected demand rate exceeds expected supply rate for some limited period of time. Implied utilization >100% for some time period.

- In the presence of variability, queues can arise even if implied utilization is <100%. Even if on average there is enough capacity to meet demand.

- e.g., calls to a brokerage are unusually high during a particular hour relative to the same hour in other weeks (i.e., calls are high by random chance).

Root cause for waiting time • Root cause of waiting time:

- First type: capacity problem; variability is only a secondary effect.

- Second type: variability is the root cause. This makes waiting time unpredictable.

Capacity tradeoffs when demand is variable • Too much capacity or too many resources = idleness

• Not enough capacity = waits

• Should we set capacity equal to demand? - What does this mean?

- This is called a balanced system

- It works perfectly when there is no variation in the system

- It works terribly when there is variation! Why? (Once behind, you never can catch up)

- Queuing theory quantifies these tradeoffs in terms of performance measures.

Waiting time analysis (Queuing theory) • Objectives:

- Predict waiting times

- Deriving performance metrics capturing service quality

- Recommend ways of reducing waiting times

- Choosing appropriate capacity level

- Redesigning the service system

- Opportunities to reduce variability

Some Applications

Categories of Applications • If there is a potential for a queue then queuing theory can be helpful!

- Staffing: determine the necessary staff per shift in order to meet given performance targets

- Resource Allocation: determine the necessary number of resources in order to prevent queue build ups

- Scheduling (e.g., Patient scheduling)

- Wait Time Analysis

- Flow mapping (e.g., Patient flow mapping)

- Policy Evaluation

- etc.

The Setting

Service Facility Characteristics • Configuration of service facility

- Service facilities are usually classified in terms of their number of servers (or channels), and number of phases (or service stops) that must be made.

Single Server Facility (Single Channel)

• Examples of single server queues: - triage nurse in ED, DI with one CT, one doc on night shift,…

• Often take a complex problem, and treat it like a single server: - e.g., cataract surgical patients may have complex flow with multiple “servers”.  Bottleneck may be the O.R.  We

can pretend that the OR is a single server and ignore downstream servers

Departures After Service

Single-Server, Single-Phase System

Queue

Arrivals Service Facility

Several parallel single server queues

Departures After Service

Queue

Arrivals Server

Departures After Service

Queue

Arrivals Server

Departures After Service

Queue

Arrivals Server

• Example ?

Multiple-server system

Multi-Server, Single-Phase System

Arrivals

Queue DeparturesService Facility

1

Service Facility

2

Service Facility

3

after

Service

• Example ?

Other Configurations

• Example: MacDonald’s dual-window drive-through

• Example : Some university registration systems

Queuing Network • Most systems are interconnected networks of queues and servers with multiple waiting points and

heterogeneous customers

Queue Characteristics • Queue length (max possible queue length)

- A queue maybe considered as limited or unlimited. Limited queue length occurs when the queue can not increase beyond a certain length.

- In all the analytic queuing models we discuss here, we assume that queue lengths are unlimited but the queuing calculator that we will use allows for both limited and unlimited queues.

• Queue discipline - This refers to the rule by which customers in the line are to receive service.

- Most systems use a queue discipline known as the first-in, first-out rule (FIFO).   

- There are other disciplines such as LIFO (Last In First Out) and those that are more appropriate for dealing with Priorities.

Queuing Metrics • Basic scenario for a queue:

- Arrivals requiring service from one (or more) servers and then leaving when service is done

• Questions you want answered: - How long will the average queue be?

- How long will the average person wait?

- What is the probability that the system will be full?

- What will the average utilization of the system be?

- How many “servers” do you need? 

- What would be the service level for a given performance target (more on this later).

Process Analysis

A Good First Step

Mismatch between Demand and Supply • So far in the process analysis we have based on our analysis on average flow times to determine

average capacity rates – essentially assuming that service times and demand are deterministic…

• In reality and for most processes, the input and output rates will vary over time

• A key operational challenge is matching supply and demand in the presence of uncertainty

- i.e., matching the input and output rates

Example - A call centre • Consider a simplified call centre:

- One employee answering calls from 7am - 8am

- Average service time is 4 minutes

- There are 12 calls in a 60-minute period (one call every 5 minutes)

• Calculations: - Capacity: 60/4 = 15 calls per hour

- Demand: 12 calls per hour

- Flow rate: min{capacity, demand} = 12 calls per hour

- Utilization = Flow rate/Capacity = 80%

- It appears there should be no waiting times.

A somewhat odd service process

Patient

Arrival Time

Service Time

1 2 3 4 5 6 7 8 9 10 11 12

0 5 10 15 20 25 30 35 40 45 50 55

4 4 4 4 4 4 4 4 4 4 4 4

7:00 7:10 7:20 7:30 7:40 7:50 8:00

• A call arrives exactly every 5 minutes and takes exactly 4 minutes to be served !!!

A more realistic service process

Patient

Arrival Time

Service Time

1 2 3 4 5 6 7 8 9 10 11 12

0 7 9 12 18 22 25 30 36 45 51 55

5 6 7 6 5 2 4 3 4 2 2 3

Time 7:10 7:20 7:30 7:40 7:50 8:007:00

Patient 1 Patient 3 Patient 5 Patient 7 Patient 9 Patient 11

Patient 2 Patient 4 Patient 6 Patient 8 Patient 10 Patient 12

0

1

2

3

2 min. 3 min. 4 min. 5 min. 6 min. 7 min.

Service times

N um

be r

of c

as es

Variability leads to waiting time

Patient

Arrival Time

Service Time

1 2 3 4 5 6 7 8 9 10 11 12

0 7 9 12 18 22 25 30 36 45 51 55

5 6 7 6 5 2 4 3 4 2 2 3

Inventory (Callers)

5

4

3

2

1

0 7:00 7:10 7:20 7:30 7:40 7:50 8:00

7:00 7:10 7:20 7:30 7:40 7:50 8:00

Wait time

Service time

Analysis of the service process • Observations:

- Although on average there is plenty of capacity, most customers wait considerable amount of time

- Service is inconsistent. Some customers wait while others don’t.

- Despite long wait times, servers is repeatedly idle.

- Capacity never “runs ahead” of demand (no build to stock)

- Demand can “run ahead” of capacity and queue will build up.

Queuing Modelling

A Better Second Step

Purpose of Queuing Theory • Queuing Theory is an attempt to predict the long run, steady state behaviour of a queuing system

• Steady state – refers to what happens on average in the long term - Assumes that average demand and average service time are not changing at any significant rate

• Transient behaviour – what happens when a system is in transition - Either because demand is changing or the service rate is changing

Purpose of Queuing Theory • Queuing theory only provides steady state results

• It does not tell you how things are going to evolve as you reach to steady state (average).

• Thus queuing theory only applies to systems where demand and service time averages are relatively stable. (Note that this does not mean that things are deterministic but that the demand and service rates fluctuate around a steady mean)

• If you are interested in transient behaviour, then queuing theory is not the answer (try simulation)!

Necessary Capacity • Primary use of queuing theory is to determine

- A) the performance of a system and

- B) what capacity is necessary to achieve a certain performance

• But how do we determine what constitutes good performance?

Choosing a Performance Target • Meeting 100% of demand by a certain time is often cost prohibitive as there is a huge increase in

required capacity to satisfy the tail.

• More appropriate: 90% of patients should be seen with x days

• Allows for a bit of flexibility and a recognition of the fact that unforeseen events are going to happen that will make meeting the targets difficult every now and then

Determining Necessary Capacity • Once you set your performance target the obvious question is how do you meet it.

• Thus the objective is often to determine the necessary number of servers to meet some type of performance target

• The objective will be dependent on the scenario - Bank manager: how many tellers to ensure that at most 10% of customers wait more than 5 mins.

- EMS: How many 911 call takers do you need to “ensure” that 99% of calls will get answered by the second ring? 

Basic Trade-off in Waiting time • In deciding the best level of service in a queuing system, managers have to deal with two types of

costs: - Cost of providing the service, also known as service cost. - Cost of not providing the service,  or waiting cost.

C os

t o f O

pe ra

tin g

S er

vi ce

F ac

ili ty

Service Level

Total Expected Cost

Cost of Waiting Time (Waiting Cost)

Cost of Providing Service (Service Cost)

* Optimal

Service Level

Basic Components • There are five components to a queueing model

- Average demand per time period

- Variation in demand per time period

- Average time to serve each patient

- Variation in the average time to serve

- Number of servers (capacity)

Basic Components • There are five components to a queueing model

- Average demand per time period

- Variation in demand per time period

- Average time to serve each patient

- Variation in the average time to serve

- Number of servers (capacity)

• Two key points: - 1) If you want to impact the performance of a queuing system, you need to impact one of these 5 components

- 2) Variability in the system (either in demand or in service times) turns out to play a key role that is ignored at your peril.

Variation or standard deviation either in service time or demand is as important as the average. (Always keep that in mind)

Why Variability is Important ?

0

0.05

0.1

0.15

0.2

0.25

1 3 5 7 9 11 13 15 17 19 21 0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

1 3 5 7 9 11 13 15 17 19 21

• Both graphs have the same average demand but the capacity requirements to meet the same performance target (i.e. 90% of patients…) is vastly different!

Sources of variability in a process flow • Sources of variability in the process:

- Variability from the inflow of flow units

- Variability in processing (service) times

- Random availability of resources

- Random routing in case of multiple flow units in the process

ProcessingBufferInput: • Random arrival (Randomness Is the

Rule, Not the Exception) • Incoming quality • Product/customer mix

Processing times: • Inherent Variation • Lack of Operating Procedures • Quality (Scrap/Rework)

Resources: • Breakdowns/Maintenance • Operator Absence • Setup Times

Routes: • Variable Routing • Dedicated Machines

Types of Variability

… refers to “knowable” changes in input and/or capacity rates Demand of pumpkins will go up during Thanksgiving

… refers to “unknowable” changes in input and/or capacity rates Supply of pumpkins will go down if the crop fails

Predictable Variability Unpredictable Variability

Types of Variability

… refers to “knowable” changes in input and/or capacity rates Demand of pumpkins will go up during Thanksgiving

… refers to “unknowable” changes in input and/or capacity rates Supply of pumpkins will go down if the crop fails

Predictable Variability Unpredictable Variability

Types of Variability

• Both types of variability exist simultaneously - Pumpkin sales will go up during Thanksgiving, but we do not know the exact sales of pumpkins

… refers to “knowable” changes in input and/or capacity rates Demand of pumpkins will go up during Thanksgiving

… refers to “unknowable” changes in input and/or capacity rates Supply of pumpkins will go down if the crop fails

Predictable Variability Unpredictable Variability

Types of Variability

Can be controlled by making changes to the system: We could increase or decrease the demand for pumpkins by increasing or decreasing the price

Restaurants will add staff during peak demand (lunch, dinner, etc.)

Is the result of the lack of knowledge or information:

• Usually can be expressed with a probability distribution

• E.g., Express the probability that the pumpkin crop will fail using a probability distribution

Can be reduced by gaining more knowledge or information:

• By paying close attention to weather patterns, we could increase the accuracy of our prediction that the pumpkin crop will fail

Predictable Variability Unpredictable Variability

Types of Variability

Can be controlled by making changes to the system: We could increase or decrease the demand for pumpkins by increasing or decreasing the price

Restaurants will add staff during peak demand (lunch, dinner, etc.)

Is the result of the lack of knowledge or information:

• Usually can be expressed with a probability distribution

• E.g., Express the probability that the pumpkin crop will fail using a probability distribution

Can be reduced by gaining more knowledge or information:

• By paying close attention to weather patterns, we could increase the accuracy of our prediction that the pumpkin crop will fail

Predictable Variability Unpredictable Variability

Consider a process with no variability

• Assume that all customers are identical, arrive 1 minute apart and take exactly 1 minute

• Result: Everyone is served immediately with no waiting

ATM

Service time (exactly 1 min)

Input (1 person/min)

Throughput Rate?

Effect of Input Variability (no buffer)

• Assume that customers who find the ATM busy do not wait

ATM

Service time (exactly 1 min)

Input (1 person/min)

Throughput Rate?

Random Input 0, 1, 2 customers/min (with equal probability)

Average demand is still 1 per min.

1 2 3 4 5 6 7 time

Effect of Input Variability (no buffer) • When a process faces input variability, and a buffer cannot be built, some input may get lost

• Input variability can reduce the throughput

• Lower throughput means: - Lost customers; lost revenue

- Customer dissatisfaction

- Less utilization of resources

Dealing with Variability • When the arrival rate of customers is unpredictable, what could you do to increase throughput?

Add Buffer

Increase Capacity (e.g., Add another ATM;

Decrease the time it takes the ATM to serve a customer)

Dealing with Variability • When the arrival rate of customers is unpredictable, what could you do to increase throughput?

Add Buffer

Increase Capacity (e.g., Add another ATM;

Decrease the time it takes the ATM to serve a customer)

Effect of Input Variability (with buffer)

• We can build-up an inventory buffer and (provided we have sufficient capacity) serve all customers though at the price of some waiting.

ATM

Service time (exactly 1 min)

Random Input 0, 1, 2

customers/min (with equal probability)

Throughput Rate?Buffer

Waiting time

Effect of Effect of Input Variability (with buffer) • If we can build up an inventory buffer, variability leads to:

- An increase in the average inventory (wait list) in the process

- An increase in the average flow time (wait time)

- An increase in customer waiting time

- Can service all demand with less capacity

- Wait time targets act as buffers

Measuring variability • Variance and Standard deviation

- These lead to probability statements

- Probability Statements:

- P(X = 4)

- P(20 < T ≤ 30)

• It is more appropriate to measure variability in relative terms.

• Measuring variability using coefficient of variation has advantage over standard deviation.

Confirming Pages

Variability and Its Impact on Process Performance: Waiting Time Problems 149

some data and then computing the corresponding standard deviation. The problem with this approach is that the standard deviation provides an absolute measure of variability. Does a standard deviation of 5 minutes indicate a high variability? A 5-minute standard deviation for call durations (processing times) in the context of a call center seems like a large number. In the context of a 2-hour surgery in a trauma center, a 5-minute standard deviation seems small.

For this reason, it is more appropriate to measure variability in relative terms. Specifi- cally, we define the coefficient of variation of a random variable as

Coefficient of variation CV Standard deviat

! ! iion

Mean

As both the standard deviation and the mean have the same measurement units, the coef- ficient of variation is a unitless measure.

8.3 Analyzing an Arrival Process Any process analysis we perform is only as good as the information we feed into our analysis. For this reason, Sections 8.3 and 8.4 focus on data collection and data analysis for the upcom- ing mathematical models. As a manager intending to apply some of the following tools, this data analysis is essential. However, as a student with only a couple of hours left to the final exam, you might be better off jumping straight to Section 8.5.

Of particular importance when dealing with variability problems is an accurate repre- sentation of the demand, which determines the timing of customer arrivals.

Assume we got up early and visited the call center of An-ser; say we arrived at their offices at 6:00 A.M. and we took detailed notes of what takes place over the coming hour. We would hardly have had the time to settle down when the first call comes in. One of the An-ser staff takes the call immediately. Twenty-three seconds later, the second call comes in; another 1:24 minutes later, the third call; and so on.

We define the time at which An-ser receives a call as the arrival time. Let AT i denote the arrival time of the i th call. Moreover, we define the time between two consecutive arrivals as the interarrival time, IA. Thus, IA i ! AT i " 1 # AT i . Figure 8.5 illustrates these two definitions.

If we continue this data collection, we accumulate a fair number of arrival times. Such data are automatically recorded in call centers, so we could simply download a file that looks like Table 8.1 .

Before we can move forward and introduce a mathematical model that predicts the effects of variability, we have to invest in some simple, yet important, data analysis. A major risk related to any mathematical model or computer simulation is that these tools always provide

1 2 3 4 5 6 7

6:00:29 6:00:52 6:02:16 6:02:50 6:05:14 6:05:50 6:06:28

00:23 01:24 00:34 02:24 00:36 00:38

Call Arrival Time, ATi

Interarrival Time, IAi=ATi+1–ATi

6:00 6:01

IA1 IA2 IA3 IA4 IA5 IA6

6:02 6:03 6:04 6:05 6:06

Call 1

Call 2 Call 4 Call 6

Call 3 Call 5 Call 7

Time

FIGURE 8.5 The Concept of Interarrival Times

cac25200_ch08_144-182.indd 149cac25200_ch08_144-182.indd 149 1/17/12 5:11 PM1/17/12 5:11 PM

Analyzing the Arrival Process

Arrival time and interarrival time • ATi = Arrival time of ith customer

• An interarrival time is the amount of time between two arrivals to a process (IAi = ATi+1 - ATi )

• We should determine: - Is the arrival process stationary?

- Are the interarrival times exponentially distributed?

Confirming Pages

Variability and Its Impact on Process Performance: Waiting Time Problems 149

some data and then computing the corresponding standard deviation. The problem with this approach is that the standard deviation provides an absolute measure of variability. Does a standard deviation of 5 minutes indicate a high variability? A 5-minute standard deviation for call durations (processing times) in the context of a call center seems like a large number. In the context of a 2-hour surgery in a trauma center, a 5-minute standard deviation seems small.

For this reason, it is more appropriate to measure variability in relative terms. Specifi- cally, we define the coefficient of variation of a random variable as

Coefficient of variation CV Standard deviat

! ! iion

Mean

As both the standard deviation and the mean have the same measurement units, the coef- ficient of variation is a unitless measure.

8.3 Analyzing an Arrival Process Any process analysis we perform is only as good as the information we feed into our analysis. For this reason, Sections 8.3 and 8.4 focus on data collection and data analysis for the upcom- ing mathematical models. As a manager intending to apply some of the following tools, this data analysis is essential. However, as a student with only a couple of hours left to the final exam, you might be better off jumping straight to Section 8.5.

Of particular importance when dealing with variability problems is an accurate repre- sentation of the demand, which determines the timing of customer arrivals.

Assume we got up early and visited the call center of An-ser; say we arrived at their offices at 6:00 A.M. and we took detailed notes of what takes place over the coming hour. We would hardly have had the time to settle down when the first call comes in. One of the An-ser staff takes the call immediately. Twenty-three seconds later, the second call comes in; another 1:24 minutes later, the third call; and so on.

We define the time at which An-ser receives a call as the arrival time. Let AT i denote the arrival time of the i th call. Moreover, we define the time between two consecutive arrivals as the interarrival time, IA. Thus, IA i ! AT i " 1 # AT i . Figure 8.5 illustrates these two definitions.

If we continue this data collection, we accumulate a fair number of arrival times. Such data are automatically recorded in call centers, so we could simply download a file that looks like Table 8.1 .

Before we can move forward and introduce a mathematical model that predicts the effects of variability, we have to invest in some simple, yet important, data analysis. A major risk related to any mathematical model or computer simulation is that these tools always provide

1 2 3 4 5 6 7

6:00:29 6:00:52 6:02:16 6:02:50 6:05:14 6:05:50 6:06:28

00:23 01:24 00:34 02:24 00:36 00:38

Call Arrival Time, ATi

Interarrival Time, IAi=ATi+1–ATi

6:00 6:01

IA1 IA2 IA3 IA4 IA5 IA6

6:02 6:03 6:04 6:05 6:06

Call 1

Call 2 Call 4 Call 6

Call 3 Call 5 Call 7

Time

FIGURE 8.5 The Concept of Interarrival Times

cac25200_ch08_144-182.indd 149cac25200_ch08_144-182.indd 149 1/17/12 5:11 PM1/17/12 5:11 PM

How to describe (or model) interarrival times • We will use two parameters to describe interarrival times to a process:

- The average interarrival time.

- The standard deviation of the interarrival times.

• What is the standard deviation? - Roughly speaking, the standard deviation is a measure of how variable the interarrival times are.

- Two arrival processes can have the same average interarrival time (say 1 minute) but one can have more variation about that average, i.e., a higher standard deviation.

Relative and absolute variability • The standard deviation is an absolute measure of variability.

• Two processes can have the same standard deviation but one can seem much more variable than the other:

- Below are random samples from two processes that have the same standard deviation. The left one seems more variable.

Average = 10 Stdev = 10

0 5

10 15 20 25 30 35 40 45 50

Observation

In te

r- ar

riv al

ti m

e (m

in )

Average = 100 Stdev = 10

0

20

40

60

80

100

120

Observation

In te

r- ar

riv al

ti m

e (m

in )

Relative and absolute variability • The previous slide plotted the processes on two different axes.

• Here, the two are plotted relative to their average and with the same axes.

• Relative to their average, the one on the left is clearly more variable (sometimes more than 400% above the average or less than 25% of the average).

Average = 10 Stdev = 10

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0

Observation

In te

r- ar

riv al

ti m

e /A

ve ra

ge

Average = 100 Stdev = 10

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0

Observation

In te

r- ar

riv al

ti m

e /A

ve ra

ge

Coefficient of variation • The coefficient of variation is a measure of the relative variability of a process – it is the standard

deviation divided by the average.

• The coefficient of variation of the arrival process:

CV! = Standard deviation of interarrival time

Average interarrival time

Average = 10 Stdev = 10

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0

Observation

In te

r- ar

riv al

ti m

e /A

ve ra

ge

Average = 100 Stdev = 10

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0

Observation

In te

r- ar

riv al

ti m

e /A

ve ra

ge

CVa = 10 /10 = 1

CVa = 10 /100

= 0.1

Stationary vs seasonal arrival • An arrival process is stationary over a period of time if the number of arrivals in any subinterval

depends only on the length of the interval and not on when the interval starts. - For example, if the process is stationary over the course of a day, then the expected number of arrivals within

any three hour interval is about the same no matter which three hour window is chosen (or six hour window, or one hour window, etc.).

- Processes tend to be nonstationary (or seasonal) over long time periods (e.g., over a day or several hours) but stationary over short periods of time (say one hour, or 15 minutes).

0

20

40

60

80

100

120

140

160

0: 15

2: 00

3: 45

5: 30

7: 15

9: 00

10 :4 5

12 :3 0

14 :1 5

16 :0 0

17 :4 5

19 :3 0

21 :1 5

23 :0 0

Number of customers

Per 15 minutes

0

20

40

60

80

100

120

140

160

0: 15

2: 00

3: 45

5: 30

7: 15

9: 00

10 :4 5

12 :3 0

14 :1 5

16 :0 0

17 :4 5

19 :3 0

21 :1 5

23 :0 0

Time

Number of customers

Per 15 minutes

• Seasonality vs. variability • Need to slice-up the data

Nonstationary arrivals • Arrivals to the call center over the day are nonstationary

0

20

40

60

80

100

120

140

160

0: 15

2: 00

3: 45

5: 30

7: 15

9: 00

10 :4 5

12 :3 0

14 :1 5

16 :0 0

17 :4 5

19 :3 0

21 :1 5

23 :0 0

Number of customers

Per 15 minutes

0

20

40

60

80

100

120

140

160

0: 15

2: 00

3: 45

5: 30

7: 15

9: 00

10 :4 5

12 :3 0

14 :1 5

16 :0 0

17 :4 5

19 :3 0

21 :1 5

23 :0 0

Time

Number of customers

Per 15 minutes The number of arrivals

in a 3-hour interval clearly depends on

which 3-hour interval your choose …

… and the peaks and troughs are predictable (they

occur roughly at the same time each day.

Test for stationary arrivals • Determine whether a process is stationary

- Sort all arrival times so that they are increasing in time (ATi)

- Plot a graph with (x= ATi, y = i)

- Add a straight line from the lower left (first arrival) to the upper right (last arrival).

Refer to MS excel

spreadsheet

0

50

100

150

200

250

0 20 40 60 80 100 120 140

i

0

0.2

0.4

0.6

0.8

1

1.2

0 20 40 60 80 100 120 140

i/n

calc

Dealing with nonstationary arrival process • When facing nonstationary arrival processes, the best way to proceed is to divide up the day (the

week, the month) into smaller time intervals and have a separate arrival rate for each interval.

• Often the seasonality within the interval is relatively low. In other words, within the interval, we come relatively close to a stationary arrival stream.

0

20

40

60

80

100

120

140

160

0: 15

2: 00

3: 45

5: 30

7: 15

9: 00

10 :4 5

12 :3 0

14 :1 5

16 :0 0

17 :4 5

19 :3 0

21 :1 5

23 :0 0

Number of customers Per 15 minutes

0

20

40

60

80

100

120

140

160

0: 15

2: 00

3: 45

5: 30

7: 15

9: 00

10 :4 5

12 :3 0

14 :1 5

16 :0 0

17 :4 5

19 :3 0

21 :1 5

23 :0 0

Time

Number of customers Per 15 minutes

0

0.2

0.4

0.6

0.8

1

0:00:00 0:00:09 0:00:17 0:00:26 0:00:35 0:00:43 0:00:52 0:01:00 0:01:09

Distribution Function

Empirical distribution (individual points)

Exponential distribution

0

0.2

0.4

0.6

0.8

1

0:00:00 0:00:09 0:00:17 0:00:26 0:00:35 0:00:43 0:00:52 0:01:00 0:01:09

Distribution Function

Inter -arrival timeInter -arrival time

Empirical distribution (individual points)

Exponential distribution

• Seasonality vs. variability • Need to slice-up the data

Exponential interarrival times • Interarrival times commonly are distributed following an exponential distribution.

• If IA is a random interarrival time and the interarrival process follows an exponential distribution:

• Exponential distribution has memoryless property.

Confirming Pages

Variability and Its Impact on Process Performance: Waiting Time Problems 153

seasonality over the course of the entire day, as we observed in Figure 8.6 . Note that the peaks in Figure 8.6 correspond to those time slots where the line of “actual, cumulative arrivals” in Figure 8.7 grows faster than the straight line “predicted arrivals.”

In most cases in practice, the context explains this type of seasonality. For example, in the case of An-ser, the spike in arrivals corresponds to people beginning their day, expect- ing that the company they want to call (e.g., a doctor’s office) is already “up and running.” However, since many of these firms are not handling calls before 9 A.M., the resulting call stream is channeled to the answering service.

Exponential Interarrival Times Interarrival times commonly are distributed following an exponential distribution. If IA is a random interarrival time and the interarrival process follows an exponential distribution, we have

Probability IA{ }t e

t a1

where a is the average interarrival time as defined above. Exponential functions are fre- quently used to model interarrival time in theory as well as practice, both because of their good fit with empirical data as well as their analytical convenience. If an arrival process has indeed exponential interarrival times, we refer to it as a Poisson arrival process.

It can be shown analytically that customers arriving independently from each other at the process (e.g., customers calling into a call center) form a demand pattern with expo- nential interarrival times. The shape of the cumulative distribution function for the expo- nential distribution is given in Figure 8.8 . The average interarrival time is in minutes. An important property of the exponential distribution is that the standard deviation is also equal to the average, a.

Another important property of the exponential distribution is known as the memoryless property. The memoryless property simply states that the number of arrivals in the next time slot (e.g., 1 minute) is independent of when the last arrival has occurred.

To illustrate this property, consider the situation of an emergency room. Assume that, on average, a patient arrives every 10 minutes and no patients have arrived for the last

1

0.8

0.6

0.4

0.2

0

10

0

0

0. 4

0. 8

1. 2

1. 6

2. 0

2. 4

2. 8

3. 2

20

30

40

50

60

70

80

90

100

Time

Duration t

N um

be r

of C

al ls

w it

h G

iv en

D ur

at io

n t

P ro

ba bi

li ty

{ In

te ra

rr iv

al T

im e

£ t}

FIGURE 8.8 Distribution Function of the Exponential Distribution (left) and an Example of a Histogram (right)

cac25200_ch08_144-182.indd 153cac25200_ch08_144-182.indd 153 1/17/12 5:11 PM1/17/12 5:11 PM

where a is the average interarrival time

Exponential interarrival times • Exponential interarrival times with a = 4 minutes

• Excel function: EXPON.DIST(x, 1/a, cumulative or not)

Poisson arrival process • If an arrival process has exponential interarrival times, we refer to it as a Poisson arrival process.

• Arrival rate measured as the number of new arrivals per time period

• Arrivals may come one-at-a-time, or in batches (e.g., batch of med. orders when in-patient docs do rounds)

• Roughly evenly spaced (like hospital patients with an appointment), or at irregular (random) intervals

• They may come with varying urgency and potentially with varying resource requirements

• The arrival rate (average) is generally assumed to be constant.

Poisson arrival process • Surprisingly, if demand is truly random and independent it almost always follows a Poisson

distribution where - Variance and mean are the same number

- Looks like a slightly right skewed Normal distribution

• If demand comes in batches then can be modeled as a “compound Poisson distribution”

• If demand follows a Poisson distribution then “inter-arrival” times follow an exponential distribution.

• Bottom line: even random arrivals follow a pattern and thus can be planned for in advance!

Poisson Distribution

• Let,

- λ = the average arrival rate per time unit (i.e., average number of arrivals per unit of time )

• Then, - P(x) = the probability of exactly x arrivals occurring during one time period

- e = 2.718 (known as exponential constant )

• Excel function: POISSON.DIST(x, rate, cumulative or not)

! )(

x e

xP xll-

=

Poisson Distribution

P ro

ba bi

lit y

= 2 Distribution = 4 Distribution X

0.25

0.20

0.15

0.10

0.05

Probability = P(X ) = e –λλX

X !

X 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 10 11

λλ

Average is 4 per hour but 20% of the time will get 6 or more in an hour.

Verify exponential interarrival times • 1) Compute the interarrival times IA1 . . . IAn.

• 2) Sort the interarrival times in increasing order;

• 3) Plot pairs(x=ai,y=I/n).There resulting graph is called an empirical distribution function.

• 4) Compare the graph with an exponential distribution

0

0.2

0.4

0.6

0.8

1

0:00:00 0:00:09 0:00:17 0:00:26 0:00:35 0:00:43 0:00:52 0:01:00 0:01:09

Distribution Function

Empirical distribution (individual points)

Exponential distribution

0

0.2

0.4

0.6

0.8

1

0:00:00 0:00:09 0:00:17 0:00:26 0:00:35 0:00:43 0:00:52 0:01:00 0:01:09

Distribution Function

Inter -arrival timeInter -arrival time

Empirical distribution (individual points)

Exponential distribution

Example - Verify exponential interarrival times • Refer to excel spreadsheet

0

0.2

0.4

0.6

0.8

1

1.2

0 0.5 1 1.5 2 2.5 3 3.5

i/n

calc

Empirical versus Exponential Distribution for Interarrival Times

Nonexponential arrival times • We need more parameters to describe the arrival process if interarrival times are not exponentially

distributed.

Analyzing the Arrival Process - Summary

Analyzing the Service Time Variability

Service Distribution • Service processes also have a considerable amount of variability from the supply side.

• Service rate is measured as the number of customers (patients) that can be serviced in a time period (or the length of time required to service a customer (patient)

• Possible to have servers with different skill levels either in terms of speed of service or in terms of what type of client they can service

• Possible to have models where the service rate is an adjustable number where faster service times can be “bought”

Service Time Variability • Again we need to distinguish seasonality from variability. If non-stationary, divide into smaller

intervals.

• The coefficient of variation of the service time process:

1000 900

800 700

600 500

400 300

200 100

0

800

600

400

200

0

Call durations (seconds)

Frequency

Confirming Pages

156 Chapter 8

Based on the data summarized in Figure 8.11 , we compute the mean processing time as 120 seconds and the corresponding standard deviation as 150 seconds. As we have done with the interarrival times, we can now define the coefficient of variation, which we obtain by

CV Standard deviation of processing time

p ! Averaage processing time

Here, the subscript p indicates that the CV measures the variability in the processing times.As with the arrival process, we need to be careful not to confuse variability with seasonality. Sea- sonality in processing times refers to known patterns of call durations as a function of the day of the week or the time of the day (as Figure 8.12 shows, calls take significantly longer on weekends than during the week). Call durations also differ depending on the time of the day.

800

600

400

200

0

0

10 0

20 0

30 0

40 0

50 0

60 0

70 0

80 0

90 0

1, 00

0

Frequency

Call Durations [Seconds]

FIGURE 8.11 Processing Times in Call Center

Weekday Averages

Weekend Averages

0:00 23:00

0

0.5

1

1.5

2

2.5

Time of the Day

Call Duration [Minutes]

FIGURE 8.12 Average Call Durations: Weekday versus Weekend

cac25200_ch08_144-182.indd 156cac25200_ch08_144-182.indd 156 1/17/12 5:11 PM1/17/12 5:11 PM

CV! = Standard deviation of activity times

Average activity time

Modelling Service Times • The most common distribution for modeling service times is the exponential distribution

- Long right tail representing the fact that most clients don’t take too long but occasionally there is a client who takes a really long time!

- Memoryless (i.e. the expected length of service does not change if you have already received service for x time units)

• While exponential is often a good representation of service time, it is not always the case (i.e. surgical times more likely to follow a log-normal)

Exponential Distribution • We define service rate as the number of units served in a given interval of time, and service time as

the length of time taken to actually perform the service.

• Let : - µ = average service rate (i.e., average number of customers served per unit of time)

- T = a random variable representing the service time  (Note that the average service time = 1/µ)

- t = a specific length of service time (t > 0)

• Then:

Exponential Distribution • Example:  Patients are served at a rate of 4 per hour following an exponential distribution. What is

the probability that, for a given patient, the service time exceeds 20 minutes (1/3 of an hour)

Exponential Distribution • Example:  Patients are served at a rate of 4 per hour following an exponential distribution. What is

the probability that, for a given patient, the service time exceeds 20 minutes (1/3 of an hour)

• Solution: P( T ≥ 1/3) = e-4∙(1/3) = e-4/3 = 0.26

• Thus, there is a 26% chance that the service time of a patient will exceed 20 minutes.

Service time distribution • Figure below illustrates that if service time follows an exponential distribution, the probability of any

very long service time is low. Exponential distributions don’t allow negative times and have a small probability of long service times.

= Average Service Rate

Average Service Rate = 1 customer per hour

Average service Rate = 3 Customers per Hour Average Service Time = 20 Minutes (or 1/3 Hours) per Customer

| | | | | | | | | | | | | 0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00 2.25 2.50 2.75 3.00

1.0 –

0.9 –

0.8 –

0.7 –

0.6 –

0.5 –

0.4 –

0.3 –

0.2 –

0.1 –

0.0 –

P ro

ba bi

lit y

Th at

S er

vi ce

T im

e ≥ t

Time t in Hours

µ

Summary - Modeling Variability

Processing

Inflow Demand process is “random”

Look at the interarrival times

a: average interarrival time

CVa =

Often Poisson distributed: CVa = 1 Constant hazard rate (no memory) Exponential interarrivals

Difference between seasonality and variability

Buffer

St Dev (interarrival times)

Average (interarrival times)

Time IA1 IA2 IA3 IA4

Processing p: average processing time

Same as “activity time” and “service time”

CVp =

Can have many distributions: CVp depends strongly on standardization Often Beta or LogNormal

St Dev (processing times)

Average (processing times)

Outflow No loss, waiting only This requires u < 100% Outflow = Inflow

Flow Rate Minimum{Demand, Capacity} = Demand = 1/a