Bus simulation in c++

Job ID: 35169384

Budget: $10 – $30 USD

As a minimum, a program must be written in c++ and a report prepared with the specific questions answered, but there is much room for using your creativity—please use it!

Write the bus simulation. Feel free to look on the web for and then re-use any suitable code for the random number generator.

The purpose of the simulation is to observe the behavior of the system, and answer the following questions:

1. Does the distance between the buses keep uniform? If not, what should be done to ensure it is uniform?

2. What is the average size of a waiting queue at each stop (and what are its maximum and minimum)? (You may provide this information on an hourly [simulation time] base.)

3. Plot the positions of buses as a function of time (you will need to generate periodic snapshots of the system for that). Feel free to change parameters; then observe and document the results.

Need to prepare a report, including plots, observations, documentation and especially recommendations for change in the scheduling policies.

Feel free to change the simulation parameters. My initial suggestion is that there are

• 10 bus stops
• 5 buses
• The time to drive between any two contiguous stops is 5 minutes
• The passenger’s mean arrival rate at each stop is 5 persons/min
• The boarding time is 10 seconds for each passenger
• The total simulation time is 8 hours.