A row of delivery lorries at the loading bays of a distribution centre at dawn.
Warehouse and logisticsDeep dive

212 orders tomorrow, 14 vehicles. The plan is ready by four.

The dispatcher picks the warehouse, the day, the orders and the vehicles. The route optimisation engine then tries several starting strategies in parallel, refines the best one, and shows everything on screen as it goes. We follow a fictional wholesaler through one planning afternoon.

  • DataEdgeLogistics product lead

10 min read
Updated

At most wholesalers, delivery planning happens in one person's head. They know which store opens at six, which street the big truck cannot get into, and which driver knows the southern round. When that person goes on holiday, the plan gets worse. When the number of orders doubles, planning in your head cannot keep up.

AGORA's route planner stores that knowledge as data and leaves building the plan to the route optimisation engine. The dispatcher decides; the engine calculates. We show what this looks like in practice using a fictional company.

Four questions before anything is calculated

Tuesday, 15:00. The dispatcher opens the planner and sets out, in four steps, what needs solving.

  1. From which warehouse? The depot the rounds start from and return to.

  2. For which day? Wednesday's delivery day. The planner only offers days that have orders to plan.

  3. Which orders? By default, every closed, submitted order for the day is included. Individual orders can be taken out, for example if the customer phoned to ask for it to be held back.

  4. Which vehicles? Vehicle, driver and, if needed, trailer. These combinations come from the vehicle and driver master, together with their availability periods. Availability shows which driver is on holiday and which vehicle is in for service.

The example's input (sample data)

212Orders for Wednesday
168Delivery addresses (customer sites)
14Vehicle–driver pairs
3Of which hired vehicles

The engine turns orders into addresses. If a store has three orders for the same day, they become a single stop with a combined weight. The time spent at the stop is calculated from this too: unloading runs at a weight rate specific to the site, so a 40 kg stop and a 900 kg stop get different times.

What the engine takes into account

A plan is only worth something if it can be carried out in reality. So the engine looks at the same conditions an experienced dispatcher would keep in their head:

Factor

Where it comes from

Goods receipt time window, even several a day

the customer site's master data

The vehicle's payload and its piece or pallet capacity

the vehicle master

The driver's working and driving time limits

the driver's data, totalled across several rounds

Access zones and per-vehicle permits

zone polygons and the permit list

Site requirements ("refrigerated only", "small vehicle only")

restriction tags

Loading at the warehouse, unloading at the stop

minimum per round, site-specific rate

Stylised summary.

It knows the costs too. A vehicle's fixed cost, its usage cost, and the rate per empty and per loaded kilometre together give what a round costs. Because of the loaded surcharge, carrying a heavy load around for a long time is more expensive for the engine. Heavy items therefore tend to come off the vehicle early in the plan, where the time windows allow.

Each of these factors deserves a closer look. Here we follow what happens once the run starts.

The first seconds: what cannot work at all

Before the actual search starts, the engine runs a quick pre-check. It looks for any address that none of the selected vehicles can serve. That could be a store that only accepts 3.5 t vehicles when all the selected vehicles are larger, or a site that no vehicle can reach before its receiving window closes.

In the example there are two such addresses. They appear on screen straight away, with the reason. The dispatcher now has time to decide: add a smaller vehicle, or accept that these two orders will not go out tomorrow.AGORA · route plannerThe pre-check runs no optimisation; it only checks the necessary conditions. That is why it finishes in seconds and wastes no search time on hopeless addresses.

What makes a plan good?

The shortest route is rarely the best plan. For a wholesaler the question is rather that every order goes out, with as few vehicles and kilometres as possible, and without anyone exceeding their working time. The engine therefore works with a single combined cost that includes several factors:

Cost element

What it expresses

Vehicle fixed cost

whether it is worth sending out one more vehicle at all

Usage cost

running the vehicle for the duration of the round

Empty and loaded kilometres

distance, at a rate that depends on the load

Loaded surcharge

carrying a heavy load around for a long time

Drop penalty

leaving an address unserved

Stylised summary.

The drop penalty is the most interesting. The fewer vehicles can serve an address, the more expensive it is to leave it out. If a small city-centre store can only be reached by two small vans, leaving that store out costs the engine far more than leaving out an address any vehicle could take. So it keeps the two small vans primarily for that store. An experienced dispatcher thinks the same way: allocate the hard-to-serve customers first.

A race on screen

After the pre-check the search begins, and this is the part most visible on screen. The engine builds the first, starting plan with three different strategies at the same time, in separate processes, in parallel. Each starts from a different principle: one looks for the cheapest insertion address by address, another extends all routes at once, and the third builds from the cheapest road segments.

The winner is the strategy that serves the most addresses. The dispatcher watches live where the three strategies stand and which one is ahead.

The deep search starts from the winning solution. This is a guided local search: it improves the plan with small swaps and moves, and avoids getting stuck by treating frequently used poor solutions as ever more expensive. Meanwhile the best plan so far updates continuously on screen.

Phase

What the dispatcher sees

Pre-check

the list of addresses that cannot be served, with the reason

Strategy race

three running strategies, addresses served and cost

Deep search

the best plan so far, as it improves

Finalisation

stop-order polishing, route drawing, saving

Stylised view, sample data.

When the dispatcher judges the plan good enough, they press Stop. The engine does not throw the work away: it finalises and saves the best solution so far. During finalisation it reviews the order of stops on every round once more, taking the weight of the load into account, and then draws a route on the road network for every round.

What does the dispatcher get?

The finished plan breaks down into rounds for each vehicle. For every round it shows:

  • the order of stops, with address and customer;

  • the planned arrival and departure time at each stop;

  • departure from the warehouse and return;

  • the driver's call time, that is, when they need to be at the warehouse for loading;

  • the round's weight, pallet and time totals.

Vehicle (sample)

Round

Stops

Departs

Returns

Load

MINTA-01 · 12 t

1

14

05:40

11:25

7,480 kg · 16 pallets

MINTA-01 · 12 t

2

9

12:10

16:05

4,920 kg · 11 pallets

MINTA-07 · 3.5 t

1

18

06:15

13:40

1,310 kg · 5 pallets

MINTA-11 · hired, 7.5 t

1

12

06:00

12:50

3,760 kg · 9 pallets

Stylised view, sample data.

The plan is not set in stone. On the planning screen the dispatcher can drag a stop from one round to another, or from one vehicle to another. Weight, pallet and time totals update instantly, and anything over the limit shows in red. If they make a mistake, the change can be undone.

The road network the engine calculates on

Every plan rests on two tables: the distance and the travel time between any two addresses. The engine calculates these from the real road network, not as the crow flies. In the 168-address example that is tens of thousands of address pairs, which the search reuses again and again.

Travel time also depends on the vehicle. Based on the weight of the cost groups, the engine uses a different speed profile for a small van and for a heavy goods vehicle. On a city-centre route this counts at every stop, and on an eighteen-stop round it can decide whether the round fits into the afternoon window.

The system keeps the address-pair results for one day. If the dispatcher replans in the afternoon because twenty more orders have come in, the known address pairs do not have to be recalculated, so the second run starts noticeably faster. Finally, the engine draws an actual route for the finished rounds, which can be viewed on the map.

Calculation

What it is for

When it runs

Distance and time matrix

every step of the search

at the start of the run, kept for one day

Speed profile

different travel times per vehicle category

together with the matrix

Route drawing

display on the map

at finalisation, per round

Stylised summary.

Acceptance: the plan becomes a delivery route

When the plan is right, the dispatcher accepts it. Every round is then created as a delivery route in HERMES Wholesale: with vehicle, driver, trailer, planned departure and arrival, and the orders that belong to it. From then on the warehouse sees the same route, and picking and loading are based on it. No manual re-keying.

If HERMES cannot create the route for some reason, for example because the driver's or the vehicle's ID is missing, the result is written back to the plan, and the dispatcher can see which round has a problem.Routing infrastructureRoad network calculations run on self-hosted engines based on OpenStreetMap. There is no pay-per-request map API, so the cost of planning does not grow with the number of runs.

The plan also stays in AGORA after acceptance. If it later turns out that a round needs changing, the dispatcher carries on in the same screen: they can recalculate one vehicle's rounds or insert an urgent order. Drivers and vehicles are protected from double booking when that happens.

What stays with the dispatcher

The engine calculates faster than a person and never forgets a time window. The decisions, however, stay with the dispatcher. They choose the vehicles, decide what happens to the two orders that cannot be served, and stop the search when the plan is good enough. The difference is that the rules in their head are now in the system, so the plan is just as good when someone else makes it.

Related: Credit limits are checked when the order is placed · Where do the crates go?