Journey Planner Implementation

935 Words2 Pages

Journey Planner Implementation

This document envisages the creation of a computer software application which enables a user to identify the shortest route between two given stations on the London Underground system. The application itself, is to be written in the Ruby scripting language and the schema of the Underground is to be stored on a MySQL database. In order to be effective, the application would provide an implementation of Dijkstra’s shortest path algorithm . An initial prototype of the application would be a console based application i.e. a non-gui style application. This could be further developed into a graphical user interface (gui) application or possibly even a web-based application. The application should also provide administrative options to backup and restore the database, and make use of MySQL scripts to create and populate the database schema.

Rationale behind software choices

Ruby was selected as the main scripting language because the problem space maps well to real life objects and Ruby is highly object oriented. A solution to the shortest path algorithm will spend its time scanning ‘Nodes’ in our case Tube line stations, and ‘Edges’ a connection between two adjacent stations. Ruby should make easy work of applying Dijkstra’s algorithm to generate code. MySQL was selected as the target database because MySQL is open source, readily available and works well in tandem with Ruby.

Environment and Project Design

The project would be created on the Linux distribution Ubuntu and should make use of modern design practises such as entity relationship diagram modelling for the database schema. The application itself should be object oriented and be designed with the aid of The Unified Modelling La...

... middle of paper ...

... of adjacent nodes (stations) is connected both ways. Does the application still work correctly? Now include more stations/lines and test again.

Next, decide on a database design which can load the nodes and edges. Modify the Ruby code to dynamically populate the Nodes and Edge objects from the database. Once again, test thoroughly. At this stage, the core ‘engine’ of the application is now in place. Modify the code so that it becomes parameterised and will accept source and target station names generating suitable journeys. Develop MySQL scripts to insert all lines and stations of the London Underground system. How well does the application scale? Finally, wrap up the application as a menu driven program which prompts the users for pairs of stations against which to calculate the shortest path and provide administration options to backup and restore the database.

Open Document