MATS-30004 Quantitative Methods Dr Huw Owens www.personalpages.manchester.ac.uk/staff/huw.owens

Download Report

Transcript MATS-30004 Quantitative Methods Dr Huw Owens www.personalpages.manchester.ac.uk/staff/huw.owens

MATS-30004

Quantitative Methods Dr Huw Owens www.personalpages.manchester.ac.uk/staff/huw.owens

Queuing Models

• Imagine the following situations: – Shoppers waiting in front of a check-out stand in a supermarket; – Cars waiting at a red traffic light; – Patients waiting in a lounge of a medical centre; – Planes waiting for taking off in an airport; – Customers waiting for tables in Pizza Hut (especially at weekends); • • …… • What these situations have in common is the phenomenon of waiting.

Waiting causes inconvenience, but like it or not, it is part of our daily life. All we hope to achieve is to reduce the inconvenience to bearable levels. 06/05/2020 2

• The waiting phenomenon is the direct result of randomness in the operation service facilities.

• In general, the customer’s arrival and service time are not known in advance.

• Our objective in studying the operation of a service facility under random conditions is to secure some characteristics that measure the performance of the system under study.

06/05/2020 3

• Some of the characteristics that are of interest are the following: 1. The average number of customers in the queue 2. The average number of customers in the system (the number in queue + the number being served) 3.

The average time a customer spends in the queue 4.

The average time a customer spends in the system (the waiting time plus the service time) 5.

6.

The probability that an arriving customer has to wait for service The probability of

n

customers in the system Managers who have the above information are better able to make decisions that balance desirable service levels against the cost of providing the service.

06/05/2020 4

• • • • •

The Structure of a Queue

As customers arrive at a facility, they join a queue. The server chooses a customer from the queue to begin service. Upon the completion of a service, the process of choosing a new waiting customer is repeated. This is how a queuing situation is created. It is assumed that no time is lost between the completion of a service and the admission of a new customer into the facility. A simple queuing system is illustrated in Figure 1.

This diagram depicts a

single channel queue

, i.e., all customers entering the system must pass through the

one

channel. When more customers arrives at the facility, It is necessary the system have

multiple channel queue

to serve the customers.

06/05/2020 5

System Customer arrivals Queue Customer leaves Server Figure 1. A single channel queue system • Obviously, the main “actors” in a queuing system are the

customers

and the

server

. • The elements that are of most interest in the queuing system are the pattern in which the customers arrive, the service time per customer, and the queue discipline.

06/05/2020 6

The Process of Arrivals

• • • Defining the arrival process for a queue involves determining the probability distribution for the number of arrivals in a given period of time.

In many queuing situations the arrivals occur in a occur.

random

fashion; that is, each arrival is independent of other arrivals, and we cannot predict when an arrival will In such cases, the pattern.

Poisson probability distribution

is used to describe the arrival • • • Using Poisson probability function, the probability of period is defined as follows:

P

(

x

)  

x e

 

x

!

(for

x

= 0, 1, 2…)

x

arrivals in a specific time (1) where – –

x e

= the number of arrivals in the period – λ = the average or mean number of arrivals per period = 2.71828

06/05/2020 7

Example 1

• The North-west Fried Chicken has analysed data on customer arrivals and has concluded that the mean arrival rate is 45 customers per hour.

• For a 1-minute period, the mean number of arrival would be λ = 45/60 = 0.75 arrivals per minute.

• We can use the following probability function to • compute the probability of period:

x

arrivals during a 1-minute

x P

(

x

)  0 .

75

e

 0 .

75

x

!

x P(x) The Poisson probability distribution during a 1-minute period is listed as follows: 0 1 2 3 4  5 0.4724 0.3543 0.1329 0.0332 0.0062 0.0010 06/05/2020 8

The Distribution of Service Times

• • • The service time is the time the customer spends at the service facility once the service has started.

Service time normally varies according to the individual situations.

In the North-west Fried Chicken example, each customer’s order may be of different sizes. It may take 1 minute to fill a small order, but 2 or 3 minutes to fill a larger order.

• • • It has been determined that the

exponential probability distribution

approximation of service times in queuing situations.

often provides a good If the probability distribution for service times follows an exponential probability distribution, the probability that the service time will be less than or equal to a time of length

t

is given by P(service time 

t

) = 1 

e

t

(2) • where –  = the average or mean number of customers that can be served per time period 06/05/2020 9

Example 1

• Suppose that North-west Fried Chicken has studied the order-taking and order- filling process and has found that the single server can process an average of 60 customer orders per hour.

• On a 1-minute basis, the average or mean service rate would be  = 1 customer per minute. This makes the equation (2) become = 60/60 • P(service time 

t

) = 1 

