Route optimization
This article explains how to optimize the route of a tour, which strategies you can choose, and what to do when an optimization fails.
Introduction
Route optimization puts the stops of a tour in the order that gets the driver through them in the shortest time, following the strategy you choose. You can optimize a route in the tour details, when merging bookings into a tour and in Quick Edit.
Route optimization changes the order of stops within one tour. To build tours from bookings, see Create a Tour.
Optimize a route
Every optimization needs a Route start, the stop the driver visits first. The dashboard marks one for you, and you can change it. Optionally, mark a Route end, the stop the driver visits last. If the driver has already arrived at a stop, only that stop can be the Route start. In the tour details, the optimize button appears once the tour has at least three stops.
To optimize, choose a strategy in the menu of the optimize button, then click the button. The button shows the strategy currently selected. In the tour details, a window then opens where you choose the Route start and Route end. Click Confirm to start the optimization.
While the route is optimized
After you start an optimization, MotionTools calculates the new route. Small tours are usually done within seconds, tours with many stops will take longer. Keep the window open until the optimization is done: if you close it, the result isn't applied.
While the optimization runs, you can't start another one, and the stops are locked: you can't change the Route start or Route end, drag stops into a new order, or make other changes that affect the route. When the optimization is done, the new stop order is applied. In the tour details, Route optimized also appears.
Strategies
MotionTools offers three strategies. All of them minimize the driver's time on the road; they differ in how they treat pickups and drop-offs.
Optimize for time
This is the default strategy. The optimization engine orders the stops so that the driver spends as little time on the road as possible, and makes sure that each drop-off comes after its pickup. A drop-off doesn't need to follow its pickup directly; other stops can come in between.
All pickups first
The optimization engine puts all pickups before all drop-offs. It then orders the stops for the shortest time on the road.
Ignore stop types
The optimization engine orders the stops for the shortest time on the road without taking the stop types into account, so a drop-off can come before its pickup.
What the optimization takes into account
Vehicle type
The optimization calculates the route for the vehicle type selected for the tour, for example a bike or a van. The stop order, distance and duration you see after optimizing are calculated for that vehicle type.
When you merge bookings into a tour, the vehicle type is preset from the service, and you can change it under Capabilities. The created tour gets the route you see after optimizing. If you change the vehicle type after optimizing, the distance and duration update for the new vehicle type; optimize again to also get the best stop order for it. In the tour details and in Quick Edit, the optimization uses the vehicle type the tour already has. Learn more in Introduction Capabilities.
Time windows
All strategies take time windows into account. If a stop has an Earliest arrival and a Latest arrival, the optimization engine plans the route so that the driver reaches the stop within that time window, where possible. Sometimes the driver has to wait at a stop; the waiting time is shown on the stop after the optimization. A stop that can't be visited within its time window is highlighted. When you merge bookings into a tour, the window also shows The route contains stops that can’t be visited within time windows.
To optimize without time windows, turn on Ignore time windows on stops in the menu of the optimize button. The setting stays on for your later optimizations until you turn it off.
Why optimizations fail
If an optimization fails, a message appears in the window you're working in. These are the reasons and what to do about each.
The tour changed during the optimization
The message reads The tour changed while the route was being optimized. Please optimize it again. The tour or its stops changed during the optimization, for example because a change you had just made was still being saved, or because you changed the vehicle type when merging bookings. The result no longer fits the tour, so MotionTools discards it instead of applying it. Optimize the route again.
A stop or the tour can't be optimized
The message names a specific stop or the tour. The tour can't be optimized or saved as it is, for example because a colleague moved one of its stops to a different tour in the meantime. Fix what the message describes, then optimize again.
Another problem occurred
The message reads There was a problem optimizing the route. Please try again or contact support. Optimize the route again. If the problem persists, contact the support team.