Students arrive at random over the lunch hour and join one of the food lines. Each line is a std::queue: students join at the back, and the student at the front is served for a few seconds and then leaves. This page runs the same one-second loop as PeirceSimulation.cpp, plus the three activity extensions: named food lines, random service times, and line switching.
| Food type STEP 1 | Popularity | Min service (s) STEP 2 | Max service (s) | Load |
|---|
| Line | Arrived | Served | Avg wait | Longest | Still in line |
|---|
As in the C++ program, the average wait counts only students who were served, from joining the line to reaching the front. Students still in line at the end are not included, so a line that is falling behind looks better than it is.