This is a G/G/1 queue simulation I wrote for a simulation class. The purpose of the exercise is to show how the choice of or assumptions about input distributions may significantly influence the metric in question. In our particular case that metric is long-run mean queue length, L
, and the input distribution is the distribution of inter-arrival times.
I had learned basic python the week before this assignment and so took the exercise as an opportunity to further familiarize myself with python and object oriented python. Note too that we were not allowed to use any high level packages or routines in this assignment, e.g., no numpy, no scipy, and we had to generate our own random variables.
The simulation driver is simDriver.py
.
####Simulation Details
- We are trying to estimate the average queue length,
L
, for five different G/G/1 queues. - For all five queues the service times are generated by the sum of two independent uniform random variables (this distribution looks like a triangle).
- The five inter-arrival distributions for the queues are as follows:
- Exponential
- Weibull – two instances: one for each of two parameter settings
- Auto-correlated normal random variables – two instances: one with positive and one with negative correlation
- The parameters are calibrated so that all five inter-arrival distributions have the same mean. Even so, – and demonstrating this is the point of the exercise – the differences in the shape of these distributions or their non-independence leads to very different estimates of
L
. That is, our metric of interest is sensitive to the choice of input distribution, so one ought to choose wisely. - The formal model behind this simulation is a "generalized semi-markov process" (GSMP) which is a stochastic process description of a discrete event system.