Marking Guide for A3 -------------------- Note: The notation "T -8" means all three T1 tests and the T2 test failed (worth two marks each). These 8 marks are deducted from the sum of your other marks. These deductions could have been included in a particular category listed on the marking sheet, but no single category seemed appropriate, so we listed them separately. R1 Event Generation Method R1a -2 Incorrect exponential Distribution function R1b -3 generate floor with equal probability, regardless of floor the person is in. R1c -1 Probability of choosing ground floor is not implemented as 0.5 R1d -3 Incorrect floor generation method R1e -2 No description of floor chosen method in the report R2 Elevator Algorithm Method R2a -5 No idle implemented in the algorithm R2b -1 Poor performance on high rise building R2c -1 Poor performance when people arrive frequently R2d -1 Poor performance when people not arrive frequently R2e -10 No description in the report about the algorithm Here, poor performance is defined as being the result from test run is even slower than the original algorithm. Note: if there is nothing wrong in R2, students will get 15/20, the extra 5 mark is for the efficiency and novelity of the algorithm. R3 Statistic Discussion Marks are assigned by the following criteria 0-4 No discussion of the statistic, or poor testing cases. 5-7 Some discussion of the statistics, with no explanation of the relationship between the result of the test run and the modification of the elevator algorithm. 8-10 Thorough discussion, with detail explanation of the increase (or decrease) of efficiency after the new elevator algorithm by using evidence from the extra statistics. A1 Random Event Generation A1a -2 Incorrect exponential Distribution Function A1b -1 return destination floor that is the floor the person is currently on A1c -1 Poor algorithm in choosing the floor number. Although the A1d -3 Incoorect floor generating algorithm A1e -5 Missing Disscussion A1f -1 regenerate a random number to pass to the statistic.C for calculating the mean A2 Arrival and destination statistics A2a -3 Incorrect or no mean generated note: some student attempt to do this, if person A appears in floor 1, person B is the next person that appears after person A in floor 2, you calculate person B's interarrival time by the following arrival time of person A - arrival time of person B and add the result into your statistics for calculating the mean. This is wrong since you can only do this if person A and B are on the same floor. Their next arrival time is some exponential distribution arrival time given the same floor. A2c -3 Incorrect or no statistics on fraction of floor chosen A2b -2 Bad data structure eg each time the mean arrival time generated in floor.C where mean_arr_time = -log(drand48())*mean_arrival_time, this should be stored to the statistic instead of using current_time or appearance_time for calculating the final mean_arrival_time A2c -1 mean variable not stored in statistics.h A2d -1 floor array not stored in statistics.h A2e -1 incorrect floor chosen A2f -5 Missing statistics A2g -1 generate another random number -log(drand48()))*mean_arrival_time for the statistic calculation A3 Additional Statistics A3a -2 Poor Data structure eg. use array to hold data for each person to calculate variance eg. waiting time can be stored with person, instead of using an array/linked list to hold the data. This is marked 4/5, the extra 1 mark is again for the novelity of the additional statistic. A3b -2 Incorrect Variance formula A3c -3 Choice of statistic is bad. The information gained from the extra statistics is of no interesting value A3d -1 Insufficient additional statistics. At least two additional statistics should be implemented A3d -5 Missing additional statistic B1 Elevator Algorithm B1a -5 Algorithm is basically not doing what is described with the report, or contains syntax errors(bugs) that affects the algorithm. B1b -3 When a elevator is scheduled and have picked up a person, say from floor 1 and is moving towards the floor 5. It is not possible to schedule another person anywhere between floor 1 to floor 5. The event is already put into the event queue. If for instance a person on floor 3 arrive and student set destination[e][3] = 1 and assume that the elevator will pick up this person on its way, it is wrong. Elevator have to arrive floor 5 first, then reverse its direction to serve this person. B1c -3 Person will get stuck in the elevator. Assume there are persons inside the elevator set destination[e][f] = 0 in update_destination or request_elevator will make this person stuck in the elevator if the person is heading for floor f if its destination if f. B1d -2 Access information not allowed eg. examine person linked list in elevator B1e -2 Misleading comments, algorithm is NOT doing what the comments say B1f -2 Features described in the report, but NOT implemented in the algorithm B1g -2 misuse of assignment operater (=) with comparison operator (==) in statement note. Quite a few student use the equal sign for comparing value eg. if (direction[e] = IDLE)..... this actually ASSIGN the variable a value. B1h -4 Only assign elevator to the destination where a person wants to go, but not assign the source for this elevator to pick up that person. B1i -3 Elevator is assigned to go to that floor. ie. set next_f = f, but the destination array not updated correspondingly in update_destination. Or destination array is assigned the direction regardless of position of next_f. B1j -5 Didn't assign any destination for the elevator. Elevator will keep idling.... B1k -2 Elevator just search in one direction and assign idle, neglecting the request in other direction. B1l -3 Implementing fancy algorithm for choosing the "closest" elevator from the request, but just go through the prof's original code to update destinations, so the new algorithm has NO EFFECTS whatsoever. B1m -2 Assign elevator to stop at each floor. This is NOT a clever scheduling algorithm. B1n -2 Elevator is assigned that results in a sudden change in direction, regardless of the direction that the current elevator is moving. Elevator will probably "jump" in graphics mode. Test Run/ Compilation Considerations T1 -2 each There are 3 test runs on the program, with -2 for each failure. The test runs are shown on the web page. T2 -2 Program cannot compile or (Segmentation Fault) Note: The notation "T -8" means all three T1 tests and the T2 test failed (8 marks).