Application is based on MPK Kraków database to display timetables for a given line and find direct or shortest public transport connections between two stops with score(sum of intermediate bus stops and penalty for each changing the bus/tram).
Database does not include any data on the times of departure of buses / trams from the stops, therefore the selection of the shortest route is based on the number of stops between two points, instead of driving time. To make the application more realistic (despite database limitations) I introduced a 'penalty' for each changing the bus/tram to simulate the waiting on the stop.
- Python 3 (Tkinter)
- SQLite3
$ pip install -r requirements.txt
$ python GUI.py
$ python szukaj.py
To find direct connection application uses only a few database queries for the start and end bus/tram stops that user have entered
At the beginning of the program, a graph of available connections between two stops is generated (only once when application is started). Possible connections between two closest stops are edges of the graph. Then BFS algorithm finds the shortest routes between the entered stops
Using database queries application finds alle the intermediate stops on the bus line and display them on the screen