Page 127 - DCAP601_SIMULATION_AND_MODELING
P. 127

Unit 8: Simulation of Queuing System (II)



                                                                                                  Notes








                 Note that a  = a  + r  and so (by induction)
                          i  i–1  i
                 a  = r  + r  + ... + r  i = 1, 2, 3, ...
                  i  1  2     i
            2.   Given the arrival times and service times, can the delay times be computed?

            3.   For some queue disciplines, this question is difficult to answer
            4.   If the queue discipline is FIFO,
                 a.  d  is determined by when a  occurs relative to c .
                       i                   i               i–1
            Cases

            If a  < c , job i arrives before job i–1 completes:
              i   i–1













            If a  < c , job i arrives after job i –1 completes:
              i   i–1













            Calculating Delay for Each Job

            Algorithm 1.2.1

            c  = 0.0; /* assumes that a  = 0.0 */
             0                          0
            i = 0;
            While (more jobs to process)
             {
             i++;
             a  = GetArrival();
              i




                                             LOVELY PROFESSIONAL UNIVERSITY                                  121
   122   123   124   125   126   127   128   129   130   131   132