Inspiration

It started in a choking Mumbai traffic jam. An engine roared, black smoke curled uphill, and every GPS app on the road called it "optimal." Optimal for speed, maybe. But for the planet? A catastrophe. Standard navigation ignores the physics under the tyres: the slope, the heavy cargo, and the brutal penalty of stop-and-go congestion. What if a routing algorithm actually understood physics? That question became EcoFreight-AI

What it does

EcoFreight-AI is a physics-aware, eco-friendly routing engine designed to reduce carbon emissions for logistics vehicles. Unlike standard navigation apps that optimize solely for speed, EcoFreight-AI calculates the true environmental cost of a journey by combining vehicle specifications, stop-and-go traffic, and road topography.

Using Dijkstra's algorithm+ML with a custom edge-weighting function:

$$w(e) = \alpha \cdot \text{time}(e) + (1-\alpha) \cdot \widehat{\text{CO}_2}(e)$$

It allows drivers to balance travel time against carbon emissions. On a test run from Vile Parle to Bandra in Mumbai, EcoFreight-AI cut emissions by 31% (saving $0.65\text{ kg CO}_2$) for only a 1-minute time penalty.


How we built it

  • Data Fusion: Fused 40,000+ Kaggle vehicle records with OSMnx road graphs and Open-Elevation API data.
  • Feature Engineering: Derived exact slope gradients per road segment:

$$\text{slope} = \frac{\Delta \text{elevation}}{\Delta \text{distance}}$$

  • Machine Learning Model: Trained an XGBoost regressor ($R^2 = 0.9988$) to capture non-linear interactions between vehicle mass, slope, and traffic congestion.
  • Interface: Built an interactive dashboard using Streamlit, Folium, and NetworkX to map and compare fastest vs. greenest routes.

Challenges we ran into

  • Elevation API Limits: Hit strict rate limits when querying 8,000+ road nodes; resolved by implementing request batching, retry logic, and caching.
  • OSMnx API Shift: Handled breaking changes in graph attributes, CRS, and edge formats during the migration to OSMnx v2.
  • Dependency Conflicts: Fixed startup crashes caused by Starlette version mismatches between FastAPI and Streamlit.

Accomplishments that we're proud of

  • Validating Physics: Proved ML models can capture real mechanics where a 15% gradient forces heavy engines to work $3\times$ harder:

$$P_{\text{climb}} = m \cdot g \cdot v \cdot \sin(\theta)$$

  • Impact at Scale: Demonstrated that saving $0.65\text{ kg CO}_2$ per trip avoids ~19.5 tonnes of CO₂ monthly for a 100-truck fleet running 10 daily trips.
  • Graph Alignment: Mapped multi-variable ML model predictions directly onto 17,000+ spatial network edges.

What we learned

  • Model Transparency: Used SHAP analysis to confirm the high $R^2$ score reflected true physical features (engine displacement and cylinders) rather than data leakage.
  • Data Fusion Complexity: Learned that spatial data integration and cross-joining disparate datasets require far more effort than executing pathfinding algorithms.

What's next for EcoFreight AI

  • City-Agnostic Engine: Scaling the pipeline beyond Mumbai to support any global city via bounding-box parameters.
  • B2B Fleet API: Packaging the routing core into a plug-and-play API service for enterprise fleet management systems.

Built With

Share this project:

Updates

Submission history