e

t

for this case.

• • • • For example P(service time  0.5 min.) = 1 P(service time P(service time   1.0 min.) = 1 2.0 min.) = 1 -

e -1(0.5)

= 1 - 0.6065 = 0.3935

e e -1(1.0) -1(2.0)

= 1 - 0.3679 = 0.6321

= 1 - 0.1353 = 0.8647

06/05/2020 10

Queue Discipline

• • • • • • In describing a queuing system, we must define the manner in which the queuing customers are arranged for service. The possible queue disciplines are: First-in-first-out (FIFO) or first-come-first-served (FCFS) Last-in-first-served (LIFO) Service-in-random-order (SIRO) Others The FIFO or FCFS queue discipline applies to many situations.

06/05/2020 11

Steady-State Operation

• • • • A queuing system gradually builds up to a normal or steady state from its beginning. The start-up period is known as the

transient period

. This period ends when the system reaches the normal or steady-state operation. Queuing models describe the steady-state operating characteristics of the queue.

06/05/2020 12

The Single-channel Queue Model with Poisson Arrivals and Exponential Service Times

• • • • – – – – This is the simplest queuing model and it assumes the following: The queue has a single channel The pattern of arrivals follows a Poisson probability distribution The service times follow an exponential probability distribution The queue discipline is FCFS The formulas that can be used to develop the steady-state operating characteristics in this situation are given below, with  = the mean or average number of arrivals per time period (the mean arrival rate)  = the mean or average number of services per time period (The mean service rate) 06/05/2020 13

• • • •      The probability that there are no customers in the system

P 0 = 1 -

/

 The average number of customers in the queue

L q =

2 /[

(

-

)]

(3) (4) The average number of customers in the system (the number in queue + the number being served)

L = L q +

/

 (5) The average time a customer spends in the queue

W q = L q /

 The average time a customer spends in the system (the waiting time plus the service time) (6) 06/05/2020 14

• • •

W = W q + 1/

  The probability that an arriving customer has to wait for service

P w =

/

  The probability of

n

customers in the system

P n = (

/

) n P 0

(7) (8) (9) • • • Formula (8) provides the probability the service facility is busy, and thus the ratio referred to as the

utilisation factor

for the service facility.

/

 is often The above formulas are applicable only when the mean service rate arrival rate  , i.e., when 

/

 < 1.

 is greater than the mean If this condition does not exist, the queue will grow without limit since the service facility does not have sufficient ability to handle the arriving customers. Therefore, to use these formulas, we must have 

>

 .

06/05/2020 15

Example 1

• Recall that for the North-west Fried Chicken problem we had a mean arrival rate of = 0.75 customers per minute and a mean service rate of Obviously the condition 

/

   = 1 customers per minute.

< 1 is satisfied. Then we can use the formulae to calculate the operation characteristics for North-west Fried Chicken single queue: • • • • •

P 0 = 1 -

/

 = 1 - 0.75/1 = 0.25

L q =

2 /[

(

-

)]

= 0.75

