Source Code and Compiled Executable
This was a C++ console project written for my Simulation Design class. The idea is to simulate an elevator system, with a variable number of elevators.
The simulation runs through an office work day, starting at 7:30 am and ending at 5:30 pm. 400 Employees come in at random times between 7:30 and 8, leave for lunch and leave at the end of the day. Between 8 and 5, customers also randomly come in. Elevators hold up to 8 people and move when full. The idea was to determine how many elevators was an ideal number to support this sort of load within a certain amount of time. I find it interesting to watch the states of the elevators change as the fill, move floors and return to the lobby.
This project involved implementing quite a few things; a logging class, Factory and Manager classes, inheritance (Customer and Employee classes inherit from Actor, ElevatorCar and Floor classes inherit from Location), state machines, and precision timing (using Windows functions to get the CPU count).
Recent Comments