Queueing Theory and Waiting Lines

Size: px
Start display at page:

Download "Queueing Theory and Waiting Lines"

Transcription

1 Queueing Theory and Waiting Lines Most waiting line problems are trying to find the best service Large staff => Good Service Small staff => Poor Service What is Best It depends on the organization!

2 Most businesses look at Best in terms of $$$ They translate everything into $$$, and then try to make the total $$$ smallest. How? Total $ = Service Cost $ + Waiting Cost $ Service Cost when Service Waiting Cost when Service

3 Originally started with Mr Erlang (from Denmark) about 100 years ago He investigated telephone systems to try to find what kind of network you had to build to keep the system functioning almost always The Erlang Distribution is named after him The Erlang Distribution is a more complex version of the Poisson distribution

4 The Erlang Family of Distributions

5 Cumulative Probability for Erlang Distributions

6 Queueing Systems All Queueing Systems can be classified depending on the nature of the three parts: Characteristics of the Arrivals Characteristics of the Queue (Waiting Line) Characteristics of the Service

7 1. Arrivals Characteristics The arrivals in the system are classified as: Size of the population (finite of infinite) Usually choose an infinite population Pattern of arrivals Arrivals are independent of each other Arrivals might follow a schedule Arrivals might be random Often choose the Poisson distribution which is described entirely by the number of arrivals per unit time

8 Poisson Distribution P X = e X X! This formula gives the probability of X arrivals per unit of time Lambda (λ) is the average rate of arrivals into the queue

9 Arrivals... Arrivals are also classified according to the behaviour of the arrivals. Balk? => person does not join the queue because they think it is too big; they will choose to try again later. Renege? => person joins the queue, but later decides to abandon the queue.

10 2. The Waiting Line / Queue Characteristics Length of the Line: Finite or Infinite? e.g., buffer in a network card (limit) e.g., waiting area in a doctor's office (limit) e.g., boats waiting to unload cargo (unlimited)

11 The Waiting Line/ Queue Service Method: e.g., first-come, first-served : FIFO First-In, First-Out e.g., last-come, last-out : LIFO e.g., supermarket lineups, emergency room lineups: Essentially, these prioritize traffic according to some system, e.g., degree of injury (hospital) e.g., speed (Quick-check-out at supermarket) e.g., value (Priority check-in for frequent fliers)

12 3. Service Characteristics Configuration of Service System Single-Channel, Single Phase Multichannel, Single Phase Etc... Service Time Distribution

13 Service: Channels Channel: How many Service Centers are available to handle people in the Queue? Singlechannel means that there is one e.g., one line with many tellers, like at an airport check-in e.g., Xiya market: many queues, but for one line => there is one checkout. This is singlechannel

14 Service: Phases Phase: how many stages do you have to go through to get out the other side? Single-phase means that you only have to go to one service centre. e.g., multiphase: get a health checkup: heart, ears, eyes, etc... all done by a different doctor

15 Service: Service Time Distribution Often Choose the Negative Exponential Distribution. Is a convenient choice when arrivals have a Poisson distribution. In any practical queueing problem you should check very carefully if the arrivals do indeed follow a Poisson distribution, and if service does indeed follow an Exponential Distribution Can be difficult: these distributions are not symmetrical

16 Queue Notation Kendall Notation Arrival Dist. / Service Time Dist. / # Channels M= Poisson Distribution / Exponential Distribution

17 M/M/1 Single Channel with Poisson Arrivals & Exponential Service Time FIFO Arrivals No balking or reneging! Arrivals are independent Average rate of arrivals given by λ which is characteristic of a Poisson distribution Arrivals are from an infinite population Service times are variable but follow a fixed probability distribution (exponential) Average service rate μ > average arrival rate λ

18 M/M/1 Queueing Equations Average # customers in the system = number in queue + number being served L = λ / (μ-λ)

19 M/M/1 Queuing Equations Average time a customer is in the system = time in line + time being served W = 1/(μ-λ)

20 M/M/1 Queue Equations Average # customers in the queue 2 L = q

21 M/M/1 Queue Equations Average time spent waiting in the queue W = q

22 M/M/1 Queueing Equations Utilization Factor = probability that the service facility is being used =

23 M/M/1 Queuing Equations Probability that the # customers is greater than k: P n k = k 1

24 Using Costs in M/M/1 Models What is the economic result of a particular queueing line configuration? Total Cost = Service Cost + Waiting Cost

25 Service Cost Service cost = m * C Where m = # of channels C = cost of one channel to operate C is usually a labour cost, but could also be the rental cost of a machine, etc.

26 Waiting Cost Waiting Cost = Total time spent waiting by all arrivals * Hourly Cost of Waiting = Total number of arrival * Average Waiting Time for each * Hourly cost of waiting

27 Total Cost of a Queue Total cost is service + waiting: Total=mC s W q C w

28 Cost of Waiting is...??? Cost of waiting is hard to figure... It the cost of goodwill The cost of lost customers The cost of losing long-term customers etc.

29 Little's Laws For ANY queueing system which is in a Steady State Such a system has been operating continuously and steadily for a long time, and has reached a fixed overall characteristic

30 Little Law #1 Total # customers in the System (L) is related to the arrival rate (λ) and... the average time in the system (W) L= W

31 Little Law #2 Total # customers in the queue (Lq) is related to the arrival rate (λ) and... the average time in the queue (Wq) L q = W q

32 An Example These formulas imply that you can tell how busy the server is just by watching the length of the line. That's because Lq can be calculated from ρ, the server utilization factor, the proportion of the time that the server is busy.

33 An Example For example, if you see that there two people in line, on average, then 2 L q = 1 Solve that for ρ, and you get ρ = , so the server is busy almost three-fourths of the time.

34 A Warning Be careful about trying this in real life, especially if your impression of the length of the line is from casual observation. When you look, the line is more likely to be shorter than Lq than it is to be longer than Lq. That s because the distribution is skewed. Every so often, the line will get very long, and that s what brings the average length up to Lq.