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
The document does not explicitly mention lessons learned. Could you provide insights into:
- Challenges faced during API integration or graph construction?
- Key takeaways from optimizing routes using the A* algorithm?
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