optimisation engine

optimisation engine

In-Route Charging

In-route charging means putting a charging stop into a delivery round, at a public or private charging point, so an electric lorry can do work that is too long for a single charge. Optrak puts those stops in while it is building the round, alongside the drops, working out the best place to stop and charge — weighing what the electricity costs there, how far off the route it is, and how much charge is needed to finish the work and get back to the depot.

Last updated: 2026-08-11

Key Capabilities

  • Charging stops go in while the round is being built, not in a separate pass afterwards
  • It charges only what is needed — the smallest top-up that finishes the job, plus the safety margin you set, rather than always filling to 80%
  • Where to stop weighs the price of the electricity, how long the stop takes, how far off the route it is, and how much charge the stretches either side will use
  • Links to public and private charging networks where the network offers a way to connect
  • Booking requests raised automatically where the network allows it
  • Charging at the depot and charging on the road are weighed against each other as one decision

Why “Depot Charging Only” Leaves Work on Diesel

Electric HGV work splits roughly in two. There are town and regional rounds that come back to the depot every night, where charging at the depot covers the day and the vehicles and charging points available today are up to the job. And there is long-haul and high-mileage regional work where a single shift is more than the vehicle’s range — which has always been the “electric isn’t ready yet” half.

Planning software that only knows about charging at the depot leaves that second half on diesel by default. The cautious dispatcher gives the long rounds to diesel lorries and keeps the electric ones on shorter work that sits well inside a single charge.

That gets the economics backwards. The per-mile saving of depot-charged electricity over diesel applies to every mile the truck runs, so the more miles an EV covers the more diesel it displaces and the faster its capital cost is earned back. The largest savings live on the long rounds, not the short ones — confining EVs to short work leaves both the savings and the vehicle’s earning capacity on the table, and any sustainability commitment to a 3PL customer or a corporate scope-3 target is harder to hit when the long rounds are excluded entirely. The cost is doubled: capital tied up in EVs that aren’t doing their full share, and diesel running on rounds an EV with one charge stop could have done.

Long rounds get left on diesel because of range, not economics — and that distinction matters, because the per-mile arithmetic does shift once a round needs charging away from the depot. An in-route charge is always dearer per kWh than depot charging, the stop itself consumes time, and an occupied charger risks stranding the vehicle. So the favourable case for EVs holds right up to a genuine crossover: long rounds are the most attractive electric work until external charging cost, dwell time, and stranding risk overtake the diesel they would displace. That crossover is a calculation, not a blanket “too long for an EV” — and it’s exactly the calculation a depot-only planner can’t make.

In-route charging is what makes that calculation available. The question for operators stops being “can I run an EV on this round” and becomes “can I run an EV on this round with a planned charging stop that fits the schedule and the budget — and does it still beat diesel once it does.”

The Optrak Model

Optrak puts charging stops in while it is building the round, rather than checking afterwards whether one was needed. When a round it is considering would take the battery below the safety margin you have set before the work is done, Optrak puts a charging stop in at the place that costs least overall — weighing the detour to a suitable charger, what the electricity costs there, how long the stop takes, and what it does to the rest of the schedule. Sometimes that is a charger beside a break the driver has to take anyway; often it is simply the one nearest the route, taken while the battery is still well up.

Optrak charges only what is needed. Filling to 80% when 60% would finish the round wastes both time and money at rapid-charging prices, so it aims for the smallest charge that does the job, plus the safety margin you have set. That matters more and more as rapid charging moves to prices that vary by time of day.

Battery charge against time of day for one electric lorry in Optrak, from 07:00 to 15:26: the charge starts at 188 kWh of a 190 kWh battery and falls with each delivery, rises once at a public charger in the afternoon, and ends at 6 kWh back at the depot.

One lorry’s battery through a day of nine deliveries. The 19-minute stop at a public charger puts in enough to finish the round, and the lorry gets back with 6 kWh left.

Technical Detail

Where the Stop Goes

