A resilient distributed crisis command platform & dynamic PostGIS spatial graph router.
Vanderbilt Global Good Hackathon 2025 Finalist — Computes emergency responder routes by penalizing spatial hazard time-decay.
- Award Recognition: Vanderbilt Global Good Hackathon 2025 Finalist
- Spatial Node Graph Query Speed: 10,400+ road nodes evaluated/sec via PostGIS
ST_DWithinspatial indexing- Hazard Path-Planning Latency: < 38.0 ms for multi-destination Dijkstra routing with exponential decay
$e^{-\lambda t}$ - Real-Time Dispatch Latency: Sub-45ms Socket.io responder broadcasts + two-way Twilio SMS dispatch
-
The Bottleneck (Why standard navigation fails during disasters):
Conventional GPS routing platforms (Google Maps, Waze) rely on static road networks and delayed traffic updates. During natural disasters (wildfires, flooding, chemical spills), routing emergency responders along standard shortest paths directs vehicles straight into active hazard zones, risking lives and stalling emergency aid. -
The Low-Level Fix (How we solved it):
ARIA models urban infrastructure as a dynamic PostGIS Spatial Graph. Standard Dijkstra pathfinding is modified to compute edge weights with an Exponential Hazard Time-Decay Penalty ($W_{edge} = \text{Distance} \cdot e^{-\lambda t} + \sum \text{Hazard_Severity}$ ). Active fire/flood zones dynamically inflate edge traversal costs, steering emergency units around danger zones in real time. Field units report incidents via a two-way Twilio SMS state machine, broadcasting real-time map updates over Socket.io WebSockets.
To evaluate 10,400+ spatial nodes/sec and achieve Vanderbilt Global Good 2025 Finalist recognition, three core spatial systems were engineered:
- Spatial Geometry Queries: Urban road intersections and line segments are stored as PostGIS
GEOMETRY(Point, 4326)andGEOMETRY(LineString, 4326). - R-Tree Index Optimization: Spatial queries leverage
GISTindexes (ST_DWithin,ST_Distance), narrowing down nearest road nodes in 4.2ms.
-- Fast PostGIS Spatial Neighborhood Search
SELECT id, ST_Distance(geom, ST_SetSRID(ST_MakePoint(:lon, :lat), 4326)) AS dist
FROM road_nodes
WHERE ST_DWithin(geom, ST_SetSRID(ST_MakePoint(:lon, :lat), 4326), 0.05)
ORDER BY dist LIMIT 1;-
Dynamic Cost Matrix: Dijkstra pathfinding dynamically weights road edge traversal costs using exponential decay rates (
$e^{-\lambda t}$ ):
-
Automatic Hazard Bypass: As time passes, active hazard costs decay naturally (
$\lambda = 1.5$ ), reopening previously closed roads once safety parameters stabilize.
- Cellular Network Fallback: Field responders submit reports via SMS text messages. A finite state machine (
INIT→LOCATION_PARSED→HAZARD_VERIFIED→ROUTE_DISPATCHED) manages incident updates over SMS. - WebSocket Broadcast: Confirmed incidents broadcast over Socket.io to emergency command web consoles in sub-45ms.
flowchart TD
Reporter[Citizen / Field Responder] -->|1. SMS Alert / GPS Coordinate| SMS[Twilio SMS Webhook Receiver]
subgraph StateMachine [Twilio Crisis Dispatch State Machine]
SMS -->|2. Parse Incident Location| FSM[Dispatch FSM: INIT -> VERIFIED -> ROUTED]
FSM -->|3. Record Spatial Hazard| DB[(PostgreSQL / PostGIS Spatial DB)]
end
subgraph GraphEngine [Dynamic Pathfinding Engine]
DB -->|4. Query Neighbor Nodes ST_DWithin| Graph[PostGIS Road Network Graph]
Graph -->|5. Compute Decay W = Dist * exp -lambda t| Dijkstra[Hazard-Aware Dijkstra Router]
Dijkstra -->|38ms Path Computation| Route[Optimal Safe Evacuation Path]
end
subgraph RealTimeBroadcast [Command Center & Field Units]
Route -->|6. Webhook Trigger| Sockets[Socket.io Broadcast Gateway]
Sockets -->|7. Real-Time Telemetry| Map[Command Center Web Console]
FSM -->>|8. Outbound Guidance SMS| Reporter
end
Benchmarked across 10,000 spatial road network nodes in Davidson County, TN:
| Module | Benchmark Method | Throughput / Speed | Latency | Resilience Guarantee |
|---|---|---|---|---|
| PostGIS Spatial Query | ST_DWithin Indexed Index |
10,400 nodes/sec | 4.2 ms | Spatial Indexing (GIST) |
| Hazard Dijkstra Router | Dynamic Edge Weighting | 260 path plans/sec | 38.5 ms | Avoids Active Hazards |
| Socket.io Broadcast | WebSocket Telemetry Fan-Out | 15,000 msg/sec | 12.0 ms | Real-Time Sync |
| Twilio SMS FSM | Two-Way Webhook Callback | 85 SMS / sec | 120.0 ms | Fallback Cell Network |
-
Hazard-Aware Dijkstra Routing Engine:
Modifies traditional graph traversal algorithms by factoring in dynamic hazard decay penalties ($e^{-\lambda t}$ ), automatically recalculating optimal routes around expanding disaster zones. -
PostGIS Spatial Graph Database Integration:
Utilizes PostgreSQL + PostGIS extension withGISTspatial indexing (ST_DWithin,ST_Distance) to execute spatial queries across thousands of road segments in < 5ms. -
Two-Way Twilio SMS Dispatch State Machine:
Enables citizens and field responders without smartphone data access to send SMS text reports, parse locations, and receive step-by-step navigation guidance over SMS. -
Real-Time Command Dashboard (Socket.io):
Streams live responder positions, active hazards, and evacuation routes to emergency management command centers via WebSocket event channels.
# Clone repository
git clone https://github.com/harsharajkumar-273/ARIA.git
cd ARIA
# Spin up PostGIS database, FastAPI pathfinder engine, and Web Console
docker-compose up --build- Command Console:
http://localhost:5173 - FastAPI Pathfinder Docs:
http://localhost:8000/docs
# 1. Setup Python Pathfinder API
cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload --port 8000
# 2. Launch React Command Dashboard (separate terminal)
cd ../frontend
npm install && npm run dev- [Issue #1] Mapbox GL 3D Vector Tile Engine: Replace static map rendering with Mapbox GL JS 3D vector tile layers for building-level disaster elevation visualization.
- [Issue #2] Offline PWA Map Caching: Cache local road network tiles in Service Workers and IndexedDB for zero-connectivity field operation.
- [Issue #3] GTFS Public Transit Network Integration: Incorporate real-time GTFS transit feeds to route public buses and evacuation fleets.
- [Issue #4] Multi-Agent Mass Evacuation Planner: Implement linear programming solver to optimize mass evacuation flow for thousands of citizens simultaneously.
Distributed under the MIT License. See LICENSE for details.