Inferensys

Glossary

Vehicle Routing Problem (VRP)

A combinatorial optimization challenge focused on determining the optimal set of routes for a fleet of vehicles to service a set of customers at minimal cost.
Developer reviewing LLM cost optimization spreadsheet on laptop, calculator and coffee on desk, casual finance-technical moment.
COMBINATORIAL OPTIMIZATION

What is Vehicle Routing Problem (VRP)?

The Vehicle Routing Problem (VRP) is a combinatorial optimization challenge that determines the optimal set of routes for a fleet of vehicles to service a geographically dispersed set of customers at minimal cost.

The Vehicle Routing Problem (VRP) is a generalization of the Traveling Salesman Problem (TSP) where a fleet of vehicles with finite capacity must service a set of customers, each with a specific demand. The objective is to minimize total transportation cost—typically distance, time, or number of vehicles—while satisfying constraints like vehicle capacity, time windows, and route duration limits.

Solving VRP requires Mixed-Integer Linear Programming (MILP) for exact solutions on small instances, or metaheuristics like Genetic Algorithms and Simulated Annealing for large-scale, real-world logistics. In autonomous supply chains, VRP solvers integrate with Dynamic Route Optimization engines to recompute plans in real-time as traffic, weather, and order volumes shift.

PROBLEM FORMULATIONS

Key Variants of the VRP

The Vehicle Routing Problem is not a monolith. It is a family of combinatorial optimization problems, each adding real-world operational constraints to the base model. Understanding these variants is critical for selecting the right solver architecture.

01

Capacitated VRP (CVRP)

The foundational variant where each vehicle has a maximum carrying capacity (weight, volume, or pallets). The objective is to service all customers while ensuring the total demand on any single route does not exceed the vehicle's limit.

  • Constraint: Sum of customer demands on a route ≤ vehicle capacity.
  • Real-world example: A beverage distributor with trucks holding 400 crates each, servicing 50 retail locations.
  • Solver approach: Typically tackled with branch-and-cut algorithms or column generation for exact solutions on moderate instances.
1959
First formalized by Dantzig & Ramser
02

VRP with Time Windows (VRPTW)

Introduces a hard or soft time interval during which each customer must be serviced. Vehicles arriving early must wait; late arrivals incur penalties or are forbidden.

  • Hard time windows: Delivery strictly within [e_i, l_i].
  • Soft time windows: Late delivery allowed but penalized in the objective function.
  • Real-world example: Grocery distribution to supermarkets with strict 5 AM–7 AM receiving slots to avoid daytime congestion.
  • Impact: Transforms the problem from purely spatial to spatio-temporal, significantly increasing complexity. Often solved with metaheuristics like Adaptive Large Neighborhood Search (ALNS).
Solomon
Standard benchmark instance set
03

VRP with Pickup and Delivery (VRPPD)

Generalizes the problem where goods must be transported from a pickup location to a delivery location, not just from a central depot. A critical pairing constraint links the pickup and delivery nodes.

  • Precedence constraint: Pickup must occur before delivery on the same vehicle.
  • Real-world example: A ride-hailing service (Uber/Lyft) matching drivers to riders, or a courier service moving parcels between businesses.
  • Dial-a-Ride Problem (DARP): A specialized VRPPD with added user inconvenience constraints like maximum ride time and waiting time.
NP-Hard
Computational complexity class
04

Heterogeneous Fleet VRP (HFVRP)

Moves beyond a uniform fleet to model a mixed set of vehicles with different capacities, fixed costs, and variable operating costs per kilometer. The solver must simultaneously select the optimal fleet composition and routing.

  • Decision variables: Vehicle type assignment in addition to routing and sequencing.
  • Real-world example: A logistics provider with a mix of small vans (1.5t), medium trucks (7.5t), and large articulated lorries (24t) must decide which vehicle type serves which cluster of customers.
  • Cost structure: Balances the lower per-unit cost of large vehicles against their higher fixed deployment cost and restricted access to urban areas.
Fixed + Variable
Dual cost objective function
05

Stochastic VRP (SVRP)

Injects uncertainty into one or more problem parameters, which are modeled as random variables with known probability distributions. The goal is to find a robust or expectation-minimizing solution.

  • Stochastic demands: Customer demand is unknown until the vehicle arrives.
  • Stochastic travel times: Traffic and service times are probabilistic.
  • Stochastic customers: The presence of a customer requiring service is a random event.
  • Solution paradigm: Often solved via a priori optimization (build a planned route, execute with recourse actions like returning to the depot if capacity is exceeded) or Markov Decision Processes for dynamic re-optimization.
Recourse Action
Corrective action upon failure
06

Open VRP (OVRP)

Relaxes the requirement for vehicles to return to the depot after completing deliveries. Routes terminate at the final customer, making it a Hamiltonian path problem rather than a cycle.

  • Use case: A third-party logistics (3PL) provider that does not own the vehicles; drivers finish their route and go home, or a newspaper delivery route that ends after the last drop.
  • Real-world example: A contracted courier delivering packages from a central sortation center using personal vehicles, ending the route at their residence.
  • Computational note: While seemingly simpler, OVRP is still NP-hard and requires adapted heuristics that do not penalize the open return leg.
Hamiltonian Path
Underlying graph structure
VEHICLE ROUTING PROBLEM INSIGHTS

Frequently Asked Questions

Explore the core concepts, algorithms, and real-world applications of the Vehicle Routing Problem, a foundational challenge in prescriptive analytics and autonomous supply chain intelligence.

The Vehicle Routing Problem (VRP) is a combinatorial optimization challenge that seeks to determine the optimal set of routes for a fleet of vehicles to service a geographically dispersed set of customers at the minimal possible cost. It generalizes the classic Traveling Salesman Problem (TSP) by introducing multiple vehicles and capacity constraints. The system works by taking a set of inputs—a depot location, a fleet of vehicles with defined capacities, and a set of customer orders with specific demands and time windows—and then applying an algorithm to find a solution. The objective function typically minimizes total distance traveled, total transit time, or the number of vehicles used, while strictly adhering to constraints such as vehicle load limits and delivery time windows. Modern solvers use Mixed-Integer Linear Programming (MILP) for exact solutions on small instances or metaheuristics like Genetic Algorithms and Simulated Annealing for large-scale, real-world problems.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.