Homework 1: Discrete-Event Simulation

Hints, Partial solution, Suggested format of Log File, Directions for mailing homework to Lab Instructor,

Write in C a program to do the discrete-event simulation of a system representing a pediatrician's office. We assume that there is a pediatrician and a nurse and that we have three kinds of patients:

Thus the situation is as described in the following queueing network:


         SWITCH1  ----+       +--+  SWITCH2
 INPUT ---->x----->||||------>|  |---->x---------------------->x-----> OUTPUT
            |     ----+       +--+     |                       ^
            |     QUEUE1     SERVER1   |                       |
            v                (nurse)   v    ----+     +--+     |
            x------------------------->x---->||||---->|  |---->x
                                            ----+     +--+
                                           QUEUE2     SERVER2
                                                   (pediatrician)

where SERVER1 is the nurse and SERVER2 is the pediatrician. QUEUE1 and QUEUE2 are, respectively, waiting rooms for the nurse and for the pediatrician.

The user is asked at run time for:

Determine:

Run the program a number of times with different values for the parameters and random seed. Examine in correspondence the utilizations and queue sizes. If for a given choice of parameters by changing the random seed we obtain utilization and size values that are stable [i.e. do not change much, say, change at most 10%], then we have a good simulation.

This homework is assigned on January 19 and it is due February 10 by 5pm. Be sure to receive a message back from the TA confirming that he has received the homework.

ingargiola@cis.temple.edu