Event-Driven Traffic Congestion Command Center A dark-mode traffic operations dashboard for predicting congestion risk, planning diversions, recommending field resources, and learning from real-world outcomes.
Core Idea Traffic events do not affect roads equally. A VIP movement, public event, protest, procession, construction activity, accident, or vehicle breakdown can create very different closure risks depending on the junction, corridor, time, and local history.
This app turns those signals into an operational workflow:
Predict the probability of road closure. Estimate event impact and expected duration. Recommend officers, barricades, response level, and impact radius. Generate the best alternate path using a road graph. Plot the diversion route on a MapmyIndia-powered map. Capture ground feedback after the event. Use that feedback to improve future recommendations. Key Features Prediction Engine The backend uses trained model artifacts and engineered risk features to estimate closure probability. The prediction considers:
Event type Event cause Priority Junction Corridor Zone Police station Event time Historical closure patterns Local hotspot risk Impact And Severity Scoring Each event receives an impact score and severity label. This helps operators quickly understand whether the situation is low-risk, medium-risk, high-risk, or critical.
Adaptive Recommendation Learning The app includes a feedback-driven learning layer for recommendations.
Because the original dataset does not contain direct labels for ideal officer counts, barricade counts, response levels, or diversion usefulness, the system starts with rule-based operational recommendations. After predictions are used in the field, feedback creates a reward signal based on:
Whether a road actually closed How long the event took to clear Whether the diversion was useful Whether the deployment level was effective Future recommendations use this reward history to adjust deployment strength for similar event contexts. This is intentionally not heavy reinforcement learning. It is a lightweight contextual bandit system: the model predicts risk, the rule engine creates a safe baseline, and the bandit chooses a safe deployment action from historical reward.
Safe policy actions:
conservative balanced aggressive critical The selected policy action adjusts officers, barricades, response level, and impact radius within safe minimum and maximum limits.
Learning Workflow The prediction model estimates closure probability. The app converts probability and local risk into an impact score and severity label. The rule-based recommender creates the baseline deployment. The contextual bandit builds a context key from event type, cause, priority, junction, corridor, zone, police station, hour bucket, and severity. If enough similar reward history exists, the bandit selects the best historical safe action using epsilon-greedy policy selection. If history is weak or missing, the baseline recommendation is used. After the event, the operator submits ground feedback. The feedback is converted into a reward from -100 to +100. The reward is saved in data/recommendation_rewards.csv. Similar future events use that reward history to improve deployment strength. Graph-Based Diversion Planning Diversion planning uses a weighted graph of road nodes and connections. The app identifies a risky or blocked junction and calculates an alternate path across connected roads.
The diversion output includes:
Blocked node Start node End node Best alternate route Route coordinates Normal distance Diversion distance Extra distance Backup route options MapmyIndia Route Visualization The selected diversion route is plotted with the MapmyIndia/Mappls JavaScript SDK. Operators can visually inspect the route instead of relying only on text instructions. A local Leaflet fallback remains available so the demo still renders a route if the MapmyIndia SDK cannot load.
Simple Ground Feedback The feedback form is designed for non-technical users. It asks simple operational questions:
Did a road close? How long did it take to clear? Was the diversion useful? What should the team remember next time? The saved feedback improves both retraining data and recommendation learning.
Log in or sign up for Devpost to join the conversation.