ECE 673/CA770A: Simulation Exercise 1

Due: February 23, 2006 [9 days after Lecture 5]

For each of the following problems, hand in a copy of your fully documented code, together with a brief writeup listing the various functions/subroutines and what each of them does. You will have to pick a suitable random number generator. In Question 1, find the 95% confidence interval associated with your results.


(1) Simulate the following queueing system. You have n servers, being fed from the same queue. Jobs arrive according to a Poisson process, with rate A. Service times are exponentially distributed, with mean S. The service discipline is First Come First Served. Write a simulation for this structure. Set A = 1, and find the mean time spent by a job in the queue as well as the server utilization for each of the following values: S = 0.7, n=1; S = 1, n=2; S = 1, n=3; S = 1, n=4. Each case should be run for at least 3,000 time units.

(2) Repeat the above exercise with the following changes. You have a non-homogeneous Poisson arrival process. The arrival rate is 0.1 jobs per second between midnight and 7 am; 0.3 between 7 am and 9 am; 1.0 between 9 am and 5 pm; and 0.2 between 5 pm and midnight. Simulate arrivals over a total of 2 days.

(3) Consider a single-server queueing system with job priorities. There are three job classes in all: High (H), Medium (M), and Low (L). Whenever a higher-priority job arrives, the job currently in service is preempted. Within each priority class, the service discipline is First Come First Served.

The queuing capacity is limited: the system will start rejecting arrivals if it has more than 10 jobs waiting. Assume that the arrival process of each job class is Poisson with rate 1 job per second and that the service time of each class is exponentially distributed with mean 0.3 (i.e., the service parameter=1/0.3). Run this simulation for 5,000 seconds and determine the mean and variance of the time spent by each job class in the queue, together with the server utilization. Find the fraction of jobs of each job class which were rejected.