{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Customer it then either begins serving the customer

Info icon This preview shows pages 124–127. Sign up to view the full content.

View Full Document Right Arrow Icon
customer, it then either begins serving the customer that had been waiting the longest if there are any waiting customers, it remains free until the next customer arrival. The amount of time it takes to service a customer is a random variable having probability distribution G. There is a fixed time T after which no additional arrivals are to enter the system, although the server is free at time T. Define variables and events to analyze this model and give the suitable procedures. (20 marks) solution (Single Sever Queuing System) Time variables t Counter variables N A : the number of arrivals ( by time t) N D : the number of departures ( by time t) System State Variable n: the number of customer in the system ( at time t) EL = t A , t D , where t A is the time of the next arrival ( after t ) and t D is the service completion time of the customer presently being served. Initialize Set t = N A = N D = 0. Set SS = 0. Generate T 0 and set t A = T 0 , t D = 0. T= time variable, SS=n, EL= t A , t D = . Case 1: t A t D , t A T Reset: t = t A . Reset: N A = N A +1. Reset: n = n+1. Generate T t and reset t A = T t . If n=1, generate y and reset t D = t + Y. Collect output data A(N A ) = t. Case 2: t D t A, t D T Reset: t = t D . Reset: n = n-1. Reset: N D = N D +1.. If n=0, reset t D = , otherwise, generate Y and reset t D = t + Y. Collect output data D(N D ) = t. Case 3: min(t A , t D ) > T, n > 0 Reset: t = t D . Reset: n = n-1. Reset: N D = N D +1.. If n > 0, generate Y and reset t D = t + Y.
Image of page 124

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Collect output data D(N D ) = t. Case 4: min(t A , t D ) > T, n = 0 Collect output data T P = max (t-T, 0). 2. Draw the flow diagram for simulating the single server Queue. (10 marks) Simulating the single server Queue 3. Consider a two-server system in which customers arrive in accordance with a non homogeneous Poisson process, and suppose that each arrival must first be served by server 1 and upon completion of service at 1, customer goes over to server 2. If server 1 is free, customer can enter service at server 1 or join the queue of server 1. After completion t ,n tA,tD t = tA n = n+1 NA=NA+1 A (NA) = t Generate Tt tA = Tt Generate Y tD = Y Go to Left box Generate Y tD = Y tD = D (ND) = t t = tD n = n-1 ND=ND+1 TP = max (t-T, 0) Stop t = tD n = n-1 ND=ND+1 D (ND) = 1 Generate Y tD = Y tA tD, tA T tD tA, tD T tA>T, tD>T n =0 n =0 n >0 n >0 n =0 n =1 n 1 n >0 Collect output data TP= max (t-T, 0) Left Box
Image of page 125
services at server1, it can enter server 2 if server 2is free. The service time at server i have distribution G , i=1,2. Define variables and event lists to analyze this model and give the procedure for this system. (20 marks) solution (Tow Severs in Series) Time variables t System State Variables (n 1 , n 2 ) n 1 = the number of customers at server 1 n 2 = the number of customers at server 2 Counter variables N A : the number of arrivals ( by time t) N D : the number of departures ( by time t) Output variables A 1 (n) = the arrival time of customer n at sever 1, n 1.
Image of page 126

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 127
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}