Você está na página 1de 13

Lecture 13

Waiting Lines or Queuing Theory


Queuing System
• A queue with k servicing stations:

Arrivals Departures

Servicing
Stations
Arrivals
• Arrivals do no occur at regular time intervals
• Rather they tend to occurred in a clustered manner or scattered
• Let us define,
• 𝑃 𝑎𝑛 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑜𝑐𝑐𝑢𝑟𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑡𝑖𝑚𝑒 𝑝𝑜𝑖𝑛𝑡 𝑡 𝑎𝑛𝑑 ∆𝑡 = λ∆𝑡
• The interval ∆𝑡 is sufficiently small.
• This process is called a ‘Poisson Process’ as it has been proved that if
there are n arrivals in the system of duration T then they follow a
Poisson distribution with parameter λT.
(λ𝑇)𝑛 𝑒 −λ𝑇
• So that, 𝑓𝑇 𝑛 = 𝑃 𝑛 𝑎𝑟𝑟𝑖𝑣𝑎𝑙𝑠 𝑖𝑛 𝑡𝑖𝑚𝑒 𝑇 =
𝑛!
Inter arrival time
• Now T also is a random variable
• It represents the time between consecutive arrivals
• It is been proved that T follows an exponential distribution with
parameter λ.
• Thus, 𝑔 𝑇 = 𝑑𝑒𝑛𝑠𝑖𝑡𝑦 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑓𝑜𝑟 𝑇 = λ𝑒 −λ𝑇
Service Time
• Servicing is possible when there a unit in the system
So that,
𝑃 𝑎 𝑠𝑒𝑟𝑣𝑖𝑐𝑒𝑑 𝑢𝑛𝑖𝑡 𝑖𝑠 𝑡𝑢𝑟𝑛𝑒𝑑 𝑜𝑢𝑡 𝑖𝑛 𝑡ℎ𝑒 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 𝑡 𝑡𝑜 ∆𝑡 𝑔𝑖𝑣𝑒𝑛 𝑡ℎ𝑎𝑡 𝑖𝑡 𝑖𝑠 𝑏𝑒𝑖𝑛𝑔 𝑠𝑒𝑟𝑣𝑖𝑐𝑒𝑑 𝑎𝑡 𝑡𝑖𝑚𝑒 𝑡 =
𝜇∆𝑡 ; where µ is some constant.
• If ‘s’ is a random variable representing the time it takes the station to complete service on a unit, then
𝑔 𝑠 = 𝑑𝑒𝑛𝑠𝑖𝑡𝑦 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑠 = 𝜇𝑒 −𝜇𝑠
• The mean servicing rate for a particular station is defined as the conditional expectation of the number
of services completed in one time unit, given that servicing is going on throughout the entire time unit.
1
• The mean servicing time is the mean of the random variable ‘s’, which is .
𝜇
• If n is the number of potential services in time T, that is the number of units the servicing station could
turn out in time T if there were no enforced idle time, then n follows a Poisson distribution with
parameter 𝜋𝑇
𝜇𝑇 𝑛 𝑒 −𝜇𝑇
φ 𝑇 𝑛 = 𝑃 𝑛 𝑠𝑒𝑟𝑣𝑖𝑐𝑒𝑠 𝑖𝑛 𝑡𝑖𝑚𝑒 𝑇 𝑔𝑖𝑣𝑒𝑛 𝑡ℎ𝑎𝑡 𝑠𝑒𝑟𝑣𝑖𝑐𝑖𝑛𝑔 𝑖𝑠 𝑔𝑜𝑖𝑛𝑔 𝑜𝑛 𝑡ℎ𝑟𝑜𝑢𝑔ℎ𝑜𝑢𝑡 𝑇 =
𝑛!
Basic Equations
• Let n= number in the system (number of units waiting plus units being
serviced)
• 𝑃𝑛 =Probability that there are n units in the system at time t (or any other
time)
• 𝑘 = number of servicing stations
λ
• 𝑃1 = 𝑃0
𝜇
λ+(𝑛−1)𝜇 λ
• 𝑃𝑛 = 𝑃𝑛−1 − 𝑃𝑛−2 𝑓𝑜𝑟 𝑛 = 2,3, … , 𝑘
𝑛𝜇 𝑛𝜇
λ+𝑘𝜇 λ
• 𝑃𝑛 = 𝑃𝑛−1 − 𝑃𝑛−2 𝑓𝑜𝑟 𝑛 ≥ 𝑘
𝑘𝜇 𝑘𝜇
• Once

we express all values of 𝑃𝑛 in terms of 𝑃0 and use the relation
σ𝑛=0 𝑃𝑛 = 1, 𝑤𝑒 𝑐𝑎𝑛 𝑒𝑠𝑡𝑖𝑚𝑎𝑡𝑒 𝑡ℎ𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓𝑃0
Single Service Station
• Governing equations are,
λ
• 𝑃1 = 𝑃0
𝜇
λ+𝑘𝜇 λ
• 𝑃𝑛 = 𝑃𝑛−1 − 𝑃𝑛−2 𝑓𝑜𝑟 𝑛 ≥ 𝑘, 𝑤ℎ𝑒𝑟𝑒 𝑘 = 1
𝑘𝜇 𝑘𝜇
λ+𝜇 λ
• So, 𝑃𝑛 = 𝑃𝑛−1 − 𝑃𝑛−2 𝑓𝑜𝑟 𝑛 ≥ 1
𝜇 𝜇
λ 𝑛
• Using induction we can show 𝑃𝑛 = 𝑃0 for n ≥ 0
𝜇
• Then use the condition σ∞𝑛=0 𝑃𝑛 = 1, we get
λ λ 2 λ 𝑛
• 𝑃0 1 + + +⋯+ =1
𝜇 𝜇 𝜇
λ
1−𝜇
• So, 𝑃0 = λ 𝑛+1
1− 𝜇
λ
• When λ < 𝜇; 𝑃0 = 1 −
𝜇
More features
λ λ 𝑛
• 𝑃𝑛 = 1 − 𝑛≥0
𝜇 𝜇
λ2
• Average queue length =𝐸 𝑚 =
𝜇 𝜇−λ
𝜇
• Average length of non-empty queues=𝐸 𝑚 𝑚 > 0 =
𝜇−λ
λ
• Average number of units in system = E n =
𝜇−λ
λ
• Average waiting time of an arrival who waits= 𝐸 𝑤 =
𝜇(𝜇−λ)
More features
1
• Average waiting time of an arrival who waits=𝐸 𝑤 𝑤 > 0 =
𝜇−λ
1
• Average time an arrival spend in the system =
𝜇−λ
• Waiting time distribution:
λ
ψ 𝑤 𝑑𝑤 = 1 − λ𝑒 λ−𝜇 𝑤 𝑑𝑤, for w>0
𝜇
• Conditional Probability Density function for waiting time, given that a
person has to wait :
ψ 𝑤 𝑤 >0 = 𝜇−λ 𝑒 λ−𝜇 𝑤
Example
• Arrivals at a telephone booth are considered to be Poisson, with an
average time of 10 minutes between one arrival and the next. The
length of a phone call is assumed to be distributed exponentially, with
mean 3 minutes.
a. What is the probability that a person arriving at the booth will have
to wait?
b. What is the average length of the queues that form time to time?
c. The telephone company will install a second booth when convinced
that an arrival would expect to have to wait at least 3 minutes for
the phone. By how much the flow of arrivals be increased in order
to justify a second booth?
Solution
• λ= 0.1 arrival per minute
• µ=0.33 service per minute
λ 0.1
• P[an arrival has to wait]= 1-P0 = =
𝜇 0.33
𝜇 0.33
b. 𝐸 𝑚 𝑚 > 0 = =
𝜇−λ 0.33−1
λ
c. 𝐸 𝑤 =
𝜇(𝜇−λ)
If we fix µ=0.33, then for 𝐸 𝑤 =3 we need to find λ′
λ′
That is 3 =
0.33(0.33−λ′ )
Solving, we get λ′ =0.16
Extension
• In earlier example, we have a telephone booth with Poisson arrivals
spaced 10 minutes apart on the average, and exponential call lengths
averaging 3 minutes.
a. What is the probability that an arrival will have to wait more than
10 minutes before the phone is free?
b. What is the probability that it will take him more than 10 minutes
altogether to wait for the phone and complete his call?
c. Estimate the fraction of a day that the phone will be in use.
Answer
∞ λ λ−𝜇 𝑤 λ 10(λ−𝜇)
a. 𝑃 𝑤𝑎𝑖𝑡𝑖𝑛𝑔 𝑡𝑖𝑚𝑒 ≥ 10 = ‫׬‬10 1 − λ𝑒 𝑑𝑤 = 𝑒 = 0.03
𝜇 𝜇
∞ λ−𝜇 𝑣
b. 𝑃 𝑡𝑖𝑚𝑒 𝑖𝑛 𝑠𝑦𝑠𝑡𝑒𝑚 ≥ 10 = ‫׬‬10 𝜇 − λ 𝑒 𝑑𝑣
= 𝑒 10 λ−𝜇 = 𝑒 −2.3 = 0.10

λ
c. 𝑃 𝑛 > 0 = 1 − 𝑃0 =
𝜇

Você também pode gostar