TotalApp Docs

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

  1. Open Fleet & Logistics → Route Optimization from the sidebar.
  2. 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).
  3. Set the schedule date.
  4. Add one or more stops, each with an address, a searchable technician picker, estimated arrival, and distance.
  5. Save the route — total distance, estimated duration, and fuel cost are computed automatically from the stop distances.
  6. 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

FieldDescription
Route IDSystem-generated unique identifier for the route.
Vehicle / PlateThe vehicle assigned to this route, selected from Vehicle Registry.
DriverSearchable 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.
DateThe date the route is scheduled to run.
StatusPlanned, In Progress, Completed, or Cancelled.
StopsEach 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 CostAutomatically 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).

Frequently Asked Questions

Does the distance/fuel cost update automatically as the route runs?
The totals are computed from the stop distances when the route is created, and recomputed only when you click Optimize Route (which also updates the stop order and total distance to the engine's result). Editing individual stop fields after creation is not currently supported; delete and re-create the route if the plan changes significantly.
Can a route be assigned to a vehicle that's marked Out of Service in Vehicle Registry?
The vehicle picker lists every vehicle in Vehicle Registry regardless of status, so this is possible. Check the vehicle's status before assigning it to avoid dispatching an unavailable vehicle.
What's the difference between this screen and the map-based Route Optimization under the Logistics group?
This Fleet & Logistics screen is a route-planning and record-keeping table (build routes, list stops, track status/cost, optimize/view a single route on demand). The Logistics group's Route Optimization is a separate live-dispatch screen that overlays every vehicle's computed route on one map at once, across truck/maritime/air modes. They belong to different app modes and don't share route data, though both ultimately call the same underlying Route Optimization Engine for path calculation.
Why can't I see a stop on the map after optimizing?
The engine can only place a stop whose address matches one of the known hub names (Istanbul Hub, Ankara DC, Izmir Port, Bursa, Konya Hub, Eskişehir) — see the Optimize Route & View on Map section above. An unrecognized address is silently skipped on the map, though it's still included in the route's stop list and totals.