Skip to content

kulharshit21/aether-traffic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AetherTraffic: Physics-Informed AI for Proactive Parking Enforcement & Congestion Recovery

Flipkart Gridlock 2.0 Β· Problem Statement 1 Β· Technical Research Submission


Abstract

Urban arterial congestion is frequently exacerbated by unstructured, localized parking violations that act as dynamic micro-bottlenecks. Traditional enforcement mechanisms remain patrol-based, reactive, and lack the geospatial intelligence required to prioritize intervention based on actual network impact. This repository presents AetherTraffic, an end-to-end physics-informed machine learning framework designed to detect illegal parking hotspots, quantify their shockwave impact on traffic flow, and optimize resource deployment. By processing 298,277 anonymized police violation records, the proposed system employs HDBSCAN spatial clustering, Lighthill-Whitham-Richards (LWR) shockwave theory, XGBoost temporal forecasting, and 0-1 Knapsack optimization to deliver a provably optimal proactive enforcement strategy.


Operational Challenge & Problem Formulation

The Problem

On-street illegal parking and spillover parking near commercial areas, metro stations, and events severely choke carriageways and intersections.

Current Limitations

  1. Reactive Enforcement: Existing methodologies rely on patrol-based, retrospective ticketing rather than proactive congestion prevention.
  2. Impact Blindness: Absence of a correlative heatmap mapping parking violations directly to their corresponding congestion impact (capacity loss and queue propagation).
  3. Suboptimal Resource Allocation: Difficulty in prioritizing enforcement zones due to a lack of quantified impact metrics, leading to inefficient deployment of limited municipal resources (e.g., tow trucks).

Research Objective

How can AI-driven parking intelligence detect illegal parking hotspots and quantify their impact on traffic flow to enable targeted, optimized enforcement?


System Architecture & Methodology

Our solution bridges unsupervised machine learning, traffic flow theory, and combinatorial optimization through a robust four-stage pipeline.

System Design & Data Flow

flowchart LR
    classDef in fill:#e1f5fe,stroke:#0288d1,stroke-width:2px,color:#000
    classDef alg fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#000
    classDef out fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#000

    A[Raw Data]:::in -->|Phase 1| B{HDBSCAN}:::alg
    B --> C[312 Hotspots]:::out
    
    C -->|Phase 2| D{LWR Physics}:::alg
    D --> E[Capacity Loss %]:::out
    
    E -->|Phase 3| F{XGBoost Regressor}:::alg
    F --> G[Risk Forecasts]:::out
    
    G -->|Phase 4| H{Knapsack Optimizer}:::alg
    H --> I[Optimal Dispatch]:::out
    
    I -->|Output| J[Command Center UI]:::in
Loading

1. Spatial Clustering (Hotspot Detection)

Instead of relying on arbitrary municipal polygons, the system applies HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise) to raw, noisy GPS coordinates of traffic violations. This extracts discrete, high-density enforcement zones (bottlenecks) based purely on empirical spatial behavior.

2. Physics-Informed Impact Quantification

We map clustered violation densities to physical traffic disruption using established fluid-dynamics traffic models:

  • Greenshields Fundamental Diagram: Estimates the reduction in free-flow velocity and density due to the physical presence of parked vehicles.
  • LWR Shockwave Theory: Translates the localized capacity bottleneck into an upstream queue length and calculates the percentage of lane capacity lost.

3. Predictive Risk Forecasting

To transition from reactive to proactive enforcement, an XGBoost Regressor is trained on temporal features (hour, day of week, lagged violation frequencies) to predict the future risk severity of each spatial cluster over 1-hour, 2-hour, and 3-hour horizons.

4. Prescriptive Resource Allocation

The enforcement problem is modeled as a constrained optimization task. We employ a 0-1 Knapsack Algorithm to maximize the total network capacity recovered, subject to the travel time and operational constraints of a finite fleet of tow trucks operating within a standard shift duration.


Repository Structure

