Archive

Posts Tagged ‘algorithm’

Mobile Friendly Metro Bus Trip Planner

June 23rd, 2008

Lately I have been working on developing a metro bus trip planner website which is mobile friendly for Indian Cities. Main goal of this website was to make it mobile friendly.

But soon realized that its pretty challenging especially because of lack of structured data like timetables, schedules, route information available readily as a service. I thought of scrapping the corresponding sites but was still lacking the useful data. However I stuck to my plan and wanted to make use of whatever data I could get. I am just finished with extracting data for Mumbai from here. The information I was able to extract was bus route numbers, station names, route information, fare information for a particular bus between any two stations and distance. There is no accurate way to get bus departure and arrival times from this information. And the data which can be scrapped is limited only to landmarks and does not have all the bus stops. So for now I just wanted to support time independent paths and change overs. I know that this might not be of much use but wanted to prove it instead of guessing it. Lets see whats the outcome is.

So from this project I wanted to see if I can extract some kind of framework for trip planning websites (public transport). I see a major need for this as many people are starting to opt for public transport.

In this process I refreshed some of the graph algorithms (Dijkstra’s, Floyd-Warshall, Strongly Connected, A*, etc). I also stumbled upon some of the research papers on Public Transportation and some existing solutions. So far no road blocks other than lack of data.

For now I am running O(n^3) Floyd-Warshall algorithm to determine All Pairs Shortest Paths. But I am sure I can make lot of optimizations because of the kind of structure. Will dig into this soon and post my findings.

Update: I finished generating all the shortest and cheapest routes between any two landmarks. This process need not be done in real-time based on user input as the routes are same every day and change less often. Now I am collecting data about local trains and need to run the above algorithm again to combine train routes with bus routes. Any suggestions on this are welcome.

rails ,