Details of this Paper

STA 4821 Homework 6




Question;40 PointsThe following BASIC code simulates the single-server queue with FIFO service. It generates the interarrivaltimes and the service times for 100,000 customers, and it produces estimates of the server utilization, thefraction of customers who must wait in the queue, and the average waiting time.100110120130140150160170180190200FOR i = 1 TO 100000IA =(generate interarrival time)T = T + IAW = W + X IAIF W 0 THEN c = c + 1SW = SW + WX =(generate service time)SX = SX + XNEXT iPRINT SX/T, c/100000, SW/100000Adapt the program and run it (using the language of your choice) for four different service-timedistributions:(1) exponential service times, with mean service time E(X) = 0.5(2) constant service time, X = 0.5(3) X ~ U(0,1)(4) P(X=1/3) = 0.9, P(X=2)= 0.1Assume that the interarrival times are exponentially distributed with mean value 0.625 (that is, Poissonarrivals with rate = 1.6). Fill in the table. For case (1), draw the graph of the theoretical distributionfunction of waiting times, Fw(t), and, on the same axes plot the simulation estimates at the values of t as tgoes from 1 to 12 in increments of 1, and fill in the corresponding table.Theory for the M/G/1 queue: If is the arrival rate and X is the service time, then the server utilization isgiven by= E(X) if E (X) 0) =,and the mean waiting time is given by the famous Pollaczek-Khintchine formula,E (W) =E(X)V (X)1 + 2E (X).12In addition, if the service times are exponentially distributed, and the service is FIFO, then0tFw(t) =(1)E(X)1 e(t 0)theorysimulationP(W > 0.5)theorysimulation12NA3NA4NAFw(t)t-10123456789101112theorysimulationtheoryE(W)simulation


Paper#61411 | Written in 18-Jul-2015

Price : $26