2 /[(1(1-0.75)] = 2.25 customers

L = L q +

/

 = 2.25 + 0.75/1 = 3 customers

W q = L q /

 = 2.25/0.75 = 3 minutes

W = W q + 1/

 = 3 + 1/1 = 4 minutes • 06/05/2020

P w =

/

 = 0.75/1 = 0.75

16

• Equation

P n = (

/

) n P 0

can be used to determine the probability of any number of customers in the system. Some computation results are listed in the following table.

Numbers of Customers 0 1 2 3 4 5 6  7 Probability 0.2500 0.1875 0.1406 0.1055 0.0791 0.0593 0.0445 0.1335 06/05/2020 17

• Looking at the results of the single-channel queue for the North-west Fried Chicken, we can learn several important things about the operation of the queuing system:    Customers wait an average of 3 minutes before beginning to place an order, which is somewhat long for a business based on fast service; the average number of customers waiting in line is 2.25 and 75% of the arriving customers have to wait for service; this indicates something needs to be done to improve the efficiency of the queue operation; There is a 0.1335 probability that seven or more customers are in the queuing system at one time, which indicates a fairly high probability that the North-west Fried Chicken will periodically experience some very long queues if it continues to use the single channel operation.

06/05/2020 18

• If the operating characteristics are unsatisfactory in terms of meeting companies standards for service, something will need to be done to improve the queue operation. •

To reduce the waiting time mainly means to improve the services rate

. The service improvements can be made by either • increasing the mean service rate  by making a creative change or by employing new technology; or • adding parallel service channels so that more customers can be served at a time.

06/05/2020 19

Example

• Suppose that the North-west Fried Chicken management decides to increase the mean service rate  by employing an order filler who will assist the order taker at the cash machine. • By this change, the management estimates that the mean service rate can be increased from the current 60 customers/hour to 75 customers/hour. • The mean service rate for the revised system is  customers per minute. • Then using  = 0.75 and  = 75/60 = 1.25 = 1.25, the characteristics of the revised system are calculated as follows: 06/05/2020 20

• Comparison between the original system and the revised system shows the service of the North-west Fried Chicken has been greatly improved due to the action taken.

Operating Characteristics Probability of no customers in the system Average number of customers in the queue Average number of customers in the system Average time a customer spends in the queue Average time a customer spends in the system Probability of an arriving customer has to wait for service Probability of 7 or more customers in the system Original 0.2500 2.2500 3.000 3.000 min. 4.000 min. 0.75 0.1335 Revised 0.400 0.900 1.500 1.200 min. 2.000 min. 0.600 0.028 06/05/2020 21

• • •

The Multiple-channel Queuing Model with Poisson Arrivals and Exponential Service times

A multiple-channel queue consists of two or more channels or service locations that are assumed to be identical in terms of service capability.

In the multiple channel system, arriving customers wait in a single queue and then move to the first available channel to be served (such as the queue waiting to pass the security check in Manchester airport).

A 3-channel queuing system is depicted in Figure 2.

06/05/2020 22

06/05/2020 Customer arrivals Queue System Server1 Customer leaves Server2 Customer leaves Server3 Customer leaves Figure 2. A three channel queue system 23

Assumptions for the queue in the multiple channel system:

• • • • • • The queue has two or more channels The pattern of arrivals follows a Poisson probability distribution The service time for each channel follows an exponential probability distribution The mean service time  is the same for each channel The arrivals wait in the single queue and then move to the first open channel for service The queue discipline is first-come, first-served (FCFS) 06/05/2020 24

• Notations: • •   = the mean arrival rate for the system = the mean service rate for each channel •

k

= the number of the channels • Formulas: – The probability that there are no customers in the system –

P

0   1

k

n

 0

n

!

)

n

 1

k

!

)

k

k k

    (10) 06/05/2020 25

• The average number of customers in the queue •

L q

 (

k

( /  1 )!(

k

)   ) 2

P

0 – The average number of customers in the system •

L = L q +

/

 • The average time a customer spends in the queue • •

W q = L q /

 • The average time a customer spends in the system

W = W q + 1/

 06/05/2020 (11) (12) (13) (14) 26

• • The probability that an arriving customer has to wait for service

P w

 1

k

!

   

k

k k

    

P

0 (15) • The probability of

n

customers in the system •

P n

 •

P n

n

!

)

n P

0 ( )

n

)

P

0 for n  k for n > k (16) (17) 06/05/2020 27

• While some of the formulas for the operating characteristics of multiple-channel queues are more complex than their single-channel counterparts, the expressions provide the same information.

• The following table is provided to simplify the use of the formulas.

– Values of P 0 for multiple-channel queue with Poisson arrivals and exponential service time 06/05/2020 28

06/05/2020 Ratio  /  0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 1.20 1.40 1.60 1.80 k=2 0.8605 0.8182 0.7778 0.7391 0.7021 0.6667 0.6327 0.6000 0.5686 0.5385 0.5094 0.4815 0.4545 0.4286 0.4035 0.3793 0.3559 0.3333 0.2500 0.1765 0.1111 0.0526 k=3 0.8607 0.8187 0.7788 0.7407 0.7046 0.6701 0.6373 0.6061 0.5763 0.5479 0.5209 0.4952 0.4706 0.4472 0.4248 0.4035 0.3831 0.3636 0.2941 0.2360 0.1872 0.1460 k=4 0.8607 0.8187 0.7788 0.7408 0.7047 0.6703 0.6376 0.6065 0.5769 0.5487 0.5219 0.4965 0.4722 0.4491 0.4271 0.4062 0.3963 0.3673 0.3002 0.2449 0.1993 0.1616 k=5 0.8607 0.8187 0.7788 0.7408 0.7047 0.6703 0.6376 0.6065 0.5769 0.5488 0.5220 0.4966 0.4724 0.4493 0.4274 0.4065 0.3867 0.3678 0.3011 0.2463 0.2014 0.1646 29

06/05/2020 2.00 2.20 2.40 2.60 2.80 3.00 3.20 3.40 3.60 3.80 4.00 4.20 4.40 4.60 4.80 0.1111 0.0815 0.0562 0.0345 0.0160 0.1304 0.1046 0.0831 0.0651 0.0521 0.0377 0.0273 0.0186 0.0113 0.0051 0.1343 0.1094 0.0889 0.0721 0.0581 0.0466 0.0372 0.0293 0.0228 0.0174 0.0130 0.0093 0.0063 0.0038 0.0017 30

