CoolFace
Apppublic

ChowdriFurkhan07/autonomous-route-optimization-engine

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

๐Ÿšš Autonomous Fleet Route Optimizer (Bengaluru VRP)

A Streamlit-based Vehicle Routing Problem (VRP) optimizer built using a custom Genetic Algorithm.

Designed for Bengaluru urban logistics simulation.


๐Ÿš€ Features

  • โ€”Multi-vehicle routing
  • โ€”Vehicle capacity constraints
  • โ€”Traffic simulation (peak hour multiplier)
  • โ€”Genetic Algorithm optimization
  • โ€”GA convergence tracking
  • โ€”Route comparison vs random solution
  • โ€”Interactive Bengaluru map (Folium)
  • โ€”CSV route export
  • โ€”Docker deployment ready
  • โ€”Hugging Face Spaces compatible

๐Ÿง  Problem Solved

This app solves a real-world Vehicle Routing Problem (VRP) where:

  • โ€”Vehicles start and end at a depot
  • โ€”Each customer has demand
  • โ€”Vehicles have capacity constraints
  • โ€”Goal is to minimize total travel distance

Distance is calculated using Haversine formula.


๐Ÿ“‚ Project Structure

. โ”œโ”€โ”€ app.py โ”œโ”€โ”€ requirements.txt โ”œโ”€โ”€ Dockerfile โ”œโ”€โ”€ README.md โ”œโ”€โ”€ data/ โ”‚ โ””โ”€โ”€ rawlocations.csv โ””โ”€โ”€ src/ โ”œโ”€โ”€ dataloader.py โ”œโ”€โ”€ optimizer.py โ”œโ”€โ”€ constraints.py โ””โ”€โ”€ vrp_service.py


๐Ÿณ Docker Deployment (Local)

Build image:

bash
docker build -t vrp-app .

Run container:

docker run -p 7860:7860 vrp-app

Open in browser:

http://localhost:7860
## ๐Ÿค— Hugging Face Deployment

Runtime: Docker

Exposed Port: 7860

Dockerfile included

No extra config required

โš™ Configuration Options (Sidebar)

Number of Stops

Traffic Hour

Number of Vehicles

Vehicle Capacity

Peak traffic multiplier:

8โ€“11 AM

5โ€“8 PM

๐Ÿ“Š Output

Optimized Distance

Random Distance Comparison

Vehicle Routes

GA Convergence Graph

Interactive Map

Downloadable CSV

๐Ÿ›  Tech Stack

Python

Streamlit

Genetic Algorithm (Custom)

Folium

NumPy

Pandas

Docker

๐Ÿ“Œ Future Improvements

Real road routing API (OpenRouteService / Google)

Time window constraints

Live traffic integration

Cloud database support

Multi-depot VRP

Production REST API version

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Chowdri Furkhan
AI/ML & Data Science Enthusiast
Bengaluru, India