Please sign in to access this page
Using Graph Theory and a Genetic Algorithm to compute near-optimal bus routes. Used bus stop locations in Mumbai and real-time traffic data.
Chris Joe .m
Whoops! Looks like they don't have a project yet. Maybe ask them to start one?
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Instead of google maps API used Here API matrix (ran out of google maps credit) to compute traffic times between bus stops. Changed the code for efficiency as to not needing to calculate 700! possibilites. Finally calculated best path (red arrow) and graphed it all on graphistry. For now used a sample of only 100 bus stops (all bus stops coming soon)
Added a cache for the duration and the bus stops (which are pulled from google maps) so an API call doesnt need to be requested repeatedly. Also switched from using Jaal to graphistry as it allows colouring the best path and has a better UI. Finally, broke down the map of mumbai into small chunks to avoid the max requests limit.
Find out that genetic algorithms would work best for this and implemented it to find out closest to optimal path from random combinations of known bus stops
Added all the bus-stops in a radius to the graph and the time it will take to travel between each from google maps.
Used the Places API to find all bus stops in a circle given the centre and the radius and the details of the bus stop like name and location
Used the google distance matrix API to pull the distance and time between 2 locations
Created a directional weighted graph using Jaal and networkx