Example

– Consider the North-west Fried Chicken situation again. If the management decided to add a parallel service channel to improve the service rather than to increase the mean service rate  , let’s evaluate the operating characteristics for the two-channel system.

– We know that k = 2,  = 0.75, and  = 1. So, • P 0 • L q = 0.4545 (from table) = 0.1227 customer • L = 0.8727 customer • W q = 0.16 min.

• W = 1.16 min.

• P w = 0.2045

• P n  7 = 0.0017

06/05/2020 31

Objective function coefficients

Operating Characteristics Probability of no customers in the system Average number of customers in the queue Average number of customers in the system Average time a customer spends in the queue Original 0.2500 2.2500 Revised 1 Revised 2 0.400 0.900 0.4545 0.1227 3.000 1.500 0.8727 3.000 min. 1.200 min. 0.16 min. Average time a customer spends in the system 4.000 min. 2.000 min. 1.16 min. Probability of an arriving customer has to wait for service 0.75 0.600 0.2045 Probability of 7 or more customers in the system 0.1335 0.028 0.0017 It is clear that the two-channel system will greatly improve the operating characteristics of the queue.

06/05/2020 32

Some General Relationships for Queuing Models

• Previously, we have come across a number of operating characteristics including – L q = the average number of customers in the queue – L = The average number of customers in the system – W q = the average time a customer spends the queue – W = the average time a customer spends in the system • John D. C. Little showed that general relationships existing among these four characteristics apply to a variety of different queues. Two of the relationships, referred to as

Little’s flow equation

, are as follows: • L = • L q =  W  W q (18) (19) 06/05/2020 33

• Another general relationship is the expression for the average time in the system: • W = W q + 1/  • The importance of these relations is that they apply to

any

queuing models regardless the arrival patterns and the service time probability distribution.

06/05/2020 34

Economic Analysis of Queues

• For a queuing system, the manager has to decide at what level the system should be run so that it is most economical. In other word, the manager has to make sure that the

total cost

for operating the queuing system is minimised.

• In queuing systems, the total cost comes from two directions, i.e. the waiting cost and the service cost. Let’s use the following notations: – c – c w s = the waiting cost per time period for each customer – L = the average number of customers in the system per time period = the service cost per time period for each channel – k = the number of channels – TC = the total cost • Then the total cost is – TC = c w L + c s k 06/05/2020 (20) 35

• A critical issue in conducting an economic analysis of a queue is to obtain reasonable estimates of the

waiting cost

and

service cost

per period.

• Of these two, the waiting cost per period is usually more difficult to evaluate.

• This is not a direct cost to a company. However, if this cost is ignored and the queue is allowed to grow, customers will ultimately take their business to elsewhere.

• In this way, the company will experience lost sales, and incur a cost. The service cost is generally easier to determine. This cost is the relevant cost associated with operating each service channel.

06/05/2020 36

Example

• Assume that in the case of Northwest Fried Chicken, the waiting cost rate is £10 per hour for customer waiting time and the service cost rate is £7 per hour. Calculate the total cost for single-channel and two-channel queuing system: • Single-channel system: – We knew that the average number of customers in the system L = 3. So – TC = £10 (3) + £7 (1) = £37.00 per hour • Two-channel system: – L = 0.8727

– TC = £10 (0.8727) + £7 (2) = £22.73 per hour • Thus, given the cost data provided by the North-west Fried Chicken, the two-channel system provides the more economical operation.

06/05/2020 37

• The general shapes of the cost curves in the economic analysis of queues are show in Figure 3.

Total Cost per Hour Total cost Service cost Waiting cost Figure 3 06/05/2020 38

Other queuing Models

• D G Kendall suggested a notation that is helpful in classifying the wide variety of different queuing models that have been developed. The three-symbol notation Kendall notation is as follows: • A/B/s • where – A denotes the probability distribution for the number of arrivals – B denotes the probability distribution for the service time – s denotes the number of channels 06/05/2020 39

• The values for A and B that are commonly used are as follows: • M designates a Poisson probability distribution for the number of arrivals or an exponential probability distribution for service time • D designates that the number of arrivals or service time is deterministic or constant • G designates a general distribution with a known mean and variance for the number of arrivals or service time 06/05/2020 40

• Using the Kendall notation, the single-channel queuing model with Poisson arrivals and exponential service times is classified as an M/M/1 model. • The two-channel queuing model with Poisson arrivals and exponential service times would be classified as an M/M/2 model.

• We will not cover the other queuing models because of time limitation and the similarity of the equations for the operating characteristics. These equations can be found in the listed reference books.

06/05/2020 41