queuing theory. 2 queuing theory each of us has spent a great deal of time waiting in lines. in this...

58
QUEUING THEORY

Upload: patrick-tyler

Post on 18-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY

Page 2: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 2

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

Page 3: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 3

Queuing Costs vs. Level of Service

Cost of operation

Level of Service

Total expected cost

Cost of waiting customers per unit time

Cost of operating the service facility per unit time

Optimum service level

Page 4: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 4

QUEUING SYSTEM

Input source

Queuing Process

Service Process

Balk Renege Jockey

Queuing discipline

Arrival Process

Waiting Customers

Departure

Service System

Page 5: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 5

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.

Page 6: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 6

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.

Page 7: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 7

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

Page 8: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 8

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

Page 9: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 9

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.

Page 10: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 10

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

Page 11: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 11

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.

Page 12: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 12

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)

Page 13: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 13

• 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.

Performance measures of Queuing theory

Page 14: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 14

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

1,2,..k ,!

][

k

ekxP

k

}var{

}{

x

xE

Page 15: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 15

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

AA

x

x

edxeAxPCDF

Var

xEMean

exf

1 }{

1 {x}

1}{

)(

0

2

Page 16: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 16

Analysis of a Simple Queue

Single server

Arrivals with an average arrival rate of

service rate at the server

Infinite no of waiting customers.

Page 17: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 17

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.

Page 18: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 18

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

..2,1,0 , !

)()|(

n

n

ettPnnxP

tn

Page 19: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 19

• 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.

Modeling Arrival Process

tt

eet

tPnxP

!0

)()|0(

0

Page 20: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 20

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.

t

tdttatTPdttatTP

0)()(and)()(

0

)(1

dttta

Page 21: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 21

• 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 .

Modeling Arrival Process

1

)( TE

Page 22: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 22

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

Page 23: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 23

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)

