Flipkart Gridlock 2.0 Β· Problem Statement 1 Β· Technical Research Submission
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.
On-street illegal parking and spillover parking near commercial areas, metro stations, and events severely choke carriageways and intersections.
- Reactive Enforcement: Existing methodologies rely on patrol-based, retrospective ticketing rather than proactive congestion prevention.
- Impact Blindness: Absence of a correlative heatmap mapping parking violations directly to their corresponding congestion impact (capacity loss and queue propagation).
- 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).
How can AI-driven parking intelligence detect illegal parking hotspots and quantify their impact on traffic flow to enable targeted, optimized enforcement?
Our solution bridges unsupervised machine learning, traffic flow theory, and combinatorial optimization through a robust four-stage pipeline.
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
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.
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.
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.
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.
.
βββ 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
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.
The system requires Python 3.9+. Install the requisite scientific computing and geospatial dependencies:
pip install pandas numpy scikit-learn xgboost hdbscan folium plotly shapThe 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.ipynbRun the provided validation script to ensure data integrity and output structure consistency:
python run_validation.pyThe generated outputs are visualized in standalone interactive HTML files. Open them in any modern web browser:
prototype/police_command_center.htmlprototype/folium_heatmap.html
Research codebase developed for Flipkart Gridlock 2.0 Β· June 2026