Queuing system theory

Similar documents
Analysis of Discrete Time Queues (Section 4.6)

Equilibrium Analysis of the M/G/1 Queue

CS-433: Simulation and Modeling Modeling and Probability Review

Queueing Networks II Network Performance

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)

Suggested solutions for the exam in SF2863 Systems Engineering. June 12,

Application of Queuing Theory to Waiting Time of Out-Patients in Hospitals.

6. Stochastic processes (2)

6. Stochastic processes (2)

Winter 2008 CS567 Stochastic Linear/Integer Programming Guest Lecturer: Xu, Huan

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur

A Simple Inventory System

Continuous Time Markov Chains

Lecture 4: November 17, Part 1 Single Buffer Management

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

Introduction to Continuous-Time Markov Chains and Queueing Theory

Meenu Gupta, Man Singh & Deepak Gupta

Distributions /06. G.Serazzi 05/06 Dimensionamento degli Impianti Informatici distrib - 1

Experience with Automatic Generation Control (AGC) Dynamic Simulation in PSS E

Applied Stochastic Processes

= z 20 z n. (k 20) + 4 z k = 4

TCOM 501: Networking Theory & Fundamentals. Lecture 7 February 25, 2003 Prof. Yannis A. Korilis

Analytical Chemistry Calibration Curve Handout

Structure and Drive Paul A. Jensen Copyright July 20, 2003

Notes prepared by Prof Mrs) M.J. Gholba Class M.Sc Part(I) Information Technology

Assignment 5. Simulation for Logistics. Monti, N.E. Yunita, T.

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

1 Derivation of Rate Equations from Single-Cell Conductance (Hodgkin-Huxley-like) Equations

NUMERICAL DIFFERENTIATION

A PROBABILITY-DRIVEN SEARCH ALGORITHM FOR SOLVING MULTI-OBJECTIVE OPTIMIZATION PROBLEMS

Problem Set 9 Solutions

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:

Turing Machines (intro)

Department of Statistics University of Toronto STA305H1S / 1004 HS Design and Analysis of Experiments Term Test - Winter Solution

Module 9. Lecture 6. Duality in Assignment Problems

ECE697AA Lecture 17. Birth-Death Processes

CinChE Problem-Solving Strategy Chapter 4 Development of a Mathematical Model. formulation. procedure

Numerical Heat and Mass Transfer

Markov Chain Monte Carlo Lecture 6

Sampling Theory MODULE VII LECTURE - 23 VARYING PROBABILITY SAMPLING

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

Topics in Probability Theory and Stochastic Processes Steven R. Dunbar. Classes of States and Stationary Distributions

Calculation of time complexity (3%)

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9

1 GSW Iterative Techniques for y = Ax

Generalized Linear Methods

CS 798: Homework Assignment 2 (Probability)

Problem Set 9 - Solutions Due: April 27, 2005

Simulation and Random Number Generation

Comparison of Regression Lines

Markov chains. Definition of a CTMC: [2, page 381] is a continuous time, discrete value random process such that for an infinitesimal

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

MODELING TRAFFIC LIGHTS IN INTERSECTION USING PETRI NETS

Statistics Chapter 4

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

χ x B E (c) Figure 2.1.1: (a) a material particle in a body, (b) a place in space, (c) a configuration of the body

Convergence of random processes

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Homework Assignment 3 Due in class, Thursday October 15

Lecture Notes on Linear Regression

Analysis of Queuing Delay in Multimedia Gateway Call Routing

Traffic Signal Timing: Basic Principles. Development of a Traffic Signal Phasing and Timing Plan. Two Phase and Three Phase Signal Operation

Using T.O.M to Estimate Parameter of distributions that have not Single Exponential Family

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

Network of Markovian Queues. Lecture

Simulated Power of the Discrete Cramér-von Mises Goodness-of-Fit Tests

Lecture 10 Support Vector Machines II

4 Analysis of Variance (ANOVA) 5 ANOVA. 5.1 Introduction. 5.2 Fixed Effects ANOVA

Probability and Random Variable Primer

ANSWERS CHAPTER 9. TIO 9.2: If the values are the same, the difference is 0, therefore the null hypothesis cannot be rejected.

Two Methods to Release a New Real-time Task

Resource Allocation and Decision Analysis (ECON 8010) Spring 2014 Foundations of Regression Analysis

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

CSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography

COMPLETE BUFFER SHARING IN ATM NETWORKS UNDER BURSTY ARRIVALS

