Solutions Queueing Theory 1 17.2-2) Newell and Jeff are the two barbers in a barber shop they own and operate. They provide two chairs for customers who are waiting to begin a haircut, so the number of customers in the shop varies between 0 and 4. You are given the following steady state probabilities for state n=number of customers. n Pn 0 1 2 3 4 .0625 .2500 .3750 .2500 .0625 Soln: n 0 1 2 3 4 Sum = pn 0.063 0.250 0.375 0.250 0.063 1.000 a. L npn 2.0 npn 0.00 0.25 0.75 0.75 0.25 2.000 (n-2)pn 0.00 0.00 0.00 0.25 0.13 0.375 # Served Pn 0.00 0.25 0.75 0.50 0.13 1.625 b. Lq (no.inqueue) pn 0.375 c. Avg. no. served (no. served ) pn 1625 . d. Since this is a finite queue, we can not use Little’s formula directly. n pn 4 p0 4 p1 4 p2 4 p3 4(1 p4 ) 4(1.0625) 3.75 Solutions Queueing Theory 17.2-2) Soln: d. Since this is a finite queue, we can not use Little’s formula directly. n pn 4 p0 4 p1 4 p2 4 p3 4(1 p4 ) 4(1.0625) 3.75 From Little’s W Wq L Lq 2 0.53 3.75 0.375 010 . 3.75 e. E [ service time] W Wq 1 1 1 W Wq 0.53 010 . 0.63 1 Solutions Queueing Theory 1 17.5-5) A service station has one gasoline pump. Cars wanting gasoline arrive according to a Poisson process at a mean rate of 15 per hour. However, if the pump already is being used, these potential customers may balk. In particular, if there are n cars already at the service station, the probability that an arriving potential customer will balk is n/3 for n=1, 2, 3. The time required to service a car has exponential distribution with mean 4 minutes (=15). a. Construct the rate diagram b. develop the balance equations c. find the steady state probabilities d. find the expected waiting time for cars that stay. Soln: 15 0 a. 10 1 15 5 2 15 3 15 b. State 0 1 2 3 Balance 15P1 = 15P0 (10+15)P1 = 15P0 + 15P2 (5+15)P2 = 10P0 + 15P3 15 P3 = 5P2 P1 = P0 P2 = 2/3P1 P3 = 70/45P2 Solutions 17.5-5) Queueing Theory 15 10 0 State 0 1 2 3 c. 5 1 15 2 15 3 15 Balance 15P1 = 15P0 (10+15)P1 = 15P0 + 15P2 (5+15)P2 = 10P0 + 15P3 15 P3 = 5P2 n 0 1 2 3 Sum = 1 P1 = P0 P2 = 2/3P1 P3 = 70/45P2 p'n pn np n (n-1)p n 1.000 1.000 0.667 1.555 4.222 0.237 0.237 0.158 0.368 1.000 0.00 0.24 0.32 1.10 1.658 0.00 0.00 0.16 0.74 0.893 Solutions Queueing Theory 1 17.5-5) c. d. n 0 1 2 3 Sum = L 1655 . p'n pn np n (n-1)p n 1.000 1.000 0.667 1.555 4.222 0.237 0.237 0.158 0.368 1.000 0.00 0.24 0.32 1.10 1.658 0.00 0.00 0.16 0.74 0.893 Lq 0.893 15(.237) 10(.237) 5(.157) 6.71 W Wq 1 L 1655 . 0.247 6.71 Lq 0.893 0133 . 6.71 W Wq 0.247 0133 . 0114 . Solutions Queueing Theory 1 17.5-6) A maintenance person has the job of keeping two machines in working order. The amount of time that a machine works before breaking down has an exponential distribution with a mean of 10 hours. The time then spent by the maintenance person to repair the machine has an exponential distribution with a mean of 8 hours. A. b. c. d. e. Show that this process fits the birth death process and give rates calculate pn calculate L, Lq, W, Wq determine the portion of time the maintenance person is busy determine the proportion of time a machine is working Soln: 2/10 0 1 1/8 State 0 1 2 1/10 2 1/8 Balance 2/10P1 = 1/8P0 (1/8+1/10)P1 = 2/10P0 +1/8P2 1/10)P1 = 1/8P2 P1 = 1.6P0 P2 = 1.28P0