Skip to content

A Python program that takes bus route source and destination details then generates a .PNG file which visualizes city nodes and highlights the cheapest route. This was a solo etude for COSC326 as a solution for a given problem. This can be used for general purposes to visualize a shortest path between given nodes (not just bus routes).

Notifications You must be signed in to change notification settings

hugonzb/Drawing-Bus-Routes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Clone the repository: https://github.com/hugonzb/Drawing-Bus-Routes.git

Compile and run in a Unix terminal (input file as an argument): python3 DrawingBusRoutes.py example.txt

Use a .txt file that contains input which follows the same format as the test cases below. Feel free to simply copy and paste these test cases to use in your input file.

Example Test cases:

Christchurch, Dunedin
Christchurch, Rolleston, 5.5
Rolleston, Temuka, 15
Temuka, Timaru, 16.5
Timaru, Oamaru, 27
Oamaru, Palmerston, 21.5
Palmerston, Dunedin, 23
Christchurch, Palmerston, 85.5

Dunedin, Wanaka
Christchurch, Rolleston, 5.5
Rolleston, Temuka, 19
Temuka, Timaru, 10.5
Wanaka, Rolleston, 50
Dunedin, Rolleston, 20
Dunedin, Wanaka, 10

Timaru, Rolleston
Timaru, Christchurch, 10
Christchurch, Temuka, 15
Temuka, Timaru, 16.5
Temuka, Rolleston, 50
Dunedin, Rolleston, 20
Rolleston, Wanaka, 40

CityOne, CityFour
CityOne, CityThree, 70
CityThree, CityTwo, 10
CityTwo, CityFour, 5
CiyFour, CityFive, 7
CityFive, CitySix, 14
CitySix, CitySeven, 20

About

A Python program that takes bus route source and destination details then generates a .PNG file which visualizes city nodes and highlights the cheapest route. This was a solo etude for COSC326 as a solution for a given problem. This can be used for general purposes to visualize a shortest path between given nodes (not just bus routes).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages