Search the documentation

Find a page by title or section.

Planning and dispatch

Route optimization

How Cooriroo works out the driving order for a trip, what it stores, and when it recalculates without being asked.

Updated

Cooriroo works out the driving order for a trip’s stops and stores the answer as a route plan: one line to draw on the map, one distance and duration figure, and an estimated arrival time for every stop. Some of that happens when you ask for it, and a lot of it happens on its own. This page covers both, and how to read the result.

Who can do this

Role
Administrators
Permission
trips:readtrips:write

Drivers can read a trip’s route plan and report deviation from it; calculating, previewing and recalculating are admin actions. Route work needs a Google Maps API key configured for your deployment — without one the trip still runs, it just has no drawn path and no ETAs.

What a route plan holds

A trip has at most one route plan. Recalculating replaces it rather than adding a version, so what you read is always the current answer. Each plan carries:

  • The path — an encoded line. This is what the live map draws for the trip.
  • Distance and duration — for the whole trip and per leg, plus a duration without traffic when the provider returns one.
  • The waypoint order — which stop the optimizer put where.
  • Confidence and timinghigh, medium or low, with the moment the plan was calculated and the moment it goes stale.

Optimize a trip’s stop order

Optimization is a preview: nothing changes until you accept it.

  1. 1

    Open the trip and go to its stops

    Trips → open a trip → Stops

    You need at least two stops that are still active. Stops that are completed, departed, skipped or failed are excluded from every route calculation, because routing a driver back through a place they have already been is worse than useless.

  2. 2

    Choose Optimize Route

    Cooriroo asks the maps provider twice over the same set of stops — once in your current order to establish a baseline, once optimized. A saving is only honest when it is measured against the same journey.

  3. 3

    Read the comparison

    Distance and duration appear side by side with the difference, and every stop shows how far it moved. Where a stop carries a delivery window, the preview also marks whether the new order still arrives inside it.

  4. 4

    Accept or reject

    Accepting writes the new stop order and recalculates the plan. Rejecting changes nothing at all — no order, no plan, no ETAs.

When Cooriroo recalculates on its own

TriggerWhat Cooriroo doesThe existing plan
You change a trip’s stops, origin or scheduleRecomputes in the backgroundDeleted first, so nobody reads a stale order
A trip starts for the first timeRecomputes only if the plan is missing, empty or expiredLeft alone when it is still good
The origin is filled in from the driver’s position at startRecomputes from the real departure pointReplaced
A flexible-order trip picks its next stopReroutes from the driver’s current positionDeleted first
Recalculation is best-effort and runs in the background — it never blocks the action that triggered it.

The pattern is deliberate. Where the stop order has genuinely changed, the old plan is deleted immediately and the map shows no line for a few seconds rather than a confidently wrong one. Where the trip is merely starting, nothing is deleted — a perfectly good plan is left in place.

Delivery windows and time at a stop

A stop can carry an opening and a closing time. By default those windows are advisory: your order is kept and each stop is marked as arriving within its window or outside it, so a violation is visible without anything being moved behind your back.

Turn on the enforce time windows route-optimization setting and windows become a hard constraint instead. Route calculation reorders the trip’s active stops into a window-feasible sequence — earliest deadline first, still honouring locked stops — and saves that order. Where the shortest route would miss a window, the preview can offer a third, window-respecting option alongside current and optimized.

Arrival times account for the time spent at each stop, not just the driving. A stop’s own planned service duration wins where it has one; otherwise Cooriroo uses the base dwell time plus a per-item amount from your route-optimization settings.

Staleness, confidence and deviation

A route plan expires thirty minutes after it is calculated. Reading it after that returns it with low confidence rather than pretending traffic from half an hour ago still applies. The path is not deleted, so the map keeps drawing the trip.

Separately, a reported position can be compared with the stored path to detect a driver going their own way. The default threshold is 500 metres, and the severity depends on how far off the line they are:

Distance from the routeSeverity
500 m to 1 kmMinor
1 km to 2 kmMajor
Over 2 kmCritical
Route deviation severity. A deviation surfaces as an alert on the live map.

When something looks wrong

The live map draws no line for a trip
Cause

The trip has no route plan, or one was just invalidated and the background recalculation has not finished.

Give it a few seconds and refresh. If it stays empty, open the trip and calculate the route: the usual causes are a trip with fewer than two active stops, or a deployment with no maps key.

Optimize is unavailable, or returns a service error
Cause

Route work needs at least two active, located stops and a configured maps provider.

A stop with no coordinates cannot be routed to. Fix the addresses first, then optimize. A provider error is reported as temporary rather than swallowed — try again before assuming the trip is broken.

The optimized order is barely different from mine
Cause

Locked stops, or an order that is already close to the best available.

The optimizer only reorders unlocked intermediate stops. Lock a few of them and there is little left to move. In the trip wizard a reorder that saves under about 50 metres is discarded outright, so the tool never claims a win it did not earn.

A very large trip takes noticeably longer to calculate
Cause

The maps provider accepts an origin, a destination and 23 intermediate waypoints per call.

Trips beyond that are split into several calls and stitched back together, which costs time. It is expected, not a fault; the plan that comes back covers the whole trip.

Terminology

Your organisation can rename these. If your screens say something else, this is what they mean here.

Trip
One journey with an ordered list of stops. Some tenants call these routes, runs or jobs.Rename it in Settings → Terminology
Stop
One place a trip calls at. Some tenants call these drops, calls or visits.Rename it in Settings → Terminology
Origin
Where a trip departs from — a warehouse, hub or restaurant. Some tenants call these depots or sites.Rename it in Settings → Terminology