'' This is a process-oriented Simscript model of a M/M/1 queue '' (The code can be copied from the file: /home/courses/cse529/SIMSCRIPT_code/mm1_process.sim ) '' It will stop when the number of customers specified in variable '' num.delays has passed through the queue preamble normally, mode is undefined processes include generator and customer resources include mm1 accumulate util.server as the average of n.x.mm1 accumulate ave.queue.length as the average of n.q.mm1 accumulate max.queue.length as the maximum of n.q.mm1 tally avg.queue.time as the average of wait.time define num.done, num.delays as integer variables define wait.time as a double variable end ''=========================================================================== main print 1 line thus input Number of Delays required read num.delays num.done = 0 create every mm1(1) u.mm1 = 1 activate a generator in exponential.f(1.0,1) units start simulation end ''=========================================================================== process generator define i as an integer variable i = 0 while ( i = 0 ) do activate a customer now wait exponential.f(1.0,1) units loop end ''=========================================================================== process customer define arriv.time as a double variable arriv.time = time.v request 1 unit of mm1 add 1 to num.done wait.time = time.v - arriv.time if ( num.done >= num.delays ) call report else work exponential.f(0.5,2) units relinquish 1 unit of mm1 always end ''=========================================================================== routine report print 6 lines with time.v, util.server, ave.queue.length, max.queue.length and avg.queue.time thus clock time = *******.** minutes the utilization of the server was **.**** the average length of the queue was ***.** the maximum length of the queue was **** the average time in the system was ****.** minutes print 3 lines thus +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ '' The following line is just to stall Windows NT Simscript so that results can '' be examined. Uncomment the line when using the Windows version of Simscript. '' read num.delays stop end