Date post: | 04-Jun-2018 |
Category: |
Documents |
Upload: | satish5269115 |
View: | 243 times |
Download: | 1 times |
of 25
8/13/2019 Lecturenotes Krs OR7
1/25
Operation Research /Operational Research (OR)
Chapter 6- Queuing theory
Definition:- Queuing theory is the mathematical study of waiting lines
or queues. It is branch of applied probability theory.
Queuing Theory can be used to describe these real world queues, ormore abstract queues, such as are often found in many branches ofcomputer science, for example in operating system design.
It relies heavily on mathematics, especially statistics.
Examples
Banks/supermarkets - waiting for service
Computers - waiting for a response
Failure situations - waiting for a failure to occur e.g. in a piece ofmachinery
public transport - waiting for a train or a bus
Need for Queuing theory : - Optimum utilization of resource consideringthe better customer service.
Costs:- Co = Cost of operating the service facility
Cw = Cost of waiting customers per unit line
Total cost = Co +Cw. When Co is less, Cw increases and vice versa. This isshown in the below figure.
8/13/2019 Lecturenotes Krs OR7
2/25
Operation Research /Operational Research (OR)
Terminologies Queuing theory :- Customer, Server are principal player
Source:- from where customers are generated. Finite & Infinite
Facility:- Where the service is provided to the customer
Queue:- Customer in the line waiting for the service at facility
Interarrival time: - time between the arrival of two successive customers. Helpanalyze the arrival process.
Service time :- The time required to complete the service at facility. Helps toanalyze the service.
Queue size: - Number of customer s in the queue. Can be infinite as in mail ofacility.
Queue discipline (FCFS, LCFS, SIRO) :- Order in which customer are selectefrom the queue. Imp factor in analysis of models. Main are
FCFS: - First come, First Service
8/13/2019 Lecturenotes Krs OR7
3/25
Operation Research /Operational Research (OR)
LCFS: - Last come, First Service
SIRO: - Service in Random order
Priority, Round Robin
Jockey:- Behavior of human from changing his/hers queue
Balk: - Reject from joining a queue altogether
Renege: - Break up from a queue
Pure Birth & Death Models
Pure Birth Model Pure Death Model
Only arrival is allowed Only departure is allowed
Arrival rate in exponential distribution
At = inter arrival time
- Service rate in exponential distribution
Dt = inter departure time
Customer at t =0 is 0 Customer at t=0 is N
p0 (t) Probability of no arrivals during tipN(t) Probability of no departure during t
8/13/2019 Lecturenotes Krs OR7
4/25
Operation Research /Operational Research (OR)
p0 (t) = p(At>t) = 1- p(At
8/13/2019 Lecturenotes Krs OR7
5/25
Operation Research /Operational Research (OR)
Limh0 [pn(t+h)- pn(t)]/h
= - pn(t) + pn-1(t) = pn(t)
i.e. 1st derivative of pn(t)
Limh0 [pn(t+h)- pn(t)]/h
= - pn(t) pn(t) + pn+1(t) = pn(t)
derivative of pn(t)
Limh0 [p0(t+h)- p0(t)]/h
= - p0(t) = p0(t)
i.e. 1st derivative of p0(t)
Limh0 [pn(t+h)- pN(t)]/h
= - pN(t) = pN(t)
i.e. 1st derivative of pN(t)
p0(t)= p1(t)
pn(t) =[( t)n e- t ]]/ n! is a Poisson distribution
p0(t)= e- t
pn(t) =[( t)N-n e- t ]]/ (N-n)! is a Pois
pN(t)= e- t
p0(t)= 1- pn(t) (from n=1 to n=N)
Exponential Poisson
Random variable Time between successivarrivals, t
Number of arrivals n, during a
8/13/2019 Lecturenotes Krs OR7
6/25
Operation Research /Operational Research (OR)
Range t> 0 n=0.1.2.3..
Density function f(t)= e- t pn(T) =[( T)n e- T ]]/ n!
Mean Value 1/ time units T arrivals during T
Cumulative probability p(t< A)=1- e- A pnA) = e- A p0(A)=e- A
Problem :-
In a state, rate of birth of babies is one in every 12 minutes. Time between birth is inexponential in nature. Find the following
a) The average number of births per year.
b) The probability that no births in any one day
c) The probability of issuing 50 Birth certificates in 3 hrs given that 40 certificat
were issued during the first 2 hrs of the 3 hr period.
Solution:-
8/13/2019 Lecturenotes Krs OR7
7/25
Operation Research /Operational Research (OR)
= 24*60/12 = 120 births/day
a)Total number of births/year = t = 120* 365 = 43,800 birth/yr
b) Prob of no births in any one day = p0(1)= e- t = e- 120*1 = 0
c) Remaining certificates =50- 40 =10
Remaining time = 3-2 = 1hr
So reqd to find prob issuing 10 certificates in one hour
Convert in /hour unit , = 120/24 = 5 birth /hour.
So p10(1)= (5*1)10 e- 5 / 10! = 0.0183
Note :-pn(T) =[( T)n e- T ] ]/ n!
Problem :-
The florist section stocks 18 dozen roses at the beginning of each week. Per day sale
average 3 dozen. (One dozen at a time). Actual demand follows Poisson distributionWhen stock level reaches 5 dozens, new stock of 18 dozens will be placed for delivthe beginning of the following week.. All roses left at t he end of the week are dispooff. Determine
a) The prob of placing order in any one day of the week.
b) The average no of dozen roses that will be discarded at the end of the week.
Solution:-
= 3 dozens/day
8/13/2019 Lecturenotes Krs OR7
8/25
Operation Research /Operational Research (OR)
Prob of placing an order by the end of the day (t)
=pn
8/13/2019 Lecturenotes Krs OR7
9/25
Operation Research /Operational Research (OR)
Generalized Poisson Queuing Model:-
Includes both arrivals and departures based on the Poisson distribution with tin exponential distribution
Based on the steady state behavior of the queue (long run) and not considerinthe transit ( warm up behavior)
Assumes both arrival rate and departure rate are state dependent ( and arecontinuously changing and depends on the number of customers in the facilit
This model derives as a function ofn and n. And using pn , determine the othemeasures like
Average Queue length
8/13/2019 Lecturenotes Krs OR7
10/25
Operation Research /Operational Research (OR)
Average waiting time
Average utilization of the facility
Transition rate diagram
Steady state number in the Queue is n
For any small interval h only one event can occur
8/13/2019 Lecturenotes Krs OR7
11/25
Operation Research /Operational Research (OR)
If at time t, number =n, for t+h, n can change to n+1 with one arrival at the raand n-1 with one departure n
State 0 can be changed to 1 when = 0
is undefined as system is empty and no departure.
Under steady state conditions, for n >0 ,
Expected rate of arrival =Expected rate of of departures
Expected rate of flow into system with state n
= n-1 pn-1 + n+1 pn+1 Expected rate of flow out of system with state n
=( n+ n) pn
Equating the above two equations, we get balance equation
n-1 pn-1 + n+1 pn+1 =( n+ n) pn where n=1,2,3
When n=0, we get 0p0 =1p1
Or p1 = 0p0 /1 or ( 0 / 1)*p0
When n =1, we get 0p0 +2p2 =( 1+ 1) p1
So p2 ={( 1+ 1) p1 - 0p0} /2
Sub substituting for p1
we get p2 ={( 1+ 1) ( 0 / 1)*p0 - 0p0} /2
= p0{( 1 0 / 1) + 0 - 0)}/2 = ( 1 0 / 2 1 ) p0
In general,
8/13/2019 Lecturenotes Krs OR7
12/25
Operation Research /Operational Research (OR)
pn = {( n-1 n-2 n-3.. 0) /(n+1 n n-1.. 1 )} p0
Where P0 = 1- Pn where n= 1 to infinite
Problem :- A grocery shop has 3 counters and condition for operation of each counbased on the number of customers and given as below
Customers 1 to 3 . 1 counter in operation.
Customers 4 to 61 & 2 are in operation
Customers > 6 All 3 in operation
Arrival of customer to the shop in Poisson distribution with mean rate as 10/hr. andaverage departure time is in exponential and average or mean is 12 minutes. Determthe steady state probability pn of n customers in the queue
Solution :-
n = = 10 customer/hour.
For n =1,2,3 only 1 counter operates Son = 60/12 = 5 customers /hour
For n= 4,5,6 2 counter operates and Son = 5*2= 10 customers /hour
For n = 7,8 3 counters operates . So n = 5*3 = 15 customers /hour
N Pn Equation
1 P1 ( 0/1)p0 = 10/5p0 =2p0
8/13/2019 Lecturenotes Krs OR7
13/25
Operation Research /Operational Research (OR)
2 P2 ( 1 0/ 21)p0 =10*10/(5*5)p0 =4p0
3 p3 ( 2 1 0/ 3 21)p0 =10*10*10/(5*5*5)p0=8p0
N Pn Equation
4 P4 ( 3 2 1 0/ 4 3 21)p0 =104/( 10*53)p0 =8p0
5 p5 ( 4 3 2 1 0/5 4 3 21)p0 =105/( 102*53)p0 =8p0
6 P6 ( 5 4 3 2 1 0/65 4 3 21)p0 =106/( 103*53) p0 = (10/5)3* (1=8p0
n pn ( n-1 n-2.. 5 4 3 2 1 0/n n-1.. 6 5 4 3 21)p0 = (10/5)3*(10/15)n-6p0
=8(2/3)n-6p0
To find p0 :-
8/13/2019 Lecturenotes Krs OR7
14/25
Operation Research /Operational Research (OR)
p0+p0(2+4+4*8+ 8*(2/3) + 8*(2/3)2 + 8*(2/3)3 . = 1
p0(1+2+4+4*8+ 8*(2/3) + 8*(2/3)2 + 8*(2/3)3 . = 1
p0{31+8[(2/3) + (2/3)2 +(2/3)3..]} =1
p0 {31+8[ 8/(1-2/3)]} = 1
p0 (55)=1 or p0 =1/55
Note Geometric sum seriesxi =1 /(1-x), wheremod x
8/13/2019 Lecturenotes Krs OR7
15/25
Operation Research /Operational Research (OR)
Characteristics of the Queuing models :-
a = Input arrival distribution
b = Departure or service time distribution
c = Number of parallel server
d = Queue or service discipline
e = maximum length of queue allowed (in queue + service)
f = Size of the calling source (population)
Representation of the Queuing models :-
Devised by D.G Kendall in 1953 Devised by A.M Lee d&e in 1953, f in
Standard Notations for arrival & departure distribution i.e a & b are
M=Monrovian or Poisson arrivals or departure distribution ( exponential inter arrivservice time distribution)
D = Constant time (Deterministic)
Ek = Erlang or Gamma distribution (or sum of independent exponential distribution
GI = General distribution of Interarrival time
8/13/2019 Lecturenotes Krs OR7
16/25
Operation Research /Operational Research (OR)
G = General Distribution of Service time
Standard notation for queue discipline i.e d are FCFS, LCFS, SIRO, GD (general
distribution)c = any number
e & f = finite number or infinite
Steady state measure of performance
Ls= Expected number of customers in system
Lq = Expected number of customers in queueWs = Expected waiting time in system
Wq = Expected waiting time in queue
C bar = Expected number of busy server
Ls = npn for n=1 to infinite
Lq = (n-c)pn for n=c+1 to infinite
Ls= eff Ws
Lq = eff Wq
Ws = Wq +1/
By multiplying the above eqn by eff on both sides we get Ls = Lq+ eff /
Average number of busy server C bar = Ls Lq = eff /
Single Server Models:- c=1
M/M/1: GD/infinite/infinite
8/13/2019 Lecturenotes Krs OR7
17/25
Operation Research /Operational Research (OR)
Per generalized solution, n= andn = for a for n =0,1,2
effective = and lost = 0
= / =Arrival rate/Service rate = Traffic intensity
pn = np0 where n= 0,1,2
p0 (1+ + 2+ 3 .)=1
Assume
8/13/2019 Lecturenotes Krs OR7
18/25
Operation Research /Operational Research (OR)
Let = t1 + t2 +tn+1
where
t1 is the time required for the customer in service to complete it
t2+ t3+..tn are service times for n-1 customers in the queue.
tn+1 represents the service time for arriving customer.
Then w( / n+1) is the conditional density function of given n customers in the systeahead of the arriving customer
w() = ! (n+1)pn for n =0 to infinity= ( ) e ( ) where >0
And Ws = 1/ ( )
M/M/I: GD/N/infinite:-
Here Q length is lm\limited to N-1 as one is in the service.
n = when n =0,1,2,N-1
=0 when n= N, N+1
So = / , then pn(t) =np0 for n< N
=0 for n>N
p0 = (1-)/ (1-)N+1 for not equal to 1
= 1/(N+1) for =1
lost = pN
eff = 1- lost = (1-pN)
8/13/2019 Lecturenotes Krs OR7
19/25
Operation Research /Operational Research (OR)
and eff
8/13/2019 Lecturenotes Krs OR7
20/25
Operation Research /Operational Research (OR)
Number of hour for which the repairman remains busy in an 8- hour day isgiven by
8(/) =8*(5/8)=5hoursHence, the idle time for repairman in an 8-hour day will
Be 8-5=3hours.
b) expected number of TV sets in systemLs= (/- ) = (5/4)/2-(5/4) =5/3=2 TV sets.
2) At a public telephone booth in an post-office arrivals are consideredto be Poisson with an average inter-arrival time of 12mins.the lengthof phone call may be assumed to be distributed exponentially withan average of 4mins calculate the following
a) What is the probability that a fresh arrival will not have to wait for the phone?
b) What is the probability that arrival will not to wait more than 10minsbefore phone is free
c) What is the average length of queue that form from time to time
Solution: From the data of problem
8/13/2019 Lecturenotes Krs OR7
21/25
Operation Research /Operational Research (OR)
Weve =1/12=0.085permin and =1/4=0.025permin; /=4/12=0.33
a) Probability that the arrival will not have wait is given by 1-p(w>0)=1-=1-0.33=0.67
b) Probability that the arrival will have wait for at least is given by
p(w10)= - )e -(- )tdt= 0.165)e -
(0.165)tdt=0.063
This shows that 6.3% of arrivals on an average will have to wait for10mins or more before can use the phone
c) The average of length of the queue form from time is
Ls= ( /- ) = (0.25/0.25-0.085)=0.25/0.165=1.5=2customers
3) In the production shop of a company, the break down of themachine is found to be Poisson distributed with average rate of3machines per hour. The break down at one machine cost Rs 40per
8/13/2019 Lecturenotes Krs OR7
22/25
Operation Research /Operational Research (OR)
hour to the company. There are 2 choices before the company forhiring the repairman. One of the repairman is slow but cheap; theother is fast but expensive. The slow-cheap repairman demands Rs20 per hour and will repair broken down machines exponentially atthe rate of 4per hour. The fast expensive repairman demands Rs30per hour and will repairs machines exponentially at rate of 6perhour.
Which repairman should be hired?
Solution: the total expected hourly cost for both the repairmen is equal tothe total wages paid plus cost due to machine break down (non-productivemachine hours)
Cost of non-productive time=average number of machine in the systeminto cost of idle machine
= Ls*(Rs 40per hour) = (/- )*40
For slow cheap repairman: weve =3 machines per hours: =4machines per hours
Ls=(/- )=3/4-3=3machine
Cost of non-productive machine time=40*3=Rs 120
Total cost of cheap repairman= (40*3) +20=140
8/13/2019 Lecturenotes Krs OR7
23/25
Operation Research /Operational Research (OR)
For fast expensive repairman: weve =3 machines per hours: =6machines per hours
Ls=(/- )=3/6-3=1machinecost of non-productive machine time=40*1=Rs 40
Total cost of expensive repairman= (40*1)+30=Rs 70
The company should hire fast but expensive repairman.
4) The shipping company has a single unloading berth with shipsarriving in a Poisson fashion at an average rate of 3per day theunloading time distribution for an ship with n unloading crews isfound to be exponential with average unloading time 1/2n days. Thecompany has a labor with out regular working hour and to avoid longwaiting lines the company has a policy of using as many unloadingcrews an ship as there are ships waiting in line or being unloaded.
8/13/2019 Lecturenotes Krs OR7
24/25
Operation Research /Operational Research (OR)
a) Under this condition what will be the average number of unloadingcrews working at any time?
b) What is the probability that more 4crews will be needed?
Solution: given that =3ships per day.
Let us assume that at any time, there are n-ships in the system (waiting inqueue & being unloaded).since the service rate depended on waiting line,
Therefore, n=2n ships per day or 2 ships per day (mean service rate withone unloading crews)
Since is constant & service rate increases with increases in queuelength
n= n when there n-ships in the queue & pn= n e (/)
a) Ls= pn= n e (/) = =3/2=1.5 crews
b) The probability that more than 4crews will be needed is same the
probability that there at least 5ships in system at any given time & is givenby
8/13/2019 Lecturenotes Krs OR7
25/25
Operation Research /Operational Research (OR)
n= n- n=1-(p0+ p1 +p2+ p3 +p4)
=1-e-3/2(563/128)=0.019