Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Bus Simulator

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.

Install

Via pip

$ pip install matplotlib.pyplot heapq numpy

Usage

The 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.2

From the Bus Class:

self.capacity = 52

Running the program

To run the program:

$python transit.py

Credits

  • Cyrus Chung
  • Supervising Professor: Kui Wu

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages