FLO
Garuda PancasilaBlibliFabLab

Routing metrics & guide

How Jakarta last-mile route optimization works — from order assignment and CSV import to traffic-aware ETAs, DTI/CFI delivery metrics, Pertamina fuel costing, and VQI-based driver dispatch.

Why route optimization?

Reduce travel distance

Nearest-neighbor TSP orders stops from the Blok M warehouse so couriers do not repeatedly cross Jakarta.

Realistic ETAs

Time estimates use OSRM with Jakarta rush-hour calibration (06:30–10:00 & 16:00–20:00 WIB), or Google live traffic when available.

The right vehicle

CAR_ONLY stops go to cars and MOTORCYCLE_ONLY stops to motorcycles; BOTH stops are divided to keep routes feasible.

Healthy fleet

Drivers are selected by highest VQI per vehicle type, connecting predictive maintenance and routing.

Order lifecycle

Received→
Preparing→
On route→
Delivered
Vehicle assignment
Maximum 15 stops per route chunk.
AccessVehicleNote
CAR_ONLYVanNarrow alleys are inaccessible; requires a van
MOTORCYCLE_ONLYMotorcycleDense alleys and housing; motorcycles are more agile
BOTHVan or motorcycleAssigned to the lighter set during allocation
Route optimization
Nearest-neighbor round trip from the warehouse.
1. Start at warehouse (Blok M Square Warehouse)
2. Pick the nearest unvisited stop (by drive time)
3. Repeat until all stops are visited
4. Return to the warehouse

Demo heuristic — production systems often use OR-Tools or similar tools for larger fleets. Suitable for up to 15 stops per route.

Traffic estimation cascade

PrioritySource
1Google Maps (live traffic)
2Google Maps (road network)
3OSRM road distances + Jakarta traffic model
4Jakarta traffic model (local estimates)
Jakarta traffic model
Timezone: Asia/Jakarta (WIB)
Period× DurationMax speed
Morning/evening peak (Mon–Fri 06:30–10:00, 16:00–20:00)1.85×11 km/h
Midday (11:00–14:00)1.45×14 km/h
Night (22:00–05:00)1.05×20 km/h
Weekend1.20×17 km/h
Normal1.30×15 km/h

OSRM calibration ×2.1; per-stop service 10 min (parking + handover).

Emissions estimate
CO₂ by engine type × total distance
EngineFactor
ev0.05 kg/km
gasoline0.15 kg/km
diesel0.22 kg/km

Trip fuel cost & savings

Pertamina DKI Jakarta prices (live or fallback) are matched to each vehicle type. Trip costs appear across route planning and logistics dashboards, and System → Gas Price.

Fuel product mapping
Vehicle type + engine → Pertamina product
FleetProduct
Gasoline motorcyclePertalite
Gasoline vanPertamax
Diesel vanBiosolar
EV motorcycle (Polytron Fox)PLN EV charging
EV van (DFSK / Wuling)PLN EV charging
Consumption assumptions
Jakarta urban last-mile averages
VehicleRate
Gasoline motorcycle35 km/L
Diesel motorcycle30 km/L
Gasoline van11 km/L
Diesel van10 km/L
EV van (DFSK / Wuling)0.18 kWh/km
EV motorcycle (Polytron Fox)0.05 kWh/km
fuelCost = (distanceKm / kmPerLiter) × pricePerLiter   // ICE
fuelCost = distanceKm × kWhPerKm × electricityRate      // EV

baselineDistance = Σ 2 × haversine(warehouse, stop) × 1.35
savings = baselineFuelCost − optimizedFuelCost

The naive baseline models a separate warehouse round trip per stop without route sharing. Optimized routes use nearest-neighbor TSP distance. The demo EV fleet uses Polytron Fox, DFSK Gelora E, and Wuling Formo Max EV.

Demo geography

Warehouse: Blok M Square Warehouse (Blok M Square, Jakarta, Indonesia)

Order coordinates are validated against Greater Jakarta (Jabodetabek) bounds. Demo addresses use real street coordinates.

VQI driver selection

For each route chunk, the system picks the highest-VQI available driver with the matching vehicle type. See also Predictive Maintenance Metrics & Guide.

Van (2)
Andi PratamaVQI 42 · medium
Rina WulandariVQI 35 · medium
Motorcycle (3)
Siti RahmaVQI 67 · medium
Bima NugrahaVQI 49 · medium
Joko SantosoVQI 47 · medium
Live demo — Jakarta traffic
WIB: Sat 11:26
Traffic multiplier: 1.2×
Max effective speed: 17 km/h
Live demo — driver ranking
Andi PratamaVQI 42 · medium
B 1721 KXP – Daihatsu Gran Max
van
EMP-BLI-2401

References & basis

Routing uses rule-based heuristics adapted for the Jakarta last-mile demo. Traffic calibration reflects typical urban delivery speeds, not real-time probe data unless Google Maps is connected.

Vehicle Routing Problem (VRP) — Wikipedia

The classic framework for optimizing multi-stop routes from a depot.

Open Source Routing Machine (OSRM)

The road-distance engine used as the demo's default source.

Google Routes API

Optional live traffic and road polylines for map visualization.

Last-mile delivery in emerging markets

Operational context for last-mile delivery in dense cities such as Jakarta.

Delivery Trip Index (DTI)
End-to-end SLA: receivedAt → deliveredAt vs planned
plannedLead = RouteStop.etaAt − Order.receivedAt
actualLead  = Order.deliveredAt − Order.receivedAt
slack       = actualLead − plannedLead

DTI = 100 − min(100, max(0, slackMin) × 0.5)

Variance drivers include traffic, weather, stop service time, warehouse preparation delay, route deviation, vehicle reliability, and address accuracy.

High < 40Medium 40–70Low > 70
Carbon Footprint Index (CFI)
100 = EV-equivalent; 0 = diesel over the same distance
Enginekg CO₂/km
ev0.05
gasoline0.15
diesel0.22
CFI = 100 × (dieselKg − actualKg) / (dieselKg − evKg)

Reports & dashboards

Logistics KPIs aggregate DTI, CFI, fuel cost, and route metrics across active and completed routes. Charts appear on the dashboards, with exportable CSV and print layouts under Routing → Reports.

Route report rows: route ID, driver, vehicle, stops, distance, duration, average DTI and CFI, fuel cost, and savings against the naive baseline.

Delivery report rows: per-stop order ID, status, planned versus actual lead time, DTI score, and allocated emissions (CFI).

Order import: CSVCSV template at /public/templates/routing-orders-template.csv

Computer Vision (roadmap)

ODOL Detection and Hub Congestion Detection are planned for overload monitoring and hub queue analytics. Routing metrics currently remain independent of CV inputs.

Visualize routes on Plan Route

Set GOOGLE_MAPS_JS_API_KEY (or GOOGLE_MAPS_API_KEY) in server environment variables to render waypoints and road-following polylines on Google Maps. See also emissions per route on the preview card.