QUEUING THEORY.

Slides:



Advertisements
Similar presentations
Introduction to Queuing Theory
Advertisements

Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
Chapter Queueing Notation
Queueing Models and Ergodicity. 2 Purpose Simulation is often used in the analysis of queueing models. A simple but typical queueing model: Queueing models.
Lecture 13 – Continuous-Time Markov Chains
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Chap. 20, page 1051 Queuing Theory Arrival process Service process Queue Discipline Method to join queue IE 417, Chap 20, Jan 99.
Model Antrian By : Render, ect. Outline  Characteristics of a Waiting-Line System.  Arrival characteristics.  Waiting-Line characteristics.  Service.
EMGT 501 Fall 2005 Midterm Exam SOLUTIONS.
Queueing Theory: Part I
Queueing Theory Chapter 17.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 14-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 14.
QUEUING MODELS Queuing theory is the analysis of waiting lines It can be used to: –Determine the # checkout stands to have open at a store –Determine the.
Lecture 14 – Queuing Systems
Group members  Hamid Ullah Mian  Mirajuddin  Safi Ullah.

Queuing Theory (Waiting Line Models)
Queuing Models and Capacity Planning
1 Exponential Distribution & Poisson Process Memorylessness & other exponential distribution properties; Poisson process and compound P.P.’s.
Introduction to Queuing Theory
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)
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Chapter 20 Queuing Theory to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Introduction to Queueing Theory
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
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.
TexPoint fonts used in EMF.
1 Elements of Queuing Theory The queuing model –Core components; –Notation; –Parameters and performance measures –Characteristics; Markov Process –Discrete-time.
1 Systems Analysis Methods Dr. Jerrell T. Stracener, SAE Fellow SMU EMIS 5300/7300 NTU SY-521-N NTU SY-521-N SMU EMIS 5300/7300 Queuing Modeling and Analysis.
Waiting Lines and Queuing Models. Queuing Theory  The study of the behavior of waiting lines Importance to business There is a tradeoff between faster.
Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche.
Generalized Semi- Markov Processes (GSMP). Summary Some Definitions The Poisson Process Properties of the Poisson Process  Interarrival times  Memoryless.
Chapter 20 Queuing Theory to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Waiting Lines and Queuing Theory Models
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.
Chapter 2 Probability, Statistics and Traffic Theories
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
Chapter 6 Queueing Models
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Waiting Line Theory Akhid Yulianto, SE, MSc (log).
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.
Queuing Theory.  Queuing Theory deals with systems of the following type:  Typically we are interested in how much queuing occurs or in the delays at.
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.
Chapter 5 Elementary Stochastic Analysis Prof. Ali Movaghar.
© 2015 McGraw-Hill Education. All rights reserved. Chapter 17 Queueing Theory.
Queueing Fundamentals for Network Design Application ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
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.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
QUEUING THOERY. To describe a queuing system, an input process and an output process must be specified. Examples of input and output processes are: SituationInput.
Abu Bashar Queuing Theory. What is queuing ?? Queues or waiting lines arise when the demand for a service facility exceeds the capacity of that facility,
Managerial Decision Making Chapter 13 Queuing Models.
Exponential Distribution & Poisson Process
Queueing Theory What is a queue? Examples of queues:
Demo on Queuing Concepts
Solutions Queueing Theory 1
Chapter 20 Queuing Theory
Queuing Theory.
System Performance: Queuing
MATS Quantitative Methods Dr Huw Owens
TexPoint fonts used in EMF.
Mitchell Jareo MAT4340 – Operations Research Dr. Bauldry
Lecture 13 – Queuing Systems
Waiting Line Models Waiting takes place in virtually every productive process or service. Since the time spent by people and things waiting in line is.
Stochastic Processes A stochastic process is a model that evolves in time or space subject to probabilistic laws. The simplest example is the one-dimensional.
Presentation transcript:

QUEUING THEORY

Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting lines, or queues. To describe a queuing system, an input process and an output process must be specified. Examples of input and output processes are: Situation Input Process Output Process Bank Customers arrive at bank Tellers serve the customers Pizza hut Request for pizza delivery are received Pizza parlor send out scooters to deliver pizzas QUEUING THEORY

