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

Slides:



Advertisements
Similar presentations
Lecture 5 This lecture is about: Introduction to Queuing Theory Queuing Theory Notation Bertsekas/Gallager: Section 3.3 Kleinrock (Book I) Basics of Markov.
Advertisements

Exponential Distribution
Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
Queueing Models and Ergodicity. 2 Purpose Simulation is often used in the analysis of queueing models. A simple but typical queueing model: Queueing models.
Continuous-Time Markov Chains Nur Aini Masruroh. LOGO Introduction  A continuous-time Markov chain is a stochastic process having the Markovian property.
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
Discrete Time Markov Chains
TCOM 501: Networking Theory & Fundamentals
1 Part III Markov Chains & Queueing Systems 10.Discrete-Time Markov Chains 11.Stationary Distributions & Limiting Probabilities 12.State Classification.
Continuous Time Markov Chains and Basic Queueing Theory
Stochastic Processes Dr. Nur Aini Masruroh. Stochastic process X(t) is the state of the process (measurable characteristic of interest) at time t the.
Lecture 13 – Continuous-Time Markov Chains
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Introduction to stochastic process
048866: Packet Switch Architectures Dr. Isaac Keslassy Electrical Engineering, Technion Review.
Queuing Models Basic Concepts. QUEUING MODELS Queuing is the analysis of waiting lines It can be used to: –Determine the # checkout stands to have open.
#11 QUEUEING THEORY Systems Fall 2000 Instructor: Peter M. Hahn
Queueing Theory (2). Home Work 12-9 and Due Day: October 31 (Monday) 2005.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Performance analysis for high speed switches Lecture 6.
EMGT 501 Fall 2005 Midterm Exam SOLUTIONS.
Probability Distributions
Chapter 4: Stochastic Processes Poisson Processes and Markov Chains
Mean Delay in M/G/1 Queues with Head-of-Line Priority Service and Embedded Markov Chains Wade Trappe.
Queueing Theory: Part I
15. Poisson Processes In Lecture 4, we introduced Poisson arrivals as the limiting behavior of Binomial random variables. (Refer to Poisson approximation.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Queuing Networks: Burke’s Theorem, Kleinrock’s Approximation, and Jackson’s Theorem Wade Trappe.
Lecture 7  Poisson Processes (a reminder)  Some simple facts about Poisson processes  The Birth/Death Processes in General  Differential-Difference.
Exponential Distribution & Poisson Process
Queueing Theory I. Summary Little’s Law Queueing System Notation Stationary Analysis of Elementary Queueing Systems  M/M/1  M/M/m  M/M/1/K  …
The Poisson Process. A stochastic process { N ( t ), t ≥ 0} is said to be a counting process if N ( t ) represents the total number of “events” that occur.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Generalized Semi-Markov Processes (GSMP)
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Introduction to Operations Research
Network Design and Analysis-----Wang Wenjie Queueing System IV: 1 © Graduate University, Chinese academy of Sciences. Network Design and Analysis Wang.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
Flows and Networks Plan for today (lecture 4): Last time / Questions? Output simple queue Tandem network Jackson network: definition Jackson network: equilibrium.
Queueing Theory What is a queue? Examples of queues: Grocery store checkout Fast food (McDonalds – vs- Wendy’s) Hospital Emergency rooms Machines waiting.
1 Queuing Models Dr. Mahmoud Alrefaei 2 Introduction Each one of us has spent a great deal of time waiting in lines. One example in the Cafeteria. Other.
Modeling and Analysis of Computer Networks
1 Birth and death process N(t) Depends on how fast arrivals or departures occur Objective N(t) = # of customers at time t. λ arrivals (births) departures.
Generalized Semi- Markov Processes (GSMP). Summary Some Definitions The Poisson Process Properties of the Poisson Process  Interarrival times  Memoryless.
Markov Chains X(t) is a Markov Process if, for arbitrary times t1 < t2 < < tk < tk+1 If X(t) is discrete-valued If X(t) is continuous-valued i.e.
CS433 Modeling and Simulation Lecture 07 – Part 01 Continuous Markov Chains Dr. Anis Koubâa 14 Dec 2008 Al-Imam.
Modeling and simulation of systems Introduction to queuing theory Slovak University of Technology Faculty of Material Science and Technology in Trnava.
1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide © 2009 South-Western, a part of Cengage Learning Slides by John Loucks St. Edward’s University.
QUEUING THEORY.
1 Chapter 4 Single Stage Produce-to-Stock Better customer service Lower manufacturing costs (setups) More uniform utilization.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
1 1 Slide Chapter 12 Waiting Line Models n The Structure of a Waiting Line System n Queuing Systems n Queuing System Input Characteristics n Queuing System.
CS 4594 Broadband Intro to Queuing Theory. Kendall Notation Kendall notation: [Kendal 1951] A/B/c/k/m/Z A = arrival probability distribution (most often.
CS433 Modeling and Simulation Lecture 11 Continuous Markov Chains Dr. Anis Koubâa 01 May 2009 Al-Imam Mohammad Ibn Saud University.
Chapter 5 Elementary Stochastic Analysis Prof. Ali Movaghar.
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
1 Chapter 5 Continuous time Markov Chains Learning objectives : Introduce continuous time Markov Chain Model manufacturing systems using Markov Chain Able.
The Pure Birth Process Derivation of the Poisson Probability Distribution Assumptions events occur completely at random the probability of an event occurring.
Discrete-time Markov chain (DTMC) State space distribution
Medium Access Control Protocols
Models of Traffic Flow 1.
V5 Stochastic Processes
Queueing Theory What is a queue? Examples of queues:
Lecture on Markov Chain
System Performance: Queuing
Introduction to Queueing Theory
CS723 - Probability and Stochastic Processes
Lecture 5 This lecture is about: Introduction to Queuing Theory
Presentation transcript:

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

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

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.

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) )(

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

 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) )(

 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)

 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

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.

 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  =

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:

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.

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  t 1-  t  t 1-  t 0... )

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 =

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.

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

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

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

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.

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

The time step for this Markov chain is  t and the transition matrix is: 1-  t  t …  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 =

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 =

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 (t) +  tP n + 1 (t)......

 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).

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.

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.

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 

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 

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

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 – ρ).

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

ρ ρ - 1 N a =

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/(μ - λ)

T a = 1/ (μ – λ )

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.

Ŧ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

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

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

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