Skip to content
Header Secondary Logo
Header Secondary Logo

How Algorithms Work to Solve the Problems of Truck Routing

How Algorithms Work to Solve the Problems of Truck Routing

Share

Explore this routing solution

How Algorithms Work to Solve the Problems of Truck Routing

16 Jun 2021

Jim Endres
Data on screen card image

We often mention the "clever algorithms" that power Aptean Routing & Scheduling Paragon Edition software, but this time we're going to explain what they are, what they do and why they're so important to truck routing.

Don't be intimidated. Dr. Matthias Winkenbach, Director of the MIT Megacity Logistics Lab and a Research Associate at the MIT Center for Transportation & Logistics (MIT CTL), kindly agreed to guide us through this thicket of specialized theory. He has no specific knowledge of Aptean's software and his role as an academic prevents him from advocating for any company’s products. But he sure as heck knows about why algorithms are so crucial to route optimization.

Dr. Winkenbach explains that the trouble with truck routing is two-fold—it's complex and stochastic. Before you go running for a dictionary, let me explain: stochastic is a term scientists use for uncertain things that may be analyzed statistically, but when it comes to prediction, 100% accuracy is almost impossible.

This is a huge problem. The first challenge of truck routing is that it's mind-bendingly complex. However, that complexity could, in theory, be tamed by a sufficiently powerful computer fed with enough of the right data (even though that remains a far-off prospect).

The trickier aspect is that what happens once trucks hit the road is uncertain. All the smart math or data-handling bandwidth in the world is never going to get you where you need to be in terms of route optimization. Luckily, algorithms are ideally suited to deal with both the complexity and the uncertainty of truck routing.

What Is an Algorithm?

First off, it's important to understand that an algorithm doesn't have to be an equation or a piece of computer code. It's simply a process or set of rules to be followed to complete a task.

Breakfast, for instance, can be broken down into step-by-step, if-then directions such as "if you're making oatmeal, then put the kettle on," or "if you're making an omelet, get the eggs out of the fridge." You're not taking eggs out if you're making oatmeal or putting the kettle on to make an omelet. But, if you find you're out of eggs, you might decide to make oatmeal. Or if it's a warm day, you might switch to a bowl of cereal.

Those last two if-then logic steps might seem entirely self-evident, but not to a computer. They are the sort of decisions easily made by humans that would be almost impossible to express as mathematical equations. That's the beauty of algorithms—they're human-directed sets of instructions broken down into logical steps that computers can then follow.

Here's an example of how this works in truck routing. Suppose you wanted to gauge how much local traffic conditions were likely to affect delivery times on a particular route. The pure math approach would require historical road-speed information from every yard of road within the operation area—an insane amount of data that would take days or months to process. But a human route planner knows where the typical bottlenecks are and focuses data-gathering at those spots. That way, there’s no need to crunch vast amounts of barely relevant data. By applying common sense, you reduce the complexity and the size of the task. This is called a heuristic approach—a practical problem-solving strategy that exploits some of the human knowledge you have about the problem.

This practical approach also helps reduce the level of unpredictability in routing. The congestion around an event at a city's arena might vary wildly, depending on whether it's the sort attended by environmental activists riding bicycles or teenagers who need to hang around for a lift from an adult. It would take a genius to program a computer to predict the difference. But most humans could easily arrive at this conclusion. And then include it in an algorithm.

No One Right Answer

The upshot of all this is that no algorithm arrives at an absolutely perfect solution, and different software companies use different algorithms with different approaches.

"A good algorithm will strike a balance between finding a good solution and not taking too much time," says Dr. Winkenbach. "There's an infinite number of algorithms that you could use, with the choice depending on how much time you have, what are your computational resources, how often you need to do it, and so on."

It boils down to this: Do you want an algorithm that guarantees an optimal solution but in a million years, or do you want to go with a practical approach that may not guarantee the perfect solution but gives you a good solution in a reasonable amount of time? "That’s the real-world approach,” he explains. “With truck routing, you’re doing it daily, so you only have limited time to come up with a route plan that is reasonably good.”

Dr. Winkenbach says the main thing to remember about truck routing is just how difficult it is. “There are so many factors! You need algorithms to do it for you at scale,” he says. Using the human brain's unique strengths, which easily detects patterns that indicate a sub-optimal result, and by mimicking the brain’s logic, you can design better algorithms.

“What we have here is the strength of the human brain combined with the strength of the computer. The human brain is not made to optimize 120 delivery stops, but it is very good at looking at a route plan and figuring out whether it’s a good one or not, even without any mathematical knowledge.”

For example, a human planner might see that a suggested route plan minimized travel distances between drop-off points, but failed to cluster together deliveries within the same mall or industrial complex. Another example might be a route that stuck to the letter when it comes to a customer’s dock opening hours, but the planner knows that customer is usually open for receiving an hour earlier.

Algorithms are, in essence, the way that human knowledge is translated into computer code so that computers can, in turn, improve human activities. “Truck routing is a great example,” says Dr. Winkenbach.

Turning Theory Into Practical, Money-Saving Strategies

This has been a little bit of the theory behind the “clever” algorithms that sit within Aptean Routing & Scheduling solutions. In the end, algorithms are one of the many tools we offer our customers to enable a loop of continuous improvement in their delivery operations.

At the root, continuous improvement comes from constructing a plan based on what you already know, then executing that plan, then comparing planned vs. actual. That analysis allows you to gather more information—to know more—and identify opportunities to improve the plan. Which you then execute, analyze and improve again. And on and on. It takes a human empowered by a computer to recognize whether tweaks to the plan are worth it. A suggested change might cut five miles from a route, but might actually cause a driver to cross an interstate so many times there are bound to be delays. In that case, the benefits of saving miles would be lost. A planner would be able to spot that immediately and reject the proposed change.

Driver debriefs, in particular, offer valuable, practical insights into where there are real-world problems that could be avoided, or opportunities such as newly extended receiving hours at a customer site. Those can then be translated into algorithms that govern the creation of new delivery routes.

Algorithms form the interface between humans and software that reflect the knowledge gathered every day on the road, allowing improvements to be made, continuously, without wrangling with code. They’re part of Aptean’s pragmatic approach to continuous route planning improvement. We help you work with the data constantly coming from your delivery operations, allowing to choose the changes you want to make, assess the results, then improve some more.

Do you like the idea of an algorithm-powered route planning system that gets smarter and smarter, while cutting 10-30% off your fleet operating costs? Contact us to find out more about our truck routing software.

Ready to start transforming your business?

We've got the specialized TMS solutions you need to conquer your industry challenges.

Paragon Lead Gen Dashboard