Queuing Costs vs. Level of Service Total expected cost Cost of operation Cost of operating the service facility per unit time Cost of waiting customers per unit time Optimum service level Level of Service QUEUING THEORY

QUEUING SYSTEM Input source Queuing Process Service Process Jockey Service System Waiting Customers Queuing discipline Arrival Process Departure Input source Queuing Process Service Process Jockey Balk Renege QUEUING THEORY

Input Source Characteristics Input source is characterized by size of calling population, behavior of the arrivals and pattern of arrival of customers. Size of calling population – Homogeneous, sub-classes, finite or infinite. Behavior of arrivals – Patient customer, balking, reneging or jockeying. Pattern of arrivals – Static or dynamic, pattern is further subdivided based on nature of arrival rate and control on the arrival. QUEUING THEORY

Pattern of Arrival Process In static systems the arrivals can be random or at constant rate. Random arrivals can be varying with time. To analyze the queuing system we should know the probability distribution of the arrivals. We obtain distribution for the arrivals and also for the inter-arrival time. In dynamic system, both service facility and customers are controlled. The arrival pattern can be approximated by Poisson, Erlang or Exponential distribution. QUEUING THEORY

QUEUING PROCESS Queuing process refers to length of queues and number of queues. There can be single server (facility) or multiple facility. Queues can be finite (cinema hall) or infinite (sales orders). When customers experience long queues then they may not enter the queue. Queue discipline controls the service for the customers QUEUING THEORY

QUEUE DISCIPLINE The queue discipline describes the method used to determine the order in which customers are served. The most common queue discipline is the FCFS discipline (first come, first served), in which customers are served in the order of their arrival. Under the LCFS discipline (last come, first served), the most recent arrivals are the first to enter service. If the next customer to enter service is randomly chosen from those customers waiting for service it is referred to as the SIRO discipline (service in random order). QUEUING THEORY

QUEUEING DISCIPLINE Finally we consider priority queuing disciplines. A priority discipline classifies each arrival into one of several categories. Each category is then given a priority level, and within each priority level, customers enter service on an FCFS basis. Another factor that has an important effect on the behavior of a queuing system is the method that customers use to determine which line to join. QUEUING THEORY

SERVICE PROCESS Service process is characterized by following arrangement of service facility. distribution of service times. server’s behavior management policies. Arrangement of facilities can be single queue and single server single queue and multiple server mixed arrangement QUEUING THEORY

Service Process Distribution Time taken be server from the commencement to completion of service for a customer is called service time. To describe the output process of a queuing system, we usually specify a probability distribution – the service time distribution – which governs a customer’s service time The most commonly distribution used for service time distribution is negative exponential. Servers are in parallel if all servers provide the same type of service and a customer needs only pass through one server to complete service. Servers are in series if a customer must pass through several servers before completing service. QUEUING THEORY

Performance measures of Queuing theory Time related questions What is the average time an arriving customer has to wait in the queue (Wq) before being served. What is the average time an arriving customer spends in the system (Ws) including waiting and service. Quantitative questions related to no of customers Expected no of customers in the queue for service (Lq) Expected no of customers who are in the system waiting in queue or being serviced (Ls) QUEUING THEORY

Performance measures of Queuing theory Questions involving time both for customers and servers Probability that an arriving customer has to wait before being served Pw. Probability that a server is busy at any particular point (). It is the proportion of the time that a server spends actually with a customer. Probability of having ‘n’ customers in the system when it is in steady state. Pn, n= 0,1,…n. Probability of customer denied service because of queue being full. Pd. QUEUING THEORY

Poisson Distribution Customers arrive at a bank or grocery in a completely random fashion. The probability density function for describing such arrivals during a specified period follows Poisson distribution. Let x be the arrivals that take place during a specified time units. Poisson pdf is given by Mean and variance is given by QUEUING THEORY

Exponential Distribution If the no of arrivals at a service facility during a specified period occurs according to Poisson distribution then the distribution of the intervals between successive arrivals must follow the negative exponential distribution. If  is the rate at which Poisson events occur then the distribution of the time ,x, between successive arrivals is given as QUEUING THEORY

