AI-powered Traffic Operations Copilot for Bengaluru traffic event management, built for Flipkart Gridlock 2.0.
Traffic Operations Copilot converts the instructor-provided ASTraM anonymized event dataset into a decision-support command center for traffic impact assessment, resource planning, barricading, diversion advisories, CCTV validation, intervention simulation, and offline copilot answers.
Political rallies, festivals, construction activity, sports events, VIP movement, accidents, and sudden public gatherings can disrupt localized road networks. Traffic teams often need to decide manpower, barricading, and diversion plans before the impact is fully visible.
Traffic Operations Copilot answers the operational question:
What should traffic police do right now?
- Traffic Impact Score (TIS) for event-level operational risk.
- Attendance-aware planning for event scale and field presence.
- Dynamic officers, reserve, patrol, and barricade recommendations.
- Dataset-only diversion planning with lower-risk corridor ranking.
- Intervention comparison for no action, diversion only, diversion plus barricades, and full intervention.
- Operations map with event, hotspot, and CCTV context.
- CCTV validation prototype with simulated live feeds and detection overlays.
- Explainable AI sections for risk, manpower, barricades, diversion, and CCTV verification.
- Offline AI Copilot over processed ASTraM insights.
- Post-event learning design for future recalibration.
flowchart LR
A["ASTraM event dataset"] --> B["Python preprocessing"]
B --> C["Feature engineering"]
C --> D["Traffic Impact Score engine"]
D --> E["Resource planner"]
D --> F["Barricade planner"]
D --> G["Diversion engine"]
E --> H["Intervention simulator"]
F --> H
G --> H
H --> I["Next.js API routes"]
I --> J["Traffic Operations Copilot UI"]
C --> K["DBSCAN hotspot engine"]
K --> J
C --> L["Prototype CCTV layer"]
L --> J
More diagrams are in docs/architecture.md.
flowchart TD
A["Event"] --> B["Impact Assessment"]
B --> C["Resource Planning"]
C --> D["Barricade Planning"]
D --> E["Diversion Planning"]
E --> F["Intervention Comparison"]
F --> G["Recommended Response Plan"]
G --> H["Post-event Learning"]
- Next.js App Router
- TypeScript
- Tailwind CSS
- Framer Motion
- Mapbox GL
- Recharts
- Python data pipeline
- CatBoost surrogate model
- Scikit-learn, XGBoost, LightGBM benchmarks
This project uses only the provided ASTraM anonymized event dataset for analytics, scoring, recommendations, clustering, and model training.
Important honesty constraints:
- No external dataset is used for training or analytics.
- The dataset has no measured congestion labels, travel time, vehicle counts, or delay duration.
- TIS is an operational risk score, not a measured congestion prediction.
- Mapbox is used only for basemap rendering.
- CCTV feeds are simulated for prototype demonstration; production requires authorized live CCTV streams.
Recommended additional captures for submission:
| Screen | What To Capture |
|---|---|
| Simulation | Scenario controls and recalculated TIS output |
| AI Copilot | CCTV/resource/risk question and grounded answer |
- Open Simulation.
- Choose a high-risk event.
- Change event cause, priority, duration, or road-closure status.
- Click Recalculate TIS.
- Explain how TIS and recommendations change without altering backend scoring rules.
The map links events, hotspots, and CCTV validation:
- Open Operations Map.
- Click an event marker or Open live CCTV in the event feed.
- The interface scrolls to Live CCTV Verification.
- Review the camera feed, density, queue, detections, and operator actions.
The copilot is offline and uses local processed insights. Example prompts:
- Show CCTV camera status and visual confirmation.
- Which zones need attention?
- Which corridor has the most disruptions?
- What resources are needed first?
- Why is the highest event risky?
Recommended 3-minute judging flow:
- Command Center - Show the recommended response plan first.
- Risk Gauge - Explain TIS and severity.
- CCTV Validation - Show simulated feed as visual confirmation layer.
- Operations Map - Click an event and jump to live CCTV.
- Simulation - Modify road closure or duration and recalculate.
- AI Copilot - Ask for CCTV or resource summary.
Detailed scenarios are in docs/demo-flow.md.
Install dependencies:
npm installCreate .env.local:
NEXT_PUBLIC_MAPBOX_TOKEN=your_mapbox_tokenGenerate data artifacts:
npm run process:data
npm run verify:dataTrain/verify the surrogate model:
npm run train:model
npm run verify:modelRun locally:
npm run devOpen:
http://127.0.0.1:3000
- Push the repository to GitHub.
- Import into Vercel or another Next.js hosting provider.
- Set
NEXT_PUBLIC_MAPBOX_TOKEN. - Ensure
data/processedartifacts are present. - Build command:
npm run build. - Start command:
npm run startif using a Node host.
- Authorized live CCTV/ASTraM video integration.
- Real measured congestion, travel-time, and volume labels.
- Field feedback capture for post-event learning.
- Role-based command center views.
- Integration with official dispatch and incident-management systems.
MIT

