Project 0: Introduction to Simulations
- Due Oct 23, 2019 by 10pm
- Points 100
- Submitting a file upload
- File Types cpp
Project Description
Now that you have extended the checkout simulation, you should explore additional changes to the simulator. Your task is to create two versions of the simulation:
- This version has one queue of customers that is served by multiple registers. In this scenario, when a register is open, it will take the next customer from the shared queue; when a customer arrives, it goes to the end of the shared queue. This is essentially what you did for the lab.
- This version has one queue of customers for each register. In this scenario, when a register is open, it will take the next customer from its queue. If the queue is empty, the register will not serve any customers even if another queue has customers waiting. When a customer arrives, it will choose to enter the queue with the least number of customers; if there are two or more queues with that share the least number of customers, randomly pick one of the queues to add the new customer to.
You should be running both of these simulations simultaneously and displaying them on the screen at the same time so they can be compared visually. At the stage where you choose the number of customers to add to the queue(s), you should add the same customers with the same wait times for both simulations so that the only thing you are changing in your simulations are the configurations of the queues.
Additionally, you should change the wait times of the customers so that there is the possibility of a long waiting customer (10 or more minutes).
Your final output should include the total, average, and maximum waiting time for each scenario.
Extra Credit
You can explore more "sophisticated" behavior of customers including:
- changing lines
- leaving early due to waiting in line too long
- dynamically adding/removing registers
- changing the distribution of wait times for customers
- having slow cashiers that take longer than expected
- etc.