ondistributi lexponentia is This 0. t,)(

yield willsidesboth of derivative Taking

0T ,1)(

grearranginafter which 0T ),()(

0

0

t

Tt

T

etf

etf

TPtf

Page 24: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 24

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.

)()|( hTPtThtTP

Page 25: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 25

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

Page 26: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 26

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.

Page 27: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 27

• 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

Modeling the Service Process

0 , )( tetf t

..2,1,0 ,!

)( t)in time completion service (

n

n

etnP

tn

Page 28: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 28

Basic Notations

wait. tohascustomer arrivingan y that probabilit

queue. in the time waiting(expected) average

service)in & (waiting system in the time waiting(expected) average

queueempty -non oflength (expected) average

queue in the customers of no (expected) average

served) & queue(in system in the customers of no (expected) average

system in the allowed fcustomers o no maximum

channels service of no

busy) isserver timeof(fraction factor n utilisatioserver or intensity traffic

)(1/ timearrival-inter )/average(1/ timecompletion service average

time.ofunit per served customers of no averageor rate service (expected) average

unit timeper rate arrival averageor rate arrivalcustomer (expected) average

system in the customersn ofy probabilit

service)in & (waiting system in the customers of no

Pw

Wq

Ws

Lb

Lq

Ls

N

s

Pn

n

Page 29: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 29

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

sn

n

n

n PsnLqnPLs )( 0

LqELLs

1WqWs

Page 30: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 30

• Average no of customers served per busy period is given by

• Average length of queue during busy period is given by

Relationship among Performance measures

busy being systemy that probabilit)( where

)(

snP

snP

LsLb

1

)( snP

WqWb

Page 31: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 31

• 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

Relationship among Performance measures

LsLqWqWqLq

LsLsWsWsLs

or 1

or

1or

1or

WqLqWsWqLs

WsnPnLsn

1

0

Page 32: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 32

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

tn

nn

t

nt

n

tPLim

Pdt

dtP

dt

dLim

tPtPLim

0)('

)()}({

oft independen )(

Page 33: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 33

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.

Page 34: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 34

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/

Page 35: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 35

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.

Page 36: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 36

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.

Page 37: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 37

Birth Death Process

• Law 1 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.

Page 38: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 38

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.

,...)2,1()(1111 nPPP nnnnnnn

0011 PP

Page 39: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 39

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

0 1 2 3

4

Page 40: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 40

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

1,2,...n ,)......(

).....(0

11

021

PPn

nn

nn

1111

3311222

2200111

1100

)()equationth (

...

)()2(

)()1(

)0(

nnnnnnn PPPn

PPPn

PPPn

PPn

0

1n

Pn

Page 41: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 41

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

Page 42: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 42

• 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

The Kendall-Lee Notation for Queuing Systems

Page 43: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 43

• 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.

The Kendall-Lee Notation for Queuing Systems

Page 44: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 44

• 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.

The Kendall-Lee Notation for Queuing Systems

Page 45: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 45

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

Page 46: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 46

Single Server (M/M/1)• Obtaining system of equations

• Taking the limits as t 0, and subject to the same normalisation, we get

1...1Pcondition ion normalisat tosubjected

0nfor ]1)[()(

0nfor )(]1)[()(

210

0n

n

11

100

nPPPP

tPntPntttPnttPn

ttPttPttP

0nfor )()()()()(

0nfor )()()(

11

100

tPntPntPndt

tdPn

tPtPdt

tdP

Page 47: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 47

Single Server Model• For equilibrium conditions we require

• Let =/. Then we get following results

• Applying normalisation condition of Pn=1 we get

0,1,2,..nfor 0)}({ and )(

tPndt

dLimPntPnLimtt

001 PPnPP N

)1( and 10 hence and 1

1

is sum whoseseries geometric infinitean isr denominato The

1

0N

0

0

NN

N

N

PnP

P

Page 48: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 48

Performance Measures – Single Server• Average no of customers in the system

• Average no of customers in queue

1

})1(

){1()1(

10 ,)1(

2

Ls

nLs

nnPLs

n

nn

)(

)(]1[][

) to1(n )1(

2

2

0

Lq

PoLsPoPnLsLq

PnnPnPnnLq

Page 49: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 49

• 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

Performance Measures – Single Server

)(

LqWq

LsWs

LsWqWs

Ws

)(11

timeservice queuein timeWaiting

1

)( ;)(

kk

knPknP

Page 50: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 50

• Variance (fluctuations of queue length)

• Probability that a queue is non-empty

• Expected length of non-empty queue

Performance Measures – Single Server

22 )()1()(

nVar

2

1 1)1(

PPonP

)1(1)ob(nPr

line waitingoflength Expected

nP

LqLb

Page 51: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 51

P a r a m e t e r s S y s t e m Q u e u e A v e r a g e n o o f c u s t o m e r s i n

1Ls

)(

2

Lq

A v e r a g e w a i t i n g t i m e p e r u n i t i n

LsWs

P r o b a b i l i t y o f h a v i n g k o r m o r e u n i t s i n t h e s y s t e m

k

knP

)(

E x p e c t e d l e n g t h o f n o n e m p t y q u e u e

Lb

Lb

P r o b a b i l i t y t h a t a q u e u e i s n o n e m p t y

2

)1(

nP

P r o b a b i l i t y t h a t w a i t i n g t i m e i s m o r e t h a n t te )(

te )(

)(

LqWq

001 PPnPP N

Page 52: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 52

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

Page 53: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 53

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

Nnfor

1.-1,2,...Nnfor )(

0nfor

1

11

10

NN-

nnn

μPλP

PPP

PP

Nn 0 and Nnfor 0

get we,/ Using

1,2,...nfor

1,..N N, nfor 0

1-N 0,1,2...,nfor

forPnnPPn

μ μn

n

n

Page 54: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 54

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.

Page 55: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 55

Performance Characteristics

1for 1

1

1 and 1for ,1

11

NPo

PoN

1for 1

1

1for ,1

)1(1

NPo

PnN

n

Parameters System Queue Average no of customers in

N

n

nPnLs0

)1( NP

Lq

Average waiting time per unit in

)1( NP

LsWs

)1( NP

LqWq

Page 56: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 56

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.

Page 57: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 57

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.

1)( ,])[1(2

])var[)(2(2)(

tEtE

ttEtELs

Page 58: QUEUING THEORY. 2 Queuing Theory Each of us has spent a great deal of time waiting in lines. In this chapter, we develop mathematical models for waiting

QUEUING THEORY 58

Example