Routing optimisation (explainable)
Trackely uses a propose → explain → confirm → apply workflow. The optimiser never auto-applies reordering.
Constraints
- Time windows: per-stop earliest/latest arrival. Late arrivals are infeasible for
hardwindows and penalised forsoft. - Service time: dwell time per stop (minutes), included in ETA/lateness.
- Vehicle capacity: weight/volume limits (when provided). Overflow is flagged in warnings.
Scoring priorities
Candidate orders are ranked lexicographically:
- Hard constraint violations
- Total lateness minutes
- Cost estimate
- CO2 estimate
- Distance
Eco score
ecoScore is a relative 0–100 score within the evaluated candidates: 100 is lowest CO2 among candidates; 0 is highest; 50 means identical.
Google Routes configuration
Set one of:
GOOGLE_MAPS_SERVER_KEY(server: Geocoding + Routes API)NEXT_PUBLIC_GOOGLE_MAPS_API_KEY(browser: Maps JS only)
If unavailable, Trackely uses a deterministic local fallback (Haversine + fixed speed) so optimisation works locally.
Common failure modes
- Missing depot or stop coordinates → warnings; fallback travel times may be inaccurate.
- Invalid windows (end before start) → warnings.
- Hard windows infeasible → warnings plus per-stop lateness minutes.