Bank Simulation

The Bank Simulation program explores the use of Queues to accomplish the real-world task of simulating the average wait time for people going to a bank. The scenario includes 4 lines where arriving customers either get service immediately if they are at the front of the line or wait in line until it is their turn. Customers choose their line based on the size of the queue compared to the other lines. If the queues are of equal size, line 1 will be chosen. Service times are randomly generated between 1 – 30 minutes and each customer arrives between 1 – 5 minutes of each other. A visual representation (stop-motion-picture) is provided. The bank runs for 480 “minutes” or 8-hours. At the end, the number of customers and the average wait time is displayed to the user. Each arrival and departure is event driven stored in a linked-list. This linked list is similar to a priority queue. Through each loop, one event is chosen by comparing its start time to the current time, executed appropriated, and then removed from the linked-list. At the end of the day, any customers that made it in one of the four queues on time will be service accordingly.

Git Repository