9 Derivation of Rate Equations from Single-Cell Conductance (Hodgkin-Huxley-like) Equations

Single-Facility Scheduling over Long Time Horizons by Logic-based Benders Decomposition

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

CIE4801 Transportation and spatial modelling Trip distribution

since [1-( 0+ 1x1i+ 2x2 i)] [ 0+ 1x1i+ assumed to be a reasonable approximation

EEE 241: Linear Systems

Negative Binomial Regression

Outline. Communication. Bellman Ford Algorithm. Bellman Ford Example. Bellman Ford Shortest Path [1]

DEMO #8 - GAUSSIAN ELIMINATION USING MATHEMATICA. 1. Matrices in Mathematica

} Often, when learning, we deal with uncertainty:

Dynamic Programming. Lecture 13 (5/31/2017)

Lecture 7: Boltzmann distribution & Thermodynamics of mixing

Answers Problem Set 2 Chem 314A Williamsen Spring 2000

where v means the change in velocity, and t is the

AGC Introduction

CHAPTER 17 Amortized Analysis

Lecture 5. ALOHAnet. ALOHA protocols. Client. Client. Hub. Client

Adaptive Dynamical Polling in Wireless Networks

C/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1

Departure Process from a M/M/m/ Queue

On the relationships among queue lengths at arrival, departure, and random epochs in the discrete-time queue with D-BMAP arrivals

Code_Aster. Identification of the model of Weibull

Statistical Inference. 2.3 Summary Statistics Measures of Center and Spread. parameters ( population characteristics )

Lecture 3: Shannon s Theorem

Transcription:

Elements of queung system: Queung system theory Every queung system conssts of three elements: An arrval process: s characterzed by the dstrbuton of tme between the arrval of successve customers, the mean tme between the arrval s ether constant or changng over tme and the customer populaton s ether fnte or nfnte. A servce process: s characterzed by the dstrbuton of tme to servce arrvals and the number of servers. A queung dscplne: descrbes the order n whch arrvals are servced (FIFO, random select, or prorty queue). The queung dscplne also ncludes characterstcs of the system such as a maxmum queue length (when the queue reaches ths maxmum, arrvals turn away or balks) and customer renegng (customers watng n lne become mpatent and leave the system before servce). The most common format for classfcaton queue system s as; A/B/S/K/E Where, (A) specfes the arrval process, (B) specfes the servce process, (S) specfes number of servers, (K) specfes the maxmum number of customers allowed nto the system and (E) s the queue dscplne. Commonly used symbols for ths classfcaton system are: M: Exponental dstrbuted servce or arrval tmes. D: Constant servce or arrval tmes. E K : Erlang-k dstrbuted servce or arrval tmes. G: General servce or arrval tmes. FIFO: Frst-n frst-out queue dscplne. SIRO: Serve n random-order queue dscplne. PRI: Prorty queue dscplne. GD: General queue dscplne. Example: What s meant by M/D/3/5/PRI? Answer: A queue system wth exponental-dstrbuted arrval (M) Constant servce tme (D), Three servers (3) A lmt of 5 customers n the system (5) Customers are servced accordng to some prorty measure (PRI) 46

Although there are many ways that performances characterstcs of a congeston system can be measured, the most commonly used measures are: L s : Expected number of customer n the system. L q : Expected number of customer n the queue. W s : Expected tme a customer s n the system, ncludng the tme for servce. W q : Expected tme a customer wats for servce (n queue). P : Probablty of exactly () customers n the system, =,,, P(W q > t): Probablty a customer wats (t) or longer. K: system state; t s represented by the number of customers n the system ncludng both queue and servers. Transton; the system moves to adjacent states. Forward transton move from state K to state K+, and backward transton move from state K to state K-. For M/M/, a sngle server queue system, the states and transton are represented by followng dagram: λp λp λp K- λp K K- K K+ μp μp μp K μp K+ Where λ (customer/unt of tme) s the mean of arrval rate and μ (customer/unt of tme) s the mean of departure rate. The transton rate from state (K) to state (K+) = λ*p K. And the transton rate from state (K+) to state (K)= μ*p K+. Where P K and P K+ are the probablty of state K and state K+ respectvely. Example: In a bank system, the arrval rate (λ= customer/hour) and departure rate (μ=5). Calculate the transton rate (5 6), (5 4) and (6 5) f you know that the probablty P 4, P 5, and P 6 are %, 5%, and 5% respectvely. Answer: Transton rate (5 6)= λ* P 5 =*.5=3. Transton rate (5 4)= μ* P 5 =5*.5=3.75 Transton rate (6 5)= μ* P 6 =5*.5=.5. 47

Equlbrum of System: The system s n the equlbrum state f the probablty of fndng the system n a gven state does not change wth tme. In ths case transton (K K+); whch ncreases ths probablty; and transton (K+ K); whch decreases ths probablty; are occurred at the same tme to mantan equlbrum of the system. From the above dagram: λ*p =μ*p, λ*p =μ*p,., and λ*p K =μ*p K+. By repeated elmnaton, P K λ λ = P and ρ =, where ρ s the percent utlzaton of the server or traffc ntensty. μ μ K, When ρ <, the system s stable, and when ρ >, queue ncreases faster than the server could process. The system becomes unstable as the queue grows wthout bounds. Other M/M/ measurements: P can be determned by usng the fact that the sum of the steady state probabltes must be. Therefore, p p p + p + p +... + p n λ + p μ + p n+ λ μ +... = +... + p n n+ [ + ρ + ρ +... + ρ + ρ +...] = λ μ n + p λ μ n+ Ths s the sum of the geometrc seres. Therefore, + ρ n p =, n+ as n ρ ρ Snce ρ <, +... = p = ( ρ ) = ( λ ) μ Probablty of zero n the system, P = -(λ/μ) = - ρ. Probablty of (n) n the system, P n = [-(λ/μ)]*[λ/μ] n n = ρ *(- ρ ). Expected number of customer n the system (L s ) = λ/(μ-λ)= ρ /(- ρ ) Expected number of customer n the queue (L q )= λ /[μ(μ-λ)]=ρ /-ρ Expected tme a customer s n the system (W s )=/(μ-λ). Expected tme a customer wats for servce (n queue) (W q ) = λ/[ μ(μ-λ)] 48

Example : A bank has located an Automatc Teller Machne (ATM) n an offce buldng. Ths ATM s used by a bg number bank s customers. It was notced that the mean tme requred to serve a customer s 5 sec and the mean number of customers wshng to use the machne s 6 per hour. Many customers have complaned that they are watng too long n lne before beng served. In order to determne f a second machne s needed or not, the bank would lke to know the probablty that a customer must wat n lne and the mean tme a customer wats n queue for the machne to become avalable. Help the bank decdes. Soluton: For ths system the arrval rate (λ) = 6 customer/hour, and the servce rate (μ) = (6*6)/5=7 customer/hour. ρ = λ / μ = 6 / 7 =.833 whch means that the system s stable (why?) The expected number of customer n the queue: L q = λ /[μ(μ-λ)]=ρ /-ρ =(.833) /(-.833)=4. customers watng n queue. The expected tme a customer wats for servce (n queue): W q =λ/ μ(μ-λ)=6/[7(7-6)]=.694 hour=4.67 mnutes. Thus we found that a bout 83% of customers must wat n lne wth a mean length of about 4-customers and each customer should wat for 4-mnutes. Ths ndcates that there s no need to add another ATM. Example : Another branch of the bank has the same problem. A statstcal study shows that a mean of 5 customers uses the ATM for a perod of 8-hours, and each customer spends 3-mnutes to complete hs/her servce. Determne whether a second machne s needed or not? Soluton: λ = 5 / 8 = 8.75 customers/hour, and μ = 6 / 3 = customers/hour. ρ = λ/μ =8.75/=.9375 the system s stll stable. But snce ρ s so close to, some problems mght appear n the system! The expected number of customer n the queue: L q =(.9375) /(-.9375)=4.65 customers watng n queue. The expected tme a customer wats for servce (n queue): W q =8.75/[(-8.75)]=.75 hour=45 mnutes. Thus we fnd that a bout 93.75% of customers must wat n lne wth a mean length of 4- customers and watng tme 45-mnutes. So the bank offce takes a decson to add another ATM. Example 3: Compute the probablty that three cars wll be watng n lne at traffc lamp, f you noted that 8-cars arrve n the -sec nterval and cars leave n 8-sec green nterval. Soluton: λ=8/=.666 customer/hour, and μ=/8=. customer/hour. ρ =.666/.=.6 ths mples that the system s stable. 3 The probablty of (3) n the system, P 3 = ρ *(- ρ )=.584. In other words, P 3 =5.8%. 49

