Project Overview

BUS TRANSIT AI is an intelligent route optimization system designed for Coimbatore's TNSTC (Tamil Nadu State Transport Corporation) city bus network. The system leverages ensemble machine learning models and graph algorithms to provide optimal route predictions and live ETA estimates.

The application processes real transit datasets representing 53+ bus stops and 30+ TNSTC routes to deliver sub-2-second route optimization across the complete Coimbatore city bus network.

System Architecture

1
Data Layer

Coimbatore bus stops & TNSTC routes with GPS coordinates, synthetic traffic data (5000+ samples)

2
ML Engine

Ensemble VotingRegressor: Random Forest (100 trees) + Gradient Boosting (150 trees) trained on 9 features

3
Graph Engine

NetworkX weighted directed graph with dynamic edge weights from ML predictions. Dijkstra & A* pathfinding.

4
Web Application

Flask backend serving interactive Leaflet.js maps, Chart.js analytics, and real-time ETA dashboards.

Machine Learning Model

Model Type Ensemble VotingRegressor
Estimator 1 Random Forest (100 trees, max_depth=12)
Estimator 2 Gradient Boosting (150 trees, lr=0.1)
Features hour, day, weekend, peak, stops, distance, weather, congestion, passenger_load
Target actual_travel_time_minutes
Training Data 5000 synthetic samples based on Coimbatore patterns

Graph Algorithms

Library NetworkX 3.2
Graph Type Weighted Directed Graph (DiGraph)
Fastest Route Dijkstra's Algorithm (min time weight)
Shortest Route Dijkstra's Algorithm (min distance weight)
Least Transfers Direct route detection + Dijkstra fallback
Distance Metric Haversine formula (great-circle distance)

Technology Stack

Backend
Python 3.10+ Flask 3.0 NumPy Pandas
Machine Learning
Scikit-learn 1.3 Random Forest Gradient Boosting Joblib
Graph Algorithms
NetworkX 3.2 Dijkstra A* Search Haversine
Frontend
HTML5 / CSS3 JavaScript ES6 Leaflet.js Chart.js
Data
TNSTC Coimbatore OpenStreetMap GPS Coordinates JSON / CSV

Developer

This project was conceptualized and developed by Rajhavel V S.