
Picture this, You ordered a late night pizza. Half an hour later, a delivery boy shows up at your door, somehow having still five other hungry customers on the way to serve. Now, imagine a completely different picture, a hospital lab needs to rush for rare blood across the city. Every second counts here, but traffic lights, jams, weather conditions and last-minute diversions make the route unpredictable. Still, the blood gets to the required patient on time. Zooming out a little, imagine a logistic giant in another part of the world is quietly moving thousands of packages across different cities and states where vans are leaving multiple warehouses, each with different loads, drivers and deadlines. And yet, almost magically, the right boxes reach the right people at the right time every single day. Ever wondered what’s the common challenge faced by these completely different looking problems? Its Vehicle Routing Problem (VRP). While it sounds like ‘just math’, it’s the math that keeps dinner hot, medicine moving, and global commerce running.
At first glance, it might sound straightforward: you have a bunch of customers waiting and a fleet of vehicles ready to serve them. But the real challenge is? Finding the smartest set of routes that ensures every delivery gets made while keeping the time, cost and many such real world constraints in mind. In some cases weather conditions, traffic jams, noise ordinances, and road conditions are even kept in mind to ensure safe arrivals. But here’s a catch, Even with just a handful of vehicles and stops, the number of possible route combinations explodes into the millions. And in traffic, timely conditions, or unpredicted demands the problems go from hard to nearly impossible to solve perfectly in real time. It's not just about the elegance in math which makes this nearly impossible looking problem solvable, but also about trust that in emergency situations, you do get blood on time; in heavy rains, when the groceries are out of stock, you do get it within a few minutes. And VRP makes it possible.
Being technical, the Vehicle Routing Problem comes directly from a Mathematical domain known as Optimization Theory which deals with finding the “best” solution to a problem under given constraints. Within optimization, it comes from the domain of operations research (OR) which is the science of decision-making for logistics, supply chains, scheduling, and planning. VRP is a generalization to another well-known mathematical optimization problem, Travelling Salesman Problem (TSP) where a single vehicle driver must visit a list of stops in the shortest possible route. TSP and VRP both are considered to be NP-hard problems, meaning they belong to a class of problems for which no known algorithm can guarantee an exact solution in reasonable time as the problem size grows. So how does VRP find a solution to it? It cleverly mixes different strategies, from mathematical optimization techniques to what is called heuristics and metaheuristics, which don’t always give the perfect solution, but can come up with solutions that are ‘good enough’ to work in the real world, and fast enough to matter.
Imagine you’re running a small grocery-delivery startup. You’ve got a handful of vans, each with limited space in the back. You have thousands of orders across the city; one customer wants just a bag of veggies, another wants a week’s worth of supplies. Every van can only carry so much weight or volume before it’s full, and you can’t afford to send out a half-empty vehicle. You are in a challenge here. You have to decide which customers go into which van’s route, and in what order, so that every order is delivered and no van is overloaded. Send out too many vans and your costs skyrocket. Pack them poorly and deliveries are delayed. Strike the right balance, and suddenly you’ve stretched your fleet and fuel far further than your budgets.
Technically speaking this is the Capacitated Vehicle Routing Problem or CVRP. It extends the basic VRP by adding a capacity constraint where each vehicle can only serve customers up to a fixed limit of weight or volume. The goal here is to minimize the overall travel cost (and/or time) but now you also need to respect those physical limits. This makes CVRP one of the most widely studied VRP variants and the first real step from a neat mathematical problem into the messy reality of running deliveries.
Real world businesses don’t run based on these neat and tidy mathematical versions. Each and every problem introduces new conditions and constraints, and with them a new incarnation of VRP.
For example, your vans can’t just show up whenever they want. Some consumers expect groceries between 6–7 PM, while others only accept deliveries after office hours. Suddenly, it’s not just about “what fits in the van”, it's about “when the van can show up”. This is an example of CVRP with time windows.
A successful startup may have two or three centers in a city. Now the question isn’t merely “Which customers does this van serve?” but also “Which warehouse should the van even depart from?”. It's an example of multiple depot versions of VRP.
Take an example of a heterogeneous fleet. Not every vehicle is built the same. A scooty is cheap but can’t carry a fridge. A small van balances everything, while a big truck takes lower cost per delivery but struggles in dense urban streets. Choosing the right proportion of vehicles becomes part of the problem.
If we take Electric Vehicles (EVs) into account, they are great for cutting fuel costs and reducing emissions, but they come with their own constraints. They have limited range and limited charging stations. Now we need to plan routes that don’t leave the vehicle out of fuel in the travel.
And we haven’t touched traffic, weather, and geography. Roads are jammed. Bridges close at certain times. A ten-minute trip on a map can easily turn into forty minutes in practice. Each of these layers make the simple VRP into a constantly shifting problem. The maths doesn’t just get harder, the tradeoffs get messier. Should you prioritize speed or cost? Should you use a van or a truck? The solution to these problems aren’t a one-size-fits-all solution, but a trade-off determined by business goals and real-world constraints.
Until now, we have assumed that the world behaves fairly, i.e. the customer has their demand fixed, we know about the travel times and every delivery goes according to the plan. But in reality, it rarely works this way.
A customer cancels their order at the last minute. A sudden traffic jam doubles the travel time on a route. In these moments, the “perfect plan” you built in the morning fails to work till noon. This is where stochastic VRP comes in. Instead of treating the world as deterministic, stochastic models assume uncertainty in needs, times and all those parameters treated as known or deterministic. They plan not just for one neat scenario, but for many possible futures. The customer demands might not be a fixed number but be a probability distribution. The travel times of vehicles could vary depending upon the traffic (and/or) weather conditions. Even whether a customer is available might be unpredictable.
The challenge is no longer just “What’s the best set of routes?” but “What’s the best strategy when the future itself is unpredictable?”
The stochastic VRP comes at a cost. It's even harder to solve than the classical versions. Companies rely on a mix of simulation, scenario planning, and adaptive algorithms that can reroute the vehicles in real time. Recall the example of the hospital rushing a blood unit across town. In that case, the solution depends not on a fixed plan, but on the system’s ability to adapt to changing conditions, minute by minute.
At its heart, the Vehicle Routing Problem is an Operations Research challenge of constraints, tradeoffs and possibilities. We take deep methods of OR which are already being mathematically researched and turn them into practical tools that businesses can actually use every day.
Instead of providing a single “perfect” answer, we build solutions that balance mathematical rigor with real-world flexibility. We use optimization models to capture the hard rules like vehicle capacities, customer deadlines and depot assignments. We apply heuristics and metaheuristics to cut through the exponential complexity, finding high-quality routes quickly. And when uncertainty comes in, we extend our models to stochastic and adaptive frameworks that plan for the unexpected, not just for the ideal.
What does this look like in practice? It might be a software providing businesses to plan and visually look at the best possible routes. It might be to ensure a hospital network can move critical supplies even when demand is unpredictable. Or enable an e-commerce startup to compete with the giants by delivering faster and more reliably.