Placing the charging stop is done by specialist methods, while the round is being built: when a round under consideration would take the battery below the safety margin, a charging stop goes in there and then rather than being checked for afterwards. Four things decide where:

  • How the charge falls across the round, worked out from the energy each stretch is expected to use (see EV modelling). Without a charge, the battery drops stretch by stretch until it would hit the safety margin; that point is the latest a charge can go in. The stop has to be at or before it — the three points below decide where within that window it lands.
  • What is available at each charger, and how fast it is. A 350 kW rapid charger changes the arithmetic of a stop quite differently from a 22 kW one.
  • What the electricity costs there, including prices that change through the day. The optimiser weighs the price per unit against the time the stop takes.
  • How big is the detour - the bigger the detour the more time and charge it takes.

Connecting to Charging Networks

Optrak can connect to public and private charging networks where the network offers a way to do so. The coverage grows as more charging operators able to handle electric HGVs come on stream. The UK Zero Emission HGV and Infrastructure Demonstrator (ZEHID) programme is a notable contributor, building charging sites for heavy vehicles at motorway and depot locations.

Where a network allows booking that way, Optrak can reserve the slot as part of the plan, which reduces the risk of arriving to find the charger in use.

Depot Charging and In-Route Charging Together

Coming back to the depot allows a charge mid-shift — a full one, or more often a partial one. That is what makes a second trip out possible, whole or in part. On long-distance work, where charging at the depot and charging on the road are both open to it, the optimiser weighs the cost of the one against the cost and the time of the other, as a single decision.

Worked Example: One Round, One Charge, Two Places to Put It

An electric HGV with 250 kWh of usable battery above its safety reserve — in practice a working range of roughly 180 miles under load. The round is ten drops over about 198 miles, returning to the depot, with the driver’s legally required break taken after the fifth drop. That is more than one charge will do, so the round needs exactly one charge on the road to get home.

The question is not whether to charge but where to put the one charge — and there is more freedom in that than it looks. Any position works so long as the battery never falls below the safety reserve, the dashed red line on the charts below. It is drawn at 0% because the chart measures charge above the reserve rather than above empty: the line has to stay above it, and beyond that the timing is open.

Charging early is cheap here. A rapid charger sits beside the route at drop four, a four-mile detour, while the battery is still around 56%:

State-of-charge against time of day for the ten-drop round, charged early. The battery starts full at 08:00 and falls step by step through the morning drops to about 56% at drop four, where a four-mile detour reaches a roadside charger; a 63 kWh charge — bracketed by two teal-ringed circles for plug-in and unplug — lifts it back to about 80%, after which the line descends gently through the afternoon, past the flat driver-break segment around midday, to about 12% on return to the depot. The line stays well clear of the dashed red safety-reserve line at 0% all day.

A 63 kWh top-up restores enough to finish the round with margin to spare, and the truck spends the whole day comfortably clear of the reserve.

Charging late also works, but costs more. Leave it any later and the only charger near the back of the round is twelve miles off-route at drop nine, reached with the battery already run down to about 14%:

The same ten-drop round charged late. The battery starts full and descends steadily all day — through the flat driver-break segment around midday and on down into the low teens, the delivery markers turning orange as charge runs down — reaching about 14% at drop nine. Only there does a charger come within reach, at the cost of a twelve-mile detour that drops the battery to about 11% before a 74 kWh charge lifts it to about 40%; the line then falls to about 12% on return. It never crosses the dashed red safety-reserve line, but runs much closer to it than the early plan.

This plan still works — the line never crosses the reserve — but it runs the battery down through the afternoon and pays a twelve-mile diversion instead of four. Both plans end the day at the same 12%; the difference is entirely in when the charge is taken and which charger that puts within reach.

That is the point. Because the only firm rule is the reserve line, the optimiser is free to put the single charge wherever the total of detour, price, time taken and risk of being stranded comes out lowest — here, early, for a third of the diversion. A fixed “charge at 20%” rule would have forced the expensive late option. Software that only knows about depot charging can’t consider the charge at all, and puts the round on diesel. Software that checks the round afterwards can confirm it won’t run dry, but can’t weigh early against late. Putting the charge in while the round is being built is what turns “when do we charge” from a guess into a cost decision.

A planner who can’t work charging into the round either leaves the long ones on diesel (the cautious way, and the electric vehicle is under-used) or gives them to electric vehicles and finds out about the range on the day (the optimistic way, and the vehicle is stranded). There is no neutral default.

How This Compares

Most routing and transport software that handles electric vehicles treats charging as a check after the round is built, or as a separate exercise altogether. It is the same criticism the EV modelling page makes: a standalone planner works out whether a round is possible — charging included — after the main system has already built it, so where the charge goes is a check rather than something being planned. Optrak puts charging stops in as part of the same search that builds the round, using the same energy figures as the rest of the planning.

A good deal of routing software has less developed electric-vehicle modelling than this at the time of writing; charging worked into the round as it is built isn’t something their published material describes.

How much this matters varies. It only matters operationally to fleets running rounds that genuinely go beyond what a depot charge will do, and the ways of connecting to charging networks are still settling down. As the UK charging network for electric lorries grows — ZEHID and what follows it — it moves from an unusual case to an everyday planning concern for anyone with regional and longer-distance work.

Frequently Asked Questions

When does an e-HGV need an in-route charge instead of just depot charging?

Whenever the round is longer than the vehicle can do on one charge in the conditions expected. On 7.5t and 18t lorries that usually means multi-drop town or regional rounds beyond about 200 miles, but where the line falls depends on the load, the terrain, the weather, and the particular vehicle’s battery and how much it uses. Optrak’s energy model works it out for each trip rather than against a fixed range figure.

How does Optrak choose where to charge?

It looks at the charging points available along the workable versions of the round and chooses on three things: how far off the best route it is, whether the charger is free and quick enough for the time available, and the total cost — what the electricity costs plus what the stop does to the rest of the round. You can override that with your own preferences for particular networks or sites.

Does Optrak book the charger automatically?

Where the charging network allows booking through a connection to its system, Optrak can raise the booking request as part of the plan. Where a network has no such facility, Optrak produces a plan you can use to confirm availability yourself. This is spreading as more operators of electric-lorry charging open their booking up in this way.

What if the charging point is occupied when the driver gets there?

That is a risk planning alone can’t remove. What helps is on your side: leave a safety margin on the charge, favour networks that guarantee a reservation, and re-plan to push an alternative stop into the trip if the first one falls through. Booking ahead is what turns this from a recurring planning problem into a rare exception.

Can in-route charging be combined with overnight depot charging?

Yes. Optrak charges at the depot by default, and only puts a stop into the round when the work can’t be finished on the charge the vehicle starts the day with. On long-distance work, where both are open to it, it weighs the cost of charging overnight at the depot against the cost and the time of charging on the road.

How is this different from a standalone EV route planner?

A standalone electric-vehicle planner can work out charging stops, but it is a separate exercise: the round gets built first, then checked. Optrak puts charging stops in while the round is being built, alongside the drops, using the same energy figures worked out for that round. It is the same difference the EV modelling page makes about energy: charging is one of the things the optimiser is working to as it goes, not something confirmed at the end.

Related

Technical Summary

Optrak places in-route charging stops as constraints inside the route-construction loop, alongside delivery stops, against the per-leg energy use produced by the EV model and the cost data for each candidate charging location. Specialist heuristics place the stops within route construction; placement considers the state-of-charge profile, charger power rating and availability, charging tariff including time-of-use pricing, and the energy the legs either side of the stop will use. Charge amount targets the minimum needed plus a configurable safety margin rather than topping up to a default percentage. Network integrations exist for public and private charging operators where APIs are available; where the network supports it, Optrak generates booking requests as part of the plan. Depot charging and in-route charging are optimised together for long-distance work where both are feasible. The architectural distinction from post-route feasibility checks — where a standalone EV planner validates charging after routing — is that charging-stop placement happens during route construction, not afterwards — a route that breaches state-of-charge cannot survive the optimiser’s exploration phase. The operational distinction from depot-charging-only planning is that long rounds become EV-feasible with one or more planned charges, rather than defaulting to diesel.

See Optrak on Your Own Routes

Book a demo and we'll model your fleet, depots and constraints — and show the savings on real data.