Analysis of a Simple Queue Arrivals with an average arrival rate of  service rate  at the server Single server Infinite no of waiting customers. QUEUING THEORY

Steady State & Transient State At the start of the system the queue is influenced by no of customers, and the elapsed time. This is referred as transient state. After sufficient time the system returns to steady state. We analyse the steady state behavior as transient state is complex and beyond our scope. Arrival rate has to be less than service rate else the system cannot reach steady state. QUEUING THEORY

Modeling Arrival Process We assume that the arrival process can be approximated by Poisson distribution. Let us consider a Poisson process involving the number of arrivals n over a time period t. If  is the arrival rate (traffic intensity) then the no of customers expected in time t will be t. The probability mass function Pn is given by QUEUING THEORY

Modeling Arrival Process The probability mass function of no arrival (n=0) in time t is given by Let us define the random variable T as the time between successive arrivals. T will be a continuous random variable. The assumption that each inter-arrival time is governed by the same random variable implies that the distribution of arrivals is independent of the time of day or the day of the week. This is the assumption of stationary inter-arrival times. QUEUING THEORY

Modeling Arrival Process Stationary inter-arrival times is often unrealistic, but we may often approximate reality by breaking the time of day into segments. A negative inter-arrival time is impossible. This allows us to write We define1/λ to be the mean or average inter-arrival time. QUEUING THEORY

Modeling Arrival Process The distribution of the random variable T is called the exponential distribution. Its probability density function is given by f(t) = λe-λt. for t 0 and is o for t<0. We can show that the average or mean inter-arrival time is given by . QUEUING THEORY

Derivation of Exp Distribution The exponential distribution is based on three axioms: Given N(t), the number of events during the interval (0,t), the probability process describing N(t) has stationary independent increments, in the sense that the probability of an event occurring in interval (T, T+S) depends only on the length of S. The probability of an event occurring in a sufficiently small time interval h> 0 is positive but less than 1 In a sufficiently small time interval h>0, at most one event can occur-that is P{N(h)>1}=0 QUEUING THEORY

Derivation of Exponential Distribution Define Pn(t) as the probability of n events occurring during t. We have seen earlier that probability of no arrival in time t is given by P0(t) = e -t Define f(t) as the pdf of the interval t between successive events, t>0 . We then have P(inter-event time >T) = P(no event during T) QUEUING THEORY

No Memory Property of Exp Distribution If T has an exponential distribution, then for all nonnegative values of t and h, A density function that satisfies the equation is said to have the no-memory property. The no-memory property of the exponential distribution is important because it implies that if we want to know the probability distribution of the time until the next arrival, then it does not matter how long it has been since the last arrival. QUEUING THEORY

Markov Process Markov Processes X(t) satisfies the Markov Property (memoryless) which states that -for any choice of time instants ti, i=1,……, n where tj>tk for j>k P{X(tn+1)=xn+1| X(tn)=xn ……. X(t1)=x1} =P{X(tn+1)=xn+1| X(tn)=xn} Memoryless property as the state of the system at future time tn+1 is decided by the system state at the current time tn and does not depend on the state at earlier time instants t1,…….., tn-1 QUEUING THEORY

Modeling the Service Process We assume that the service times of different customers are independent random variables and that each customer’s service time is governed by a random variable S having a density function s(t). We let 1/µ be the mean service time for a customer. The variable 1/µ will have units of hours per customer, so µ has units of customers per hour. For this reason, we call µ the service rate. Unfortunately, actual service times may not be consistent with the no-memory property. In certain situations, inter-arrival or service times may be modeled as having zero variance; in this case, inter-arrival or service times are considered to be deterministic. QUEUING THEORY

Modeling the Service Process For example, if inter-arrival times are deterministic, then each inter-arrival time will be exactly 1/λ, and if service times are deterministic, each customer’s service time is exactly 1/µ. Negative exponential distribution is used to describe the service times distribution. The pdf of the service times is The probability of n service completion in time t is given by QUEUING THEORY

Basic Notations QUEUING THEORY

