html5-img
1 / 39

Why Wait?!?

Why Wait?!?. Bryan Gorney. Josh Staidl Matt Boche. Joe Walker. Dave Mertz. 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:.

anka
Télécharger la présentation

Why Wait?!?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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: • Rudiments of Queuing Theory • a. 1 Customer, 1 Server • b. Many Customer, No Server • c. Many Customers, 1 Server • Concept of a Stationary Distribution • Traffic Intensity • a. Average Queue Length • b. Little’s Principle • c. Average Waiting Time • 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. ( ) p(t) q(t) To obtain the time-dependent transition probabilities for this Markov chain, let Xt = 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]

  5. ( ) t  0 1 t  1 mDt 0 1 - mDt • q(t) = 1 – p(t) • lim p(t) = 0 lim Xt = State diagram • P[service is completed in Dt] = mDt • P[service is not completed in Dt] = 1 – mDt 1

  6. ( ) p(t) q(t) ( ( ) ) 1 – mDt 0 mDt 1 1 – mDt 0 mDt 1 ( ) p(t + Dt) q(t + Dt) = • The transition matrix for each Dt time step is given by A = • Thus, Xt+Dt = AXt which in matrix form gives:

  7. Performing matrix multiplication yields: p(t + Dt) = (1 – mDt)p(t) • Rearranging so difference quotient is on the left-hand side: • By letting Dt go to zero, the difference quotient becomes a derivative, and p(t + Dt) – p(t) Dt = -mp(t) p(t + Dt) – p(t) Dt p’(t) = lim = -mp(t) Dt 0

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

  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-mt (complement). • Left-hand side = cumulative distribution function of the continuous random variable T. • Right-hand side = exponential distribution.

  10.  0 0   1 m 1 m = Mean Time Until Transition • 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] = me-mt, 0 < t < . • E(T) = tf(t)dt = tme-mtdt = • Thus the average value of T is . We interpret the service rate m as: d dt 1 m

  11. Many Customers, No Server 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: • 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.

  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. • Occurrences of arrivals in non-overlapping intervals are • independent. • The Probability of two or more arrivals in [t, t+t] is negligible.

  13. ( ) 1-t 0 0 0 . . . t 1-t 0 0 . . . 0 t 1- t 0 . . . Assume Pn(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 =

  14. t t t 1-t 1-t 1-t ( ) P0(t) P1(t) : Pn(t) : Xt = State Diagram of Transition Matrix Xt+t = AXt is the state equation for each time step size t, where:

  15. After Matrix Multiplication: we have the following system of equations: P0(t+t) = (1-t)P0(t) P1(t+t) = tP0(t)+(1-t)P1(t) Pn(t+t) = tPn-1(t)+(1-t)Pn(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, • Pn’(t) = limt0 = [Pn-1(t) – Pn(t)], and for n = 0, P0’(t) = -P0(t) • This equation is the exponential differential equation with initial condition that there are no arrivals (P0(0) = 1). This gives: P0(t) = e-t Pn(t+ t) – Pn(t) t

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

  18. It can be shown by induction that the system of • differential equations has solution: • Pn(t) = e-t(t)nfor 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 Dt is lDt. • Probability of departure in Dt is mDt.

  20. lDt lDt lDt 0 1 2 mDt mDt mDt 1 – lDt 1 – lDt - mDt 1 – lDt - mDt • Three mutually exclusive events: I. Exactly one arrival in (t,t + Dt) II. Exactly one departure in (t,t + Dt) III. No arrivals or departures in (t,t + Dt).

  21. . . . . . ) ( • The time step for this Markov chain is Dt and the transition matrix is: 1-lDt mDt 0 0 0 … lDt 1 – mDt – lDt mDt 0 0 … 0 lDt 1 – mDt – lDt mDt 0 … A = . . . . . . . . . .

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

  23. . . . . . . • We obtain the equation Xt + Dt = AXt for the single-server queue. • The state equation gives the following (infinite) system of equations for the single-server queue: P0(t + Dt) = (1 – lDt)P0(t) + mDtP2(t) P1(t + Dt) = (1 – lDt - mDt)P1(t) + lDtP0(t) + mDtP2(t) Pn(t + Dt) = (1 – lDt - mDt)Pn(t) + lDtP0 - 1(t) + mDtPn + 1(t)

  24. lim Dt 0 Pn(t + Dt) – Pn(t) P’n(t) = • System of differential equations by letting Dt go to zero; more specifically, for n > 1, Dt = -(l + m)Pn(t) + lPn – 1(t) + mPn – 1(t) And, P0’(t) = -lP0(t) + mP1(t).

  25. Many classical methods are available for the solving the system: Pn’(t) =-(l + m)Pn(t) + lPn – 1(t) + mPn – 1(t) P0’(t) = -lP0(t) + mP1(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: Pn’(t) =-(l + m)Pn(t) + lPn – 1(t) + mPn – 1(t) P0’(t) = -lP0(t) + mP1(t) has a fixed point or stationary distribution provided its rates of change are zero, that is: Pn’(t) = 0 for n  0.

  27. lim Pn’(t) = 0 for n  0, is equivalent to assuming that lim Pn(t) = Pn exists, where Pn does not depend upon t. Applying Pn’(t) = 0 to the system of equations, we obtain: 1.) 0 = -lP0 + mP1 and 2.) 0 = -(l + m)Pn + lPn-1 + mPn+l, for n > 1. Solving for P1, using equation 1: P1 = (l / m) P0 Solving for P2, using P1 and equation 2: P2 = (l / m)2 P0 Continuing on, using induction, shows: Pn = (l / m)n P0 t t  

  28. Queue size must be a non-negative integer, hence, P0 + P1 + P2 + … = 1 So, P0 + (l/m)P0 + (l/m)2P0+ … = 1 Which is, P0Σ (l/m)n = 1. This sums to 1/(1-(l/m)) provided that (l/m) < 1, which is the condition for the stationary distribution. Using this sum, P0 = 1 – (l/m), so the stationary distribution for the single-server queue is: Pn = (l/m)n(1-(l/m))  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: Pn = (λ / μ)n (1 – (λ / μ)), Pn = ρn (1 – ρ).

  31.      n = 0 n = 0 n = 0 n = 0 n = 0 n = 0 d dρ d dρ d dρ ρ ρ - 1 Obtaining the average number Na of customers in the queue: Na = E(N) = Σ nPn = Σ n(ρn(1 – ρ)) = (1 – ρ) Σ nρn = (1 – ρ) Σ ρnρn-1 = (1 – ρ)ρ Σ = (1 – ρ)ρ Σ = (1 – ρ)ρ = (1 – ρ)ρ(1 – ρ)-2 = ρn ρn (1 / (1 – ρ))

  32. ρ ρ - 1 Na =

  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. Na = λTa Ta = Na / λ = (ρ / ((1 – ρ)λ) = ((λ / μ) / ((1 – (λ / μ))λ)) = (1 / μ) / (1 – (λ / μ)) = (1 / μ) / (1 – ρ) = 1/(μ - λ)

  34. Ta = 1/ (μ – λ )

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

  36. Graph of Customer Attrition Function C(ŧ) ŧ Ŧ0 • 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

More Related