Aoucemets Queueig Systems: Lecture Amedeo R. Odoi October 4, 2006 PS #3 out this afteroo Due: October 9 (graded by 0/23) Office hours Odoi: Mo. 2:30-4:30 - Wed. 2:30-4:30 o Oct. 8 (No office hrs 0/6) _ Or sed me a message Quiz #: October 25, ope book, i class Old quiz problems ad solutios: posted o 0/9 Topics i Queueig Theory Itroductio to Queues Little s Law Markovia Birth-ad-Death Queues The M/M/ ad Other Markovia Variatios The M/G/ Queue ad Extesios Priority Queues Some Useful Bouds ogestio Pricig Queueig Networks; State Represetatios Dyamic Behavior of Queues Lecture Outlie Itroductio to queueig s oceptual represetatio of queueig s odes for queueig models Termiology ad otatio Little s Law ad basic relatioships Birth-ad-death models The M/M/ queueig Referece: hapter 4, pp. 82-203
Queues A Geeric Queueig System Queueig theory is the brach of operatios research cocered with waitig lies (delays/cogestio) A queueig cosists of a user source, a queue ad a service facility with oe or more idetical parallel servers A queueig etwork is a set of itercoected queueig s Fudametal parameters of a queueig : - Demad rate - apacity (service rate) - Demad iter-arrival times - Service times - Queue capacity ad disciplie (fiite vs. ifiite; FIFO/FFS, SIRO, LIFO, priorities) - Myriad details (feedback effects, balkig, jockeyig, etc.) Arrival poit at the Source of users/ customers Size of user source Arrivals process Queue Queue disciplie ad Queue capacity Service process Servers Number of servers Departure poit from the Queueig etwork cosistig of five queueig s I Queueig Queueig 2 Poit where users make a choice Queueig 4 Queueig 3 Poit where users merge + Queueig 5 Out Applicatios of Queueig Theory Some familiar queues: _ Airport check-i; aircraft i a holdig patter _ Automated Teller Machies (ATMs) _ Fast food restaurats _ Phoe ceter s lies _ Urba itersectio _ Toll booths _ Spatially distributed urba s ad services Level-of-service (LOS) stadards Ecoomic aalyses ivolvig trade-offs amog operatig costs, capital ivestmets ad LOS ogestio pricig
The Airside as a Queueig Network Queueig Models a Be Essetial i Aalysis of apital Ivestmets ost Total cost Optimal cost ost of buildig the capacity ost of losses due to waitig Optimal capacity Airport apacity Stregths ad Weakesses of Queueig Theory Queueig models ecessarily ivolve approximatios ad simplificatio of reality Results give a sese of order of magitude, chages relative to a baselie, promisig directios i which to move losed-form results essetially limited to steady state coditios ad derived primarily (but ot solely) for birth-ad-death s ad phase s Some useful bouds for more geeral s at steady state Numerical solutios icreasigly viable for dyamic s Huge umber of importat applicatios A ode for Queueig Models: A/B/m Distributio of service time Number of servers Queueig System / / S Queue ustomers S Service S facility S Distributio of iterarrival time Some stadard code letters for A ad B: _ M: Negative expoetial (M stads for memoryless) _ D: Determiistic _ E k :kth-order Erlag distributio _ G: Geeral distributio
Termiology ad Notatio Number i : umber of customers i queueig Number i queue or Queue legth : umber of customers waitig for service Total time i ad waitig time N(t) = umber of customers i queueig at time t P (t) = probability that N(t) is equal to at time t λ : mea arrival rate of ew customers whe N(t) = μ : mea (total) service rate whe N(t) = Termiology ad Notatio (2) Trasiet state: state of at t is iflueced by the state of the at t = 0 Steady state: state of the is idepedet of iitial state of the m: umber of servers (parallel service chaels) If λ ad the service rate per busy server are costats λ ad μ, respectively, the λ =λ, μ = mi (μ, mμ); i that case: _ Expected iter-arrival time = /λ _ Expected service time = /μ Some Expected Values of Iterest at Steady State Little s Law Give: _ λ = arrival rate _ μ = service rate per service chael Ukows: _ L = expected umber of users i queueig _ L q = expected umber of users i queue _ W = expected time i queueig per user (W = E(w)) _ W q = expected waitig time i queue per user (W q = E(w q )) 4 ukows We eed 4 equatios Number of users A(t): cumulative arrivals to the (t): cumulative service completios i the A(t) N(t) (t) t T T T N ( t) A T N ( t) 0 ( ) 0 L T = = = λt WT T T A ( T ) Time
Relatioships amog L, L q, W, W q Four ukows: L, W, L q, W q Need 4 equatios. We have the followig 3 equatios: _ L = λw (Little s law) _ L q = λw q _ W = W q + μ If we ca fid ay oe of the four expected values, we ca determie the three others The determiatio of L (or other) may be hard or easy depedig o the type of queueig at had L = P (P :probability that customers are i the ) =0 Birth-ad-Death Queueig Systems. m parallel, idetical servers. 2. Ifiite queue capacity (for ow). 3. Wheever users are i (i queue plus i service) arrivals are Poisso at rate of λ per uit of time. 4. Wheever users are i, service completios are Poisso at rate of μ per uit of time. 5. FFS disciplie (for ow). Time: t users The Fudametal Relatioship μ Δt λ Δt -(λ + μ )Δt Time: t+δt + users users - users P (t) = Prob [ users i at time t] P (t + Δt) = P + (t) μ + Δt + P (t) λ Δt + P (t) [ (μ + λ ) Δt] The differetial equatios that determie the state probabilities P (t + Δt) = P + (t) μ + Δt + P (t) λ Δt + P (t) [ (μ + λ ) Δt] After a simple maipulatio: dp (t) = (λ + μ ) P (t) + λ P (t) + μ + P + (t) () () applies whe =, 2, 3,.; whe = 0, we have: dp 0 (t) = λ0 P 0 (t) + μ P (t) (2) The of equatios () ad (2) is kow as the hapma-kolmogorov equatios for a birth-ad-death
The state balace equatios Birth-ad-Death System: State Trasitio Diagram We ow cosider the situatio i which the queueig λ 0 λ λ 2 λ m- λ m λ m+ has reached steady state, i.e., t is large eough to have P (t) = P, idepedet of t, or dp (t) = 0 0 2 m m+ The, () ad (2) provide the state balace equatios: μ μ 2 μ μ m μ m+ μ m+2 3 λ 0 P 0 = μ P = 0 (3) We are iterested i the characteristics of the (λ + μ ) P = λ P + μ + P + =, 2, 3,.. (4) uder equilibrium coditios ( steady state ), i.e., whe The state balace equatios ca also be writte directly the state probabilities P (t) are idepedet of t for from the state trasitio diagram large values of t a write balace equatios ad obtai closed form expressios for P, L, W, L q, W q Solvig.. M/M/: Observig State Trasitio Diagram from Two Poits Solvig (3) ad (4), we have: From poit : λp 0 = μp (λ + μ)p = λp 0 + μp 2 (λ + μ)p = λp + μp + P = λ 0 P0 ; P 2 = λ P = λ λ 0 P0 etc. μ μ 2 μ 2 μ λ λ λ λ λ λ λ ad, i geeral, 0 2 - + λ λ 2... λ λ 0 μ μ μ μ μ μ μ P = P 0 = K P 0 μ μ... μ 2 μ But, we also have: = P = P 0 ( + K ) =0 = Givig, P 0 = + K = From poit 2: oditio for steady state: K < = λp 0 = μp P μp2 λ λ λ λ λ λ λ 0 2 - + μ λ = λ P μp = + μ μ μ μ μ μ
M/M/: Derivatio of P 0 ad P M/M/: Derivatio of L, W, W q, ad L q Step : P = λ P 0, P 2 = λ 2 P 0, L, P = λ μ μ μ Step 2: P =, P 0 λ = P = =0 =0 μ 0 P 0 λ =0 μ Step 3: ρ = λ, the λ = ρ = ρ = (Q ρ < ) μ =0 μ =0 ρ ρ Step 4: P 0 = ρ =0 = ρ ad P = ρ ( ρ) L = P = ρ ( ρ) = ( ρ) ρ = ( ρ)ρ ρ =0 =0 =0 = = ( ρ)ρ d ρ = ( ρ)ρ d dρ =0 dρ ρ λ = ( ρ)ρ ρ μ λ = = = ( ρ) 2 ( ρ) λ μ λ μ L λ W = = = λ μ λ λ μ λ λ W q = W = = μ μ λ μ μ(μ λ) λ λ 2 L q = λw q = λ = μ(μ λ) μ(μ λ) High Sesitivity of Delay at High Levels of Utilizatio Expected delay M/M/: A alterative, direct derivatio of L ad W For a M/M/, with FFS disciplie: apacity ρ = Demad W = ( +) P = E[ N + ] = E[N ] + = L + () =0 μ μ μ μ But from Little s theorem we also have: L = λ W (2) It follows from () ad (2) that, as before: λ L = ; W = μ λ μ λ Does the queueig disciplie matter?
Additioal importat M/M/ results The pdf for the total time i the, w, ca be computed for a M/M/ (ad FFS): f w (w) = ( ρ )μe ( ρ )μw = (μ λ )e (μ λ )w for w 0 Thus, as already show, W = /(μ -λ) = /[μ (-ρ)] The stadard deviatio of N, w, N q, w q are all proportioal to /(-ρ), just like their expected values (L, W, L q, W q, respectively) The expected legth of the busy period, E[B], is equal to /(μ -λ) M/M/: E[B], the expected legth of a busy period N t I B I B I B P 0 = B = busy period I = idle period E[legth Idle period ] E[legth Busy period ] + E[legth Idle period ] But, P 0 = ρ E[legth Idle period] = λ Therefore, E[B] = E[legth Busy period] = = μ ( ρ ) μ λ