Relationship among Performance measures We have the following relationships Average no of customers in the system is equal to the expected no of customers in queue plus in service Average waiting time of the customer in the system is equal to waiting time in queue plus in service QUEUING THEORY

Relationship among Performance measures Average no of customers served per busy period is given by Average length of queue during busy period is given by QUEUING THEORY

Relationship among Performance measures Little's law gives a very important relation between Ls, the mean number of customers in the system, Ws, the mean sojourn time and , the average number of customers entering the system per unit time. Little's law states that The probability , Pn of n customers in the queuing system at any time can be used to determine all the basic measures of performance in the following order QUEUING THEORY

Basic Axioms Let Pn(t) denote the probability that there are n customers in the system at time t. The rate of change of Pn(t) with respect to time t is denoted by derivative of Pn(t) with respect to t. In case of steady state we have QUEUING THEORY

Basic Axioms The no of arrivals in non-overlapping intervals are statistically independent. The probability that two or more customers arrive in time interval (t, t+t) is negligible and is denoted by 0 t.  The probability that a customer arrives in the time interval (t, t+t) is P1(t) =  t + 0 t.  is inter-arrival time and is independent of total no of arrivals up to time t. As t  0, the qty 0 t is negligible. QUEUING THEORY

Probability Analysis Assume that, as t 0 P{one arrival in time  t} =   t P{no arrival in time  t} =1-   t P{more than one arrival in time  t} = O(( t)2) = 0 P{one departure in time  t} =   t P{no departure in time  t} =1-   t P{more than one departure in time  t} = O(( t)2) = 0 P{one or more arrival and one or more departure in time  t} = O(( t)2) = 0 Arrival Process, Mean Inter-arrival time = 1/  Service Process, Mean Service time = 1/  QUEUING THEORY

Waiting Time Paradox Suppose the time between the arrival of buses at the student center is exponentially distributed with a mean of 60 minutes. If we arrive at the student center at a randomly chosen instant, what is the average amount of time that we will have to wait for a bus? The no-memory property of the exponential distribution implies that no matter how long it has been since the last bus arrived, we would still expect to wait an average of 60 minutes until the next bus arrived. QUEUING THEORY

Birth Death Process We subsequently use birth-death processes to answer questions about several different types of queuing systems. We define the number of people present in any queuing system at time t to be the state of the queuing systems at time t. We call Pn the steady state, or equilibrium probability, of state n. The behavior of Pij(t) before the steady state is reached is called the transient behavior of the queuing system. A birth-death process is a continuous-time stochastic process for which the system’s state at any time is a nonnegative integer. QUEUING THEORY

Birth Death Process Law 1 Law 2 Law 3 With probability λnΔt+o(Δt), a birth occurs between time t and time t+Δt. A birth increases the system state by 1, to n+1. The variable λn is called the birth rate in state n. In most queuing systems, a birth is simply an arrival. Law 2 With probability µnΔt+o(Δt), a death occurs between time t and time t + Δt. A death decreases the system state by 1, to n-1. The variable µn is the death rate in state n. In most queuing systems, a death is a service completion. Note that µ0 = 0 must hold, or a negative state could occur. Law 3 Births and deaths are independent of each other. QUEUING THEORY

Steady State Birth Death Process We now show how the Pn’s may be determined for an arbitrary birth-death process. The key role is to relate (for small Δt) Pij(t+Δt) to Pij(t). The above equations are often called the flow balance equations, or conservation of flow equations, for a birth-death process. QUEUING THEORY

Flow Balancing Approach In the “rate diagram” given below, think of the following: Each circle representing a state (i.e., number of customer in the system) has an unknown probability Pn, n= 0, 1, 2, … associated with it 1 2 3   4 QUEUING THEORY

Flow Balancing Approach We obtain the flow balance equations for a birth-death process: In general we can write Value of P0 is determined from the equation QUEUING THEORY

The Kendall-Lee Notation for Queuing Systems Standard notation used to describe many queuing systems. The notation is used to describe a queuing system in which all arrivals wait in a single line until one of s identical parallel servers is free. Then the first customer in line enters service, and so on. To describe such a queuing system, Kendall devised the following notation. Each queuing system is described by six characters: 1/2/3/4/5/6 QUEUING THEORY