.
β”œβ”€β”€ README.md                                          <- Project documentation and architecture
β”‚
β”œβ”€β”€ code/                                              <- Core system implementation
β”‚   β”œβ”€β”€ Flipkart_Gridlock_2.0_PS1_Final_Solution.ipynb <- End-to-end pipeline (ML, Physics, Optimization)
β”‚   β”œβ”€β”€ proactive_dispatch_engine.py                   <- Modular dispatch and scoring logic
β”‚   β”œβ”€β”€ run_validation.py                              <- Automated test and validation suite
β”‚   └── output/                                        <- Generated pipeline artifacts (CSV)
β”‚       β”œβ”€β”€ enforcement_priority_ranking.csv
β”‚       β”œβ”€β”€ physics_scored_zones.csv
β”‚       β”œβ”€β”€ dispatch_schedule.csv
β”‚       └── shift_forecast.csv
β”‚
β”œβ”€β”€ data/                                              <- Input datasets
β”‚   └── jan_to_may_police_violation_anonymized.csv     <- 298,277 anonymized violation records
β”‚
β”œβ”€β”€ documentation/                                     <- Academic and project writeups
β”‚   β”œβ”€β”€ SOLUTION_REPORT.md                             <- Comprehensive technical methodology report
β”‚   β”œβ”€β”€ EXECUTIVE_SUMMARY.md                           <- High-level executive briefing
β”‚   β”œβ”€β”€ PROJECT_CONTEXT_FOR_PPT.txt                    <- Contextual notes for presentations
β”‚   └── Flipkart_Gridlock_2.0_PS1_Final_Pitch.pptx     <- Final presentation deck
β”‚
β”œβ”€β”€ prototype/                                         <- Interactive operational dashboards
β”‚   β”œβ”€β”€ police_command_center.html                     <- Simulated Command Center interface
β”‚   └── folium_heatmap.html                            <- Interactive geospatial hotspot visualization
β”‚
└── assets/
    └── images/
        β”œβ”€β”€ architecture/                              <- System design diagrams
        β”œβ”€β”€ analysis_charts/                           <- Visualized empirical results
        └── shap/                                      <- SHAP interpretability plots for XGBoost

Empirical Results

The application of this framework to the provided dataset yielded the following key metrics:

  • Data Processed: 298,277 cleaned violation records.
  • Spatial Extraction: 312 distinct, high-impact enforcement clusters identified.
  • Peak Bottleneck Impact: The most severe zone (Electronic City) exhibited a mathematically modeled 94.04% capacity loss and a corresponding 15.75 km shockwave queue.
  • Economic Validation: Optimization across the top 20 hotspot zones corresponds to an estimated annual congestion cost reduction of β‚Ή120.96 Crore.
  • Efficiency: The 0-1 Knapsack optimal dispatch schedule demonstrates a 68% efficiency improvement in lane capacity recovery compared to baseline random patrol heuristics.

Reproduction & Execution

1. Environment Setup

The system requires Python 3.9+. Install the requisite scientific computing and geospatial dependencies:

pip install pandas numpy scikit-learn xgboost hdbscan folium plotly shap

2. Pipeline Execution

The complete analytical pipeline (from data ingestion to Knapsack optimization) is contained within the primary Jupyter notebook. Execute it via the command line to regenerate all artifacts:

cd code/
jupyter nbconvert --to notebook --execute Flipkart_Gridlock_2.0_PS1_Final_Solution.ipynb

3. Automated Validation

Run the provided validation script to ensure data integrity and output structure consistency:

python run_validation.py

4. Interactive Dashboards

The generated outputs are visualized in standalone interactive HTML files. Open them in any modern web browser:

  • prototype/police_command_center.html
  • prototype/folium_heatmap.html

Research codebase developed for Flipkart Gridlock 2.0 Β· June 2026

About

AetherTraffic: Physics-Informed AI for Proactive Parking Enforcement & Congestion Recovery | Flipkart Gridlock 2.0

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors