Presentation is loading. Please wait.

Presentation is loading. Please wait.

Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche.

Similar presentations


Presentation on theme: "Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche."— Presentation transcript:

1 Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche

2 Purpose: To minimize costs of businesses with waiting lines, taking into consideration the cost of servers and the long-run loss of revenue by making customers wait too long. Outline: I.Rudiments of Queuing Theory a. 1 Customer, 1 Server b. Many Customer, No Server c. Many Customers, 1 Server II.Concept of a Stationary Distribution III.Traffic Intensity a. Average Queue Length b. Little’s Principle c. Average Waiting Time IV.Store Profit Maximization

3 1 Customer, 1 Server N(t) = number of individuals at checkout counter at time t. N(t) has only two possible values of 0 or 1. “being served” corresponds to N(t) = 1. “finished being served” corresponds to N(t) = 0.

4 To obtain the time-dependent transition probabilities for this Markov chain, let X t = be the time-dependent distribution vector for the states “being served” and “finished being served”. That is, p(t) = P[N(t) = 1] and q(t) = P[N(t) = 0] p(t) q(t) )(

5 q(t) = 1 – p(t) lim p(t) = 0 lim X t = State diagram  P[service is completed in  t] =  t  P[service is not completed in  t] = 1 –  t t  t  10  t  t ( 0101 ) 1

6  The transition matrix for each  t time step is given by A =  Thus, X t+  t = AX t which in matrix form gives: ( 1 –  t 0  t 1 ) p(t +  t) q(t +  t) () = ( 1 –  t 0  t 1 ) p(t) q(t) )(

7  Performing matrix multiplication yields: p(t +  t) = (1 –  t)p(t)  Rearranging so difference quotient is on the left-hand side:  By letting  t go to zero, the difference quotient becomes a derivative, and p(t +  t) – p(t)  t = -  p(t) p(t +  t) – p(t)  t tt 0 limp’(t) = = -  p(t)

8  This is the exponential differential equation with solution: p(t) = P[N(t) = 1] = p  e -  t  Since we assumed that there is an individual initially being served, N(0) = 1. This implies that p(0) = 1 which gives p 0 = 1. Finally we have: p(t) = P[N(t) = 1] = e -  t  Since q(t) = 1 – p(t), the probability of completing the service is: q(t) = 1 – e -  t

9 Next let T denote the time at which service is completed. It is considered to be the time until transition from one state to another. T is a continuous random variable with range 0 < T < . P[T > t] = P[N(t) = 1]. P[T < t] = 1 – e -  t (complement). Left-hand side = cumulative distribution function of the continuous random variable T. Right-hand side = exponential distribution.

10  P[T > s + t given T > s] = P[T > t] (Memoryless property) for all s,t > 0.  Density function is the derivative of the cumulative distribution which is: f(t) = P[T < t] =  e -  t, 0 < t < .  E(T) = tf(t)dt = t  e -  t dt =  Thus the average value of T is. We interpret the service rate  as: d dt 0 0 1  1 1 Mean Time Until Transition  =

11 Many Customers, No Server 1.The probability that an arrival occurs in a short interval [t, t+  t] is proportional to the length of the interval  t. In symbols:  P[ N(t+  t) - N(t) = 1] =  t for some constant >0. Let N(t) be a time dependent function that denotes the number of customer arrivals in a given interval [0,t], and assume the following:

12 2.The Memoryless Property: The probability that an arrival occurs in [t, t+  t] does not depend on the time of previous arrivals:  P[ N(t+  t) – N(t) = n | N(s) = m ] = P[ N(t+  t) – N(t) = n] for all 0  s  t. 3.Occurrences of arrivals in non-overlapping intervals are independent. 4.The Probability of two or more arrivals in [t, t+  t] is negligible.

13 Assume P n (t) = P[N(t) = n] N(t) has possible values 0,1,2,… since it is possible to have any number of customers in line. Considering a time step of size  t, N(t) forms a Markov Chain, with a transition matrix of: A = ( 1-  t 0 0 0...  t 1-  t 0 0... 0  t 1-  t 0... )

14 tt tt tt 1-  t State Diagram of Transition Matrix X t+  t = AX t is the state equation for each time step size  t, where: ( P 0 (t) P 1 (t) : P n (t) : ) X t =

15 After Matrix Multiplication: we have the following system of equations: P 0 (t+  t) = (1-  t)P 0 (t) P 1 (t+  t) =  tP 0 (t)+(1-  t)P 1 (t) P n (t+  t) =  tP n-1 (t)+(1-  t)P n (t) These equations can then be rearranged to make difference quotients.

16 Letting  t go to zero we obtain a system of differential equations. For n  1,  P n ’(t) = lim  t  0 = [P n-1 (t) – P n (t)], and for n = 0, P 0 ’(t) = - P 0 (t)  This equation is the exponential differential equation with initial condition that there are no arrivals (P 0 (0) = 1). This gives: P 0 (t) = e - t P n (t+  t) – P n (t)  t

17 Similarly, letting n=1, P 1 ’(t) = [P 0 (t)- P 1 (t)] = [e - t - P 1 (t)] This is a first-order linear differential equation which can be solved by multiplying by the integrating factor e t. d dt [ e t P 1 (t) ] = so that e t P 1 (t) = t+c The initial condition P 0 (0) =1 implies P n (0) = 0 for all n  1, thus: P 1 (t) = te - t

18 It can be shown by induction that the system of differential equations has solution:  P n (t) = e - t ( t) n for t  0, n = 0,1,2,… n! Known as a homogeneous Poisson process with rate. ( does not depend on time variable t) Mean is t ( t customers during time interval of length t) Ex. = 2 customers/minute, t =5 minutes t = 5*2 = 10 customers over 5 minutes

19 Many Customers, 1 Server Let N(t) = number of individuals at checkout counter at time t. N(t) = any of the integer values 0, 1, 2, … at time t. Probability of arrival in  t is  t. Probability of departure in  t is  t.

20 Three mutually exclusive events: I. Exactly one arrival in (t,t +  t) II. Exactly one departure in (t,t +  t) III. No arrivals or departures in (t,t +  t). 012 tttt tttt tttt  t 1 –  t -  t 1 –  t 1 –  t -  t

21 The time step for this Markov chain is  t and the transition matrix is: 1-  t  t 0 0 0 …  t 1 –  t –  t  t 0 0 …  t 1 –  t –  t  t 0 0 … 0  t 1 –  t –  t  t 0 … 0  t 1 –  t –  t  t 0 …............... ( ) A =

22 Let P n (t) = P[N(t) = n] be the probability that there are n customers in the queue at time t. Thus letting P 0 (t) P 1 (t) P n (t)...... () Xt =Xt =Xt =Xt =

23 We obtain the equation X t +  t = AX t for the single-server queue. The state equation gives the following (infinite) system of equations for the single- server queue: P 0 (t +  t) = (1 –  t)P 0 (t) +  tP 2 (t) P 1 (t +  t) = (1 –  t -  t)P 1 (t) +  tP 0 (t) +  tP 2 (t) P n (t +  t) = (1 –  t -  t)P n (t) +  tP 0 - 1 (t) +  tP n + 1 (t)......

24  System of differential equations by letting  t go to zero; more specifically, for n > 1,lim  t 0 P n (t +  t) – P n (t) tttt P’ n (t) = = -(  P n (t)  P n – 1 (t) +  P n – 1 (t) And, P 0 ’(t) = - P 0 (t) +  P 1 (t).

25 Many classical methods are available for the solving the system: P n ’(t) =-(  P n (t)  P n – 1 (t) +  P n – 1 (t) P n ’(t) = -(  P n (t)  P n – 1 (t) +  P n – 1 (t) P 0 ’(t) = - P 0 (t) +  P 1 (t) However, they involve ideas beyond the scope of our analysis - instead, we will be using the system of equations to obtain steady-state (time-independent) behavior.

26 Stationary Distribution Looking for whether the system of time-dependent probabilities settles down and displays no more “transient” behavior - analogous to finding the fixed points for deterministic systems. In this case, the fixed points will be “stationary” distributions. The system of differential equations: P n ’(t) =-(  P n (t)  P n – 1 (t) +  P n – 1 (t) P n ’(t) = -(  P n (t)  P n – 1 (t) +  P n – 1 (t) P 0 ’(t) = - P 0 (t) +  P 1 (t) has a fixed point or stationary distribution provided its rates of change are zero, that is: n ’ P n ’(t) = 0 for n  0.

27 lim P n ’(t) = 0 for n  0, is equivalent to assuming that lim P n (t) = P n exists, where P n does not depend upon t. Applying P n ’(t) = 0 to the system of equations, we obtain: 1.) 0 = - P 0 +  P 1 and 2.) 0 = -(  +  )P n + P n-1 +  P n+l, for n > 1. Solving for P 1, using equation 1: P 1 = (  P 0 Solving for P 2, using P 1 and equation 2: P 2 = (  2 P 0 Continuing on, using induction, shows: P n = (  n P 0 t  t 

28 Queue size must be a non-negative integer, hence, P 0 + P 1 + P 2 + … = 1 So, P 0 + (  )P 0 + (  2 P 0 + … = 1 Which is, P 0 Σ (  n = 1. This sums to 1/(1-(  )) provided that (  ) < 1, which is the condition for the stationary distribution. Using this sum, P 0 = 1 – (  so the stationary distribution for the single-server queue is: P n = (  ) n (1-(  )) n = 0 

29 Traffic Intensity Average Queue Length Little’s Principle Average Waiting Time

30 Average Queue Length Let ρ = (λ / μ). (called the traffic intensity of the queue) By assumption, ρ < 1, as λ < μ. Using ρ in: P n = (λ / μ) n (1 – (λ / μ)), P n = ρ n (1 – ρ).

31 Obtaining the average number N a of customers in the queue: N a = E(N) = Σ nP n = Σ n(ρ n (1 – ρ)) = (1 – ρ) Σ nρ n = (1 – ρ) Σ ρnρ n-1 = (1 – ρ)ρ Σ = (1 – ρ)ρ = (1 – ρ)ρ(1 – ρ) -2 = n = 0   ddρddρ ρnρn    ddρddρ  ddρddρ ρnρn (1 / (1 – ρ)) ρ ρ - 1

32 ρ ρ - 1 N a =

33 Average Waiting Time Little’s Principle – the average number of customers in a queueing system is equal to the average arrival rate of customers to that system times the average time spent in that system. a = N a = λT a a / T a = N a / λ = (ρ / ((1 – ρ)λ) = ((λ / μ) / ((1 – (λ / μ))λ)) = (1 / μ) / (1 – (λ / μ)) = (1 / μ) / (1 – ρ) = 1/(μ - λ)

34 T a = 1/ (μ – λ )

35 Model Formulation of Store Profit Maximization C(ŧ), which is the Customer Attrition Function, models the loss of profit per day and is given below: C(ŧ) = { 0 for ŧ  T a0 AT a0 for ŧ  T a0  T a0 represents the threshold where customers stop returning to the store due to long waiting times.

36 Ŧ0Ŧ0 ŧ C(ŧ) Graph of Customer Attrition Function C(ŧ) = C(1/(μ-λ)) for one server C(ŧ) = C(1/(  μ-λ)) for  servers  This models the loss of profit due to customers having to wait in lines

37 Customer waiting costs plus employee costs J(  ) = C(1/(  μ-λ)) +K  1   <   = # number of employees (checkers) K = cost associated with retaining those employees

38 Conclusion The object of the manager is to minimize J(  ) by finding the number of employees that eliminates the attrition factor by decreasing costs.

39 References A Course in Mathematical Modeling, by Douglas Mooney and Randall Swift Dr. Steve Deckelman


Download ppt "Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche."

Similar presentations


Ads by Google