The Kendall-Lee Notation for Queuing Systems The first characteristic specifies the nature of the arrival process. The following standard abbreviations are used: M = Inter-arrival times are independent, identically distributed (iid) and exponentially distributed D = Inter-arrival times are iid and deterministic Ek = Inter-arrival times are iid Erlangs with shape parameter k. GI = Inter-arrival times are iid and governed by some general distribution QUEUING THEORY

The Kendall-Lee Notation for Queuing Systems The second characteristic specifies the nature of the service times: M = Service times are iid and exponentially distributed D = Service times are iid and deterministic Ek = Service times are iid Erlangs with shape parameter k G = Service times are iid and governed by some general distribution The third characteristic is the number of parallel servers. QUEUING THEORY

The Kendall-Lee Notation for Queuing Systems The fourth characteristic describes the queue discipline: FCFS = First come, first served LCFS = Last come, first served SIRO = Service in random order GD = General queue discipline The fifth characteristic specifies the maximum allowable number of customers in the system. The sixth characteristic gives the size of the population from which customers are drawn. M/E2/8/FCFS/10/∞ might represent a health clinic with 8 doctors, exponential interarrival times, two-phase Erlang service times, a FCFS queue discipline, and a total capacity of 10 patients. QUEUING THEORY

(M/M/1):(FCFS// ) The models has following assumptions Poisson arrival rate and exponential distribution of inter-arrival times. Single waiting line with no restriction on queue length Queuing discipline is First come first served Single server with exponential service time. The solution is obtained by using flow balancing approach. The three states possible in small time Δt before t are The system is in state n and no arrivals or service completions occurred. The system is in state (n+1) and a service completion occurs, reducing the customers to n. The system is in state (n-1) and an arrival occurs, bringing the no of customers to n. QUEUING THEORY

Single Server (M/M/1) Obtaining system of equations Taking the limits as t 0, and subject to the same normalisation, we get QUEUING THEORY

Single Server Model For equilibrium conditions we require Let =/. Then we get following results Applying normalisation condition of Pn=1 we get QUEUING THEORY

Performance Measures – Single Server Average no of customers in the system Average no of customers in queue QUEUING THEORY

Performance Measures – Single Server Average time a customer spends waiting in the queue Average time a customer spends in system Probability of customers in system greater than or equal to k QUEUING THEORY

Performance Measures – Single Server Variance (fluctuations of queue length) Probability that a queue is non-empty Expected length of non-empty queue QUEUING THEORY

QUEUING THEORY

Example (M/M/1) At a cycle repair shop on an average a customer arrives every five minutes and on an average, the service time is 4 minutes per customer. Suppose that the inter-arrival time follows Poisson distribution and service time is exponentially distributed. Find the various performance characteristics QUEUING THEORY

M/M/1:N/FCFS/ Limited no of customers are allowed in the system. Service rate need not be greater than arrival rate. Steady state equations are QUEUING THEORY

Performance characteristics Service rate meed not be more than arrival rate as arrivals are controlled. eff, rather than ,, is the rate that matters. eff is calculated as arrival rate minus the probability of losing customers. eff =  - lost =  - Pn= (1-Pn) Other parameters are calculated from the eff. QUEUING THEORY

Performance Characteristics QUEUING THEORY

Example Consider a single server queuing system with Poisson arrival, exponential input, exponential service times. Suppose the mean arrival rate is 3 calling units per hour, the expected service time is 0.25 hour and the maximum permissible calling units in the system is 2. Derive the steady state probability distribution of the number of calling units in the system, and then calculate the expected no in the system. QUEUING THEORY

M/G/1: GD/ / Queuing models in which the arrival and departure rate do not follow Poisson are complex. The above is a model with Poisson arrival rate and service time t, is represented by any general distribution. The mean of the distribution is E(t) and variance is Var(t). Let  be the arrival rate. If E(t) < 1, then we can calculate the Length of the system queue. QUEUING THEORY

Example QUEUING THEORY