Vehicle costs and the COST metric

By Nathan ColeUpdated

The optimizer minimizes total cost. The cost fields on each vehicle define what that cost is in your operation. Routing24 has no "balance routes" or "minimize vehicles" switch.

This tutorial plan prices a Cargo bike and a Van differently for the same twelve orders:

Tutorial - Vehicle costs
A cargo bike and a van priced differently for the same twelve orders. Change a price, re-optimize, and compare the COST metric.

The cost fields

Open a vehicle on the Fleet page and expand the Cost group. Each vehicle has its own prices.

An empty cost field means 0. When no vehicle in the plan sets a cost per km/mile, per hour, or per load-km/mile, the optimizer prices travel at 1 per km (or mile) plus 1 per hour. That minimizes distance and time together. The optimizer treats a plan whose every cost is an explicit 0 the same way. Alongside priced vehicles, the optimizer honors a 0. The tutorial's Cargo bike charges 0 per km while the Van charges 1. The same kilometer is therefore free on the Cargo bike and priced on the Van.

Fixed cost

Fixed cost applies once, if the vehicle is used at all. It covers the cost of putting a van and driver on the road. A high fixed cost makes the optimizer prefer fewer vehicles.

Cost per km / mile

Cost per km / mile charges the distance driven. It covers fuel, wear, and per-km leasing.

Cost per hour

Cost per hour charges every hour on route: driving, service, and waiting. It covers wages. A high hourly cost makes shorter route durations reduce cost.

Cost per stop

Cost per stop charges every stop served. Depot and reload visits are free. A pickup with its linked delivery counts as two stops. The field covers a handling or drop fee per delivery. A high cost per stop steers orders toward vehicles with cheaper handling.

Overtime cost per hour

Overtime cost per hour charges every hour past Max duration, up to Max overtime. It covers overtime pay. The optimizer chooses a long route only when the saving exceeds the overtime charge.

Ride overtime cost per hour

Ride overtime cost per hour charges every hour a linked (pickup & delivery) order's ride time runs past its Max time in vehicle, up to its Max ride overtime. A driver break taken between the pickup and the delivery counts as ride time. The optimizer charges that time the same way. The field covers a cold-chain surcharge. The optimizer keeps a linked pair in the vehicle past its ride limit only when the saving exceeds the ride overtime charge.

Cost per load-km / load-mile

Cost per load-km / load-mile applies to each unit of load carried per km or mile: every leg charges the load on board times the leg length. It covers load-dependent fuel or refrigeration burn. The optimizer routes heavy cargo over shorter distances and delivers it early. The worked example is in Load-dependent cost in practice below.

How the costs trade off

The optimizer weighs these numbers against each other:

  • High fixed cost concentrates work onto fewer vehicles, even at the price of longer routes.
  • High distance cost shortens total mileage, even if the optimizer uses an extra van.
  • High hourly cost penalizes waiting time and slow sequences. It matters most with tight time windows.

A workable starting point is a realistic fixed cost (what a vehicle-day costs you) and a rough per-km cost. Ratios matter more than absolute values: a fixed cost of 50 with distance cost 1 behaves the same as 5000 with 100.

In the tutorial plan, the Cargo bike costs 5 fixed, 8 per hour, and 0 per km. The Van costs 80 fixed, 1 per km, and 25 per hour. The Cargo bike is the cheapest way to serve the orders it can carry. The optimizer loads it to its 6 units of capacity, and the Van serves the rest. Set the Cargo bike's Fixed cost to 100 and re-optimize. The Van then serves every order and the Cargo bike goes unused. The optimizer does not charge the fixed cost of a vehicle it does not use. Compare the header COST before and after.

Load-dependent cost in practice

Cost per load-km / load-mile prices the carriage itself. In this tutorial plan, a single Van with a Cost per load-km of 2 serves two 8-unit pallet orders and six 1-unit parcel orders:

Tutorial - Load-distance cost
Two heavy pallet orders among six light parcel orders on one van. A cost per load-km makes the heavy cargo ride short paths and leave the van early. Uses Load-distance cost (cost per load-km).

With the rate set, the Van serves both pallets in the first half of the route, even though that tour is longer than the shortest loop. The Van delivers the 16 pallet units early instead of carrying them across the city. Fewer load-kilometers accumulate, so COST falls. Clear Cost per load-km on the Van and re-optimize. The route reverts to the shortest loop. The pallets then stay on board for most of it.

The COST metric

After an optimization, the header's COST sums every used vehicle's charges under these prices, in your own cost units. Re-optimize after a change and compare COST values to see which plan is cheaper. With no costs set, COST is the plan's total distance plus its total hours: 340 km of driving across 11 route-hours shows a COST of about 351.

COST does not price unassigned orders. The optimizer always prefers serving an order over leaving it unassigned, regardless of cost. It reports every order it cannot serve in the Unassigned panel.

Next step

Costs decide which vehicle serves which orders. Tags decide which vehicle is permitted to serve them. See Tags: vehicle-order compatibility.

FAQ

How do I make the optimizer use fewer vehicles?

Raise Fixed cost, which applies once if the vehicle is used at all. A high fixed cost concentrates work onto fewer vehicles, even at the price of longer routes. There is no minimize vehicles switch: the cost fields on each vehicle define what the optimizer minimizes. An unused vehicle's fixed cost is not charged.

What happens when no costs are set?

An empty cost field means 0. When no vehicle sets a cost per km or mile, per hour, or per load-km, the optimizer prices travel at 1 per km plus 1 per hour, which minimizes distance and time together. Alongside priced vehicles, an explicit 0 is honored: that kilometer is free.

What does the COST number in the header mean?

After an optimization, COST sums every used vehicle's charges under your own prices, in your own cost units. With no costs set it is the plan's total distance plus its total hours. COST does not price unassigned orders: the optimizer always prefers serving an order over leaving it unassigned.

Which cost values should I start with?

A workable starting point is a realistic fixed cost, what a vehicle-day costs you, and a rough per-km cost. Ratios matter more than absolute values: a fixed cost of 50 with distance cost 1 behaves the same as 5000 with 100. Add hourly cost where waiting time matters.

What is cost per load-km?

Cost per load-km is a rate that prices the carriage itself: every leg charges the load on board times the leg length, covering load-dependent fuel or refrigeration burn. With it set, the optimizer routes heavy cargo over shorter distances and delivers it early, so fewer load-kilometers accumulate even when the tour gets longer.

(c) 2024–2026 Routinghub LLC, a Delaware company. File number 7159503.