Consider the M/D/1/n queue (finite waiting room, that is, a buffer with n waiting positions). Write a simulation program for this model, and compare the simulation results with the predictions of queueing theory.
Specifically, let W(n) denote the average waiting time (in units of average service time) for those customers who receive service (that is, those customers who do not overflow the buffer) when the capacity of the buffer is n; and fill in the tables. In the first case, take a = 0.8 erlangs; in the second case, take a = 1.2 erlangs. Show the simulation code and output. Explain all theoretical calculations.