Example 4: The jobs arrve at a copy machne for a perod of 3 mnutes are shown n followng ELD. Calculate the arrval rate (λ), Mean tme spent n system (W s ), and mean jobs n system (L s ). 6 7 8 5 4 8 6 3 λ=(number of customers arrved)/ (total tme)=5/3=.666 mn. W s =(Σtme of each customer spent n system)/( Number of customers arrved) =(4+7+++)/5 = 44/5 = 8.8 L s =λ/(μ-λ)=λ* W s =.666*8.8=.4666, W s =/(μ-λ). 5

Fxed tme-step vs. event-to-event: Smulaton Modelng Approaches In smulaton, any dynamc system contnuous or dscrete there must be a mechansm for the flow of tme. For that, we must:. advance tme. keep track of the total elapsed tme 3. determne the state of the system at the new pont n tme 4. termnate the smulaton when the total elapsed tme equals or exceeds the smulaton perod. In contnuous system, we advance tme n small ncrements (Δt) for as long as needed. In smulaton of dscrete system, however, there are two fundamentally dfferent models for movng a system through tme as t s shown n the followng flowcharts: Start Start Read nput data Intalze (ncludng tme t=) Read nput data Intalze t c = t c +Δt Fnd all events that occur, f any, durng perod (t, t c +Δt) Update the system state, and extract ther effect on system statstcs End of smulaton? Output desred statstcs Yes No Fnd next potental event, and ts tme of occurrence Update the system state, and extract ther effect on system statstcs End of smulaton? Output desred statstcs Yes No Stop a- Fxed tme-step smulaton Stop b- Next-event smulaton 5

. Fxed tme-step model: The clock whch s smulated by computer - s updated by a fxed tme Δt, and the system s examned to see f any event has taken place durng ths tme nterval (mnutes, hours, days, or whatever). All events that take place durng ths perod are treated as f they occurred smultaneously at the end of ths nterval.. Event-to-event (or next event) model: The computer advances tme to the occurrence of the next event. It shfts from one event to another. The system state does not change n between. Only those ponts n tme are kept track of when somethng of nterest happens to the system. To llustrate the dfference between the two models, let us assume that we are smulatng the dynamcs f the populaton n a fsh bowl, startng wth, say fsh. If we used fxed tme-step model wth, say Δt= day, then we would scan the fsh bowl once every day (4 hours). On other hand, f we use a next-event model then we wll frst fnd out when the next-event (brth or death) s to take place and then advance the clock exactly to that tme. In general, the next-event model s preferred, (except when we may be forced to use the fxed tme-step model) because we do not waste any computer tme n scannng those ponts n tme when nothng takes place. Ths waste s bound to occur f we pck a reasonably small value for Δt. on the other hand, f Δt s so large that one or more events must take place durng each nterval then our model becomes unrealstc and may not yeld meanngful results. Therefore n most smulaton of dscrete systems the next event model s used. The only drawback of the next event model s that usually ts mplementaton (programmng) turns out to be more complcated than the fxed tme-step model. In practce, all smulaton languages use one of the followng ways (or approaches) to mplement system smulaton models:. Actvty scannng approach: Ths approach s mplemented by descrbng the actvtes that occur durng fxed ntervals of tme. For example, to model the operaton of an nventory system, we could descrbe the sequence of events that occur durng a specfc tme perod: fulfllng customer demand, orderng new stock, and recevng stock that was ordered at earler tme. Then we advance tme to the next perod and repeat. Actvty-scannng smulaton models are generally easy to develop. We ncrement tme by some fxed nterval and descrbe what happens durng ths tme nterval. An mportant ssue n actvty-scannng models s n selectng the sze of the tme nterval. If t s too large, we may lose nformaton due to the fact that many dfferent actvtes occur durng the tme nterval, ths s partcularly mportant f we are nterested n statstcal nformaton about when thngs happen. If t s too small, then nothng may happen for large number of ntervals, causng the smulaton model to be some what neffcent.. Process-drven smulaton: It s mplemented by descrbng the process through whch enttes n the system flow. For example, n a servce system, customers arrve, wat n lne f the server s busy, receve servce, and then leave the system. A process-drven smulaton models the logcal sequence of events for each customer as he/she arrves to system. 3. Event-drven smulaton approach: Wth ths approach, we descrbe the changes that occur n the system at the nstant of tme that each event occurs. Events are sequenced n chronologcal order and may not correspond to a natural flow of enttes. In the servce system example, for nstant, the key events are the 5

arrval of customers, the start of servce, and the end of servce. The arrval of the second customer mght proceed the startng tme of the end of servce for the frst customer. The smulaton logc would descrbe what happens when customer one arrves frst, the arrval of customer two second, the start of servce for customer one thrd, and so on. Fnally, for specal stuatons n whch varables change contnuously over tme, contnuous smulaton technques are used. We here try to dscuss the last two approaches, process-drven smulaton model and eventdrven smulaton model. Process -drven model Approach: The model s smlar to Faclty Utlzaton Model wth exceptons that t descrbes queue formaton of customers when the faclty s busy. Example: a) Wrte a set of mathematcal model equatons for Process-drven model Approach; draw an algorthm that smulates Queung System usng Process-drven model. b) Calculate the arrval, departure watng and dle tmes assocated wth 4- customers enterng the system. c) Calculate the queue averages (AVER_NQ and AVER_WAIT). d) Calculate the servce averages (Utlzaton and Idle tme) for a perod of tme ( 3). Take for the 4-customers the data: Customer () 3 4 TBA (mnutes) 9 ST (mnutes) 6 5 3 Note that TBA =, for the frst customer, ths s mean, the arrval tme= (A =). Soluton: a) The set of mathematcal equatons are as follows:. Consecutve arrval of customers are defnes by A A + TBA. =. The watng tme s provded by WT = D A, If A < D - then the arrved customer enters the queue, otherwse; customer jons the server mmedately (.e. Wt = ) 3. The arrval and departure of each order are related by D = A + Wt + ST. 4. The dle tme s provded by IT A D. where A > D -. = A - A TBA A + ST - Wt D - IT Tme 5. The cumulatve dle tme can be wrtten as, t = t + IT. 53

6. The system performance crtera;.e. the fracton of tme the faclty s n use, T t F =, where T s total smulaton tme. T b) The flowchart below shows the smulaton algorthm of the process. TBA A ST D WT IT t 6 6 4 4 3 9 9 5 7 3 4 4 3 3 43 3 7 c) AVER_NQ=3/3=. AVER_WAIT=3/=3 d) AVER_FU=(6+7)/3=.77 AVER_IT=(4+3)/=3.5 54

N: number of experments. n: number of customers beng servced n each exp. Start Enter n, N j= =, A = and t= Generate R, R then ST, D =ST =+ Generate R the TBA A A + TBA. = Generate R,R then ST WT = D A. Is A <D - D = A + ST. D = A + ST. IT = A D. t = t + IT. Y Is <n F T t = T Is j<n Y j=j+ Compute statstcal nformaton, and output results Stop 55

ELD A A A 3 A 4 6 7 9 3 tme c) Watng tme D D D 3 No. n queue Area=3 d) Faclty Idle tme Faclty curve Area=6 area=7 56

Example: A self-servce car wash has one washng stall. When a customer s n the stall, he/she may choose one of the followng three optons:. Rnse only; need a fxed tme of -mnutes to complete.. Wash and rnse; need a fxed tme of -mnutes to complete. 3. Wash, rnse and wax; need a fxed tme of 3-mnutes to complete. The owners have observed that 4% of customers rnse only; 45% wash and rnse; and 5% wash, rnse and wax. The nterarrval has flow Expo (3). All random numbers requred to calculate both type of servces and tme between arrvals are fxed on the followng dagram. For each car, calculate departure tme (D), and record t n the table. The arrval tmes (A) for a sample of the frst -cars are lsted n followng table. Soluton: Random numbers used to calculate servce types:.7,.39,.6,.,.89,.7,.9,.48,.5,.55 Random numbers used to calculate TBA, whch follows Expo (3):.3,.88,.63,.548,.65,.66,.94,.74,.4,.449 ). We calculate TBA = -3 ln(r) and record the results as follows: Car R TBA.3 36.88 6 3.63 4 4.548 8 5.65 54 6.66 5 7.94 3 8.74 9 9.4 68.449 4 ). Calculate type of servce and servce tme: Draw the emprcal dstrbuton for servce types. Type_3 Type_ Type_.4.85. Car R S. type ST.7.39 3.6 4. 5.89 3 3 6.7 7.9 3 3 8.48 9.5.55 57

3). The event lst dagram and traced results are shown n the followng: 36 4 8 54 69 7 8 49 73 الزمن 56 66 84 94 4 44 59 93 Car TBA A ST WT D IT t 36 36 56 36 36 6 4 4 66 36 3 4 8 6 5 4 8 5 5 54 54 3 84 4 94 6 5 69 5 94 94 7 3 7 3 4 94 8 9 8 43 44 94 9 68 49 59 5 99 4 73 93 4 3 T t 93 3 4). Fnally F = = =. 65 where T = 93 mnutes and t = 3 mnutes. T 93 58