A Python program that simulates an urban bus route and computes the run-time based on determined trip parameters. Please download the attached report to read the purpose of the simulator.
Via pip
$ pip install matplotlib.pyplot heapq numpyThe values in main are configured to run a simulation of Coast Mountain Bus Company's 16 route. See more information about the bus here.
The following values can be modified and are configured for the 16:
From the main function:
numberOfStops = 77
frequency = 7
time_between_buses = random.expovariate(1./frequency)
delay_time = 0.1
numberOfBuses = round(60 / frequency)
time_bw_stops = 0.2From the Bus Class:
self.capacity = 52To run the program:
$python transit.py- Cyrus Chung
- Supervising Professor: Kui Wu
The MIT License (MIT). Please see License File for more information.