Route Optimization
Plan and dispatch delivery routes: assign a vehicle and driver, add stops, and track each route's distance, duration, and fuel cost estimate through its lifecycle.
Overview
Route Optimization (Fleet & Logistics module) is where you build and manage delivery routes for vehicles registered in Vehicle Registry. Each route has a status (Planned, In Progress, Completed, Cancelled), an ordered list of stops, and computed totals for distance, estimated duration, and fuel cost.
Click any route row to expand it and see the full stop-by-stop detail: address, technician, estimated arrival, and distance for each leg.
Optimize Route & View on Map
Each route row has two actions beyond Delete, powered by the same server-side Route Optimization Engine used by Energy's Crew Routing screen:
Optimize Route
Sends the route's stops to the engine, which resolves each stop's coordinates, runs a Haversine distance + Nearest-Neighbor/2-Opt solver, and returns the shortest visiting order. The route's stops and total distance are updated and saved automatically, and the map opens showing the new sequence.
View on Map
Opens a side drawer with an interactive Turkey connector map plotting the route's stops in their current order — no optimization call, just a visual of the route as it stands right now.
Stop names must resolve to a coordinate
Optimizing and mapping both need a lat/lng for every stop. Coordinates come from a small built-in table of known hub/city names shared with Crew Routing (Istanbul Hub, Ankara DC, Izmir Port, Bursa, Konya Hub, Eskişehir). A stop address that doesn't match one of these names cannot be placed on the map or included in the optimization pass — use one of the known names, or a future coordinate-aware address field, for reliable results.
Both actions are disabled on a route with no stops.
Quick Start
- Open Fleet & Logistics → Route Optimization from the sidebar.
- Click Add Route and select a vehicle — this auto-fills the plate and driver name (searchable from every employee with the driver capability, tenant-wide).
- Set the schedule date.
- Add one or more stops, each with an address, a searchable technician picker, estimated arrival, and distance.
- Save the route — total distance, estimated duration, and fuel cost are computed automatically from the stop distances.
- Click Optimize Route on a saved route to reorder its stops for the shortest path, or View on Map to see the current sequence plotted on the map.
Core Fields
| Field | Description |
|---|---|
| Route ID | System-generated unique identifier for the route. |
| Vehicle / Plate | The vehicle assigned to this route, selected from Vehicle Registry. |
| Driver | Searchable picker of employees with the driver capability, regardless of department or add-on domain — pre-filled automatically from the selected vehicle's assigned driver, editable. |
| Date | The date the route is scheduled to run. |
| Status | Planned, In Progress, Completed, or Cancelled. |
| Stops | Each stop has an address, a technician (searchable picker of employees with the technician capability), estimated arrival time, and distance in km for that leg. |
| Distance / Duration / Fuel Cost | Automatically computed from the sum of all stop distances when the route is created. |
Multi-Select & Bulk Actions
The route table supports selecting multiple rows at once, using the same checkbox style as My Workspace screens — its shape (circle or square) and check-icon visibility both follow your Settings → Appearance preference.
Select All / Individual Rows
Click the header checkbox to select every route currently matching your search and filter tab, or check individual rows one at a time.
Bulk Delete
Delete every selected route in one action, with an inline confirmation before anything is removed.
Bulk Set Status
Apply a single status (Planned, In Progress, Completed, Cancelled) to every selected route at once — useful for marking a batch of routes as Completed at end of day.
The selection toolbar appears above the table only when at least one row is selected, and includes a Clear action to deselect everything.
AI Assistant
Route Optimization includes a right-edge AI Assistant panel that can analyze your dispatch data and answer natural-language questions about it.
Status Review
Ask which routes are still Planned but not yet In Progress, so nothing slips.
Cost Review
Find which routes have the highest estimated fuel cost, and get a total fleet fuel-spend summary.
Load Balancing
See how dispatch load is distributed across drivers and vehicles.
Efficiency Analysis
Identify routes with a high stop count relative to their total distance.
Selection Sets the Context
If you select one or more routes before opening the assistant, only those routes are sent as context for your question. With nothing selected, the assistant analyzes every route currently visible in the table (respecting your active search and filter tab).