Autonomous Fleet Rerouting &
Geospatial Disruption Defense
Transform static OpenStreetMap geometry into a self-healing logistics network. SupplyNet automatically ingests roadblock telemetry, evaluates PostGIS polygon buffers, and empowers multi-agent LLMs to inject micro-detour waypoints in milliseconds.
Live Rerouting Simulation & Micro-Detour Architecture
Simulating an active freight run from Chandigarh to Visakhapatnam (~1,800 km) encountering an unexpected civil roadblock on NH-44 near Gwalior.
30.7333° N, 76.7794° E • Dep: 04:30 AM
27.1767° N, 78.0081° E • Speed: 62 km/h
Civic Protest • 15 km PostGIS Buffer • 3.5h standstill avoided
26.4921° N, 78.3812° E • +18.5 km • +25 mins
25.4484° N, 78.5685° E • ETA: 14:15
17.6868° N, 83.2185° E • Remaining: 1,320 km
Detected collision: Truck TRK-IND-1002 route intersects Gwalior Protest Polygon buffer.
Payload: { "event": "DISRUPTION_ALERT", "city": "Gwalior", "severity": "HIGH", "lat": 26.2183, "lng": 78.1828 }Queued state to Redis. Updated `active_trips.status = 'REROUTING'`. Dispatched candidate query to Planner Agent.
Queried bypass nodes: `[Bhind, Mehgaon, Dholpur, Morena]`. Formulated detour via Mehgaon corridor.
Proposed Detour: Agra → Mehgaon (26.4921, 78.3812) → Jhansi (+18.5 km, +25 min)Deterministic code validated 16T truck clearance. Critique calculated Cost equation:
SELECT t.truck_id, at.trip_id, at.origin_city, at.destination_city, d.title AS disruption_event, d.severity FROM active_trips at JOIN trucks t ON at.truck_id = t.truck_id JOIN location_disruptions d ON ST_Intersects(at.full_route_geometry, d.affected_geofence) WHERE at.status = 'ACTIVE' -- Temporal ETA Window Check: Only flag if arrival coincides with disruption AND (at.started_at + INTERVAL '12 hours') BETWEEN d.start_time AND d.expected_end_time;
Spatial indexing on PostGIS geometries enables millisecond lookups across hundreds of simultaneous fleet trips without polling third-party APIs repeatedly.
# 1. Standard Request (Passes through Gwalior - BLOCKED) GET /route/v1/driving/78.0081,27.1767;83.2185,17.6868?steps=true # 2. SupplyNet Detour: Injects Mehgaon Waypoint (Coordinates: 78.3812, 26.4921) GET /route/v1/driving/78.0081,27.1767;78.3812,26.4921;83.2185,17.6868?overview=full&geometries=geojson # Response Extracts: { "code": "Ok", "routes": [{ "distance": 1842500, // +18.5 km "duration": 104400, // +25 mins "weight_name": "routability", "geometry": { "type": "LineString", "coordinates": [...] } }] }
CREATE TABLE trip_city_checkpoints ( checkpoint_id SERIAL PRIMARY KEY, trip_id INT REFERENCES active_trips(trip_id) ON DELETE CASCADE, sequence_order INT NOT NULL, city_name VARCHAR(100) NOT NULL, location GEOMETRY(Point, 4326) NOT NULL, status VARCHAR(20) DEFAULT 'PENDING' -- 'PASSED', 'NEXT', 'BYPASSED' ); CREATE TABLE reroute_logs ( log_id SERIAL PRIMARY KEY, trip_id INT REFERENCES active_trips(trip_id), affected_city VARCHAR(100), bypass_city VARCHAR(100), llm_reasoning TEXT, created_at TIMESTAMPTZ DEFAULT NOW() );
How SupplyNet Solves Highway Bottlenecks
A hybrid setup designed for high-scale enterprise fleets: high-frequency GPS telemetry in Redis, spatial intersections in PostGIS, and high-speed OSRM routing driven by multi-agent LLM decisions.
OSRM Micro-Detours via Waypoints
Default routing engines generate statewide diversions. SupplyNet structures queries by intermediate transit nodes (Agra → Mehgaon → Jhansi) to force tight, cost-efficient bypasses around local disruptions.
Automated PostGIS Geofencing
Converts unstructured news, roadblock reports, and weather alerts into spatial buffer polygons (ST_Buffer(Point, 15km)). Checks ST_Intersects against trip polylines with forward ETA windowing.
Streamlined Multi-Agent Chain
Replaces slow 6-hop LLM chains with a 3-hop optimized architecture: Monitoring Agent → Supervisor Node → Planner Agent, backed by a deterministic Code Guardrail and Critique Evaluator.
Hybrid Tri-Tier Telemetry
Separates high-frequency 30-second GPS pings into in-memory Redis buffers, preventing SQL database thrashing while persisting verified checkpoints and trips to PostgreSQL with PostGIS.
Multi-Enterprise Tenant Isolation
Every trip, truck, checkpoint, and audit log is isolated by enterprise_id foreign keys. Multiple freight companies operate simultaneously with zero cross-tenant data leaks.
Weighted Cost Tradeoff Function
Detour approval is mathematically governed by: Cost = w₁·Duration + w₂·Distance + w₃·Toll Ensures fuel, driver shift hours, and toll penalties never outweigh the delay time saved.
Disruption Ingestion Radar
Automated news NLP, weather polygon parsing, and spatial geofence tagging.
Civil Protest near Gwalior
Geofence buffer: 15 km polygon. 3 active trips rerouted via Mehgaon/Bhind.
Severe Storm & Heavy Rain
Buffer: 20 km coverage circle. Temporal check triggered for tomorrow afternoon.
Toll Plaza Slowdown
Speed updated via OSRM MLD customize. Delay < 8 mins, main path maintained.
Ready to Deploy Autonomous Fleet Routing?
Connect your fleet GPS pings to SupplyNet. Experience zero-delay dynamic waypoint rerouting and automated multi-agent spatial intelligence today.