CSC270 Assignment #3 - Marking Guide

Tasso Karkanis

A detailed breakdown of the marks was returned with your assignment.  Refer to this breakdown when reading these additional comments.  You can also see the output of the automated marking script.

R.1

For this part you should have at leasted stated the exponential distribution formula, and clearly stated that the mean is available in the means array of the Station class.

R.2

We expected a sample calculation for the "computations by hand", and the numbers for all the stations.   To get both marks, you should have mentioned that the system will be overwhelmed in one of three cases:  too many trains, too high a rate of passenger arrivals, or too many accidents.  For the rest of the discussion, we wanted some general comments about the output of the different runs you performed, and a few words about how close your program's calculated statistics were to the expected ones.

R.3

Full marks were given for a concise but detailed description of your accident implementation.  You should have mentioned how the first accident is scheduled, and exactly what happens when an accident is handled.

B.1

Self-explanatory.

B.2

The referenced solution used two subclasses of Event to implement accident events.  Some people only used one, but full marks were given if the implementation was correct.  We expected you not to duplicate the code to schedule an accident, so you should have called a function in main() to schedule the first accident, and reused this function when scheduling subsequent accidents.  This function should have been implemented in events.C.

Style

I have written up a short document in about C++ style.  This is my opinion, but will hopefully be useful to you.
 

Marking Codes

The following codes for common errors were used while marking the assignment.
 
 
Code Marks Deducted Explanation
V1 3 Variables for calculating statistics declared in wrong place.
A1 3 Next accident scheduled when first is over.
A2 1 Has drand48()*(allPlatforms.size()-1)
or drand48()*(allPlatforms.size()+1) to compute uniform distribution.
A4 2 Loops until unoccupied platform found.  This is wrong because it could loop forever.
A5 3 Schedules EndAccident without being sure that Accident will happen.
A6 1 Makes three accident events.
SM1 4 Computes interval when passenger is scheduled.
SM2 4 Error in sum of interarrival times.
SI1 2 Array not initialized in Statistics.
SC1 2 Statistics gathered even when passenger not scheduled.
PA1 2 Error in formula for passenger scheduling.
V1 3 Variables for statistics in Station class.
PP1 2 Changed private members from other classes to public.
H1 1 Calculation by hand used simulation time.
 
 

Specific Comments about Your Code