Single-Channel Queue Simulation

The number of columns in the table 9:

  1. Customer No.
  2. Interarrival Time (Min)
  3. Arrival Time (Clock)
  4. Service Time (Min)
  5. Service Begin (Clock)
  6. Service End (Clock)
  7. Waiting Time in Queue (Min)
  8. Time Customer in System (Min)
  9. Idle Time of Server (Min)

Equations

\[ \text{arrival-time} [i] = \text{arrival-time} [i-1] + \text{interarrival-time} [i] \]

\[ \text{service-begin}[i] = \max(\text{service-end}[i-1], \text{arrival-time}[i] ) \]

\[ \text{service-end}[i] = \text{service-begin}[i] + \text{service-time}[i] \]

\[ \text{waiting-time-in-queue}[i] = \text{service-begin}[i] - \text{arrival-time}[i] \]

\[ \text{time-customer-in-system}[i] = \text{service-end}[i] - \text{arrival-time}[i] \]

\[ \text{idle-time-of-server}[i] = \text{service-begin}[i] - \text{service-end}[i-1] \]

Performance Measures

\[ \text{Average Waiting Time} = \frac{\text{Total Time Customer Waits in Queue}}{\text{Total Number of Customers}} \]

\[ \text{Probability a Customer Waits in Queue} = \frac{\text{Number of Customers who Wait}}{\text{Total Number of Customers}} \]

\[ \text{Proportion of Server Idle Time} = \frac{\text{number of time units server idle}}{\text{total time units of simulation}} = \frac{\text{Sum Server Idle Time}}{\text{Max Service End}} \]

\[ \text{Average Service Time} = \frac{\text{Total Service Time}}{\text{Number of Customers Serviced}} \]

\[ \text{Average Time Between Arrivals} = \text{Average Interarrival Time} = \frac{\text{Total Interarrival Time}}{\text{Number of Customers Serviced} - 1} \]

\[ \text{Average Waiting Time for Those Who Wait} = \frac{\text{Sum Waiting Time}}{\text{Number of Customers who Wait}} \]

\[ \text{Average Time Customer Spends in System} = \frac{\text{Total Time Customer Spends in System}}{\text{Total Number of Customers}} \]