Smart Integrated Mobility Solutions
Project Overview
Motivation
To find the most optimal route for traveling from point A to point B by utilizing various modes of transportation, optimizing for both time and cost.
What Was Done
Setup and Libraries
Installed required libraries (networkx, googlemaps, matplotlib) for graph-based modeling and API integration. Configured APIs for Google Maps and Booking.com (expired keys were used in the document).
User Input Widgets
Created interactive widgets for selecting trip type (One Way or Round Trip), inputting departure and destination locations, choosing departure and return dates, selecting transportation modes (transit, driving, walking), and filtering results by Cheapest, Fastest, or Most Comfortable options.
Data Retrieval
Used Google Maps API to fetch directions, distances, and travel times for various modes of transport, and identify nearby international airports based on geolocation. Integrated Booking.com API to fetch flight details, including prices, departure/arrival times, and layovers.
Cost and Time Calculations
Developed a cost calculator for different transportation modes (driving, transit, etc.). Calculated travel costs and times for each segment of the journey.
Graph Construction
Built a directed graph using networkx to represent travel routes and connections. Nodes represent locations (e.g., origin, destination, airports). Edges represent travel options with attributes like mode, cost, and time.
Pathfinding
Implemented the A* algorithm to find the optimal path between the origin and destination based on cost and time. Visualized the graph and highlighted the A* path.
What was Learned
API Integration Challenges
- Handled expired keys, rate limits, and incomplete data from Google Maps and Booking.com APIs.
Graph Construction & Abstraction
- Built a directed graph to model travel routes using networkx, assigning meaningful weights for time and cost.
Pathfinding with A* Algorithm
- Explored the impact of heuristic selection on A* search performance.
- Learned how to tune pathfinding logic to optimize for speed, and cost-efficiency.
System Architecture & Robustness
- Designed a modular system integrating user inputs, APIs, graph logic, and optimization.
- Implemented robust error handling to support real-time data variability and improve system stability.
What Was Achieved
- Created interactive system for multi-modal routes
- Integrated real-time transportation APIs
- Built graph-based travel model
- Implemented A* pathfinding
- Visualized travel graph and optimal path
![[Image 1 description]](../assets/projects/mobility/mobility.png)
Visualized Nodes and optimal path