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 given set of customers, minimizing total cost while satisfying operational constraints.
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 fundamental combinatorial optimization challenge focused on determining the optimal set of routes for a fleet of vehicles to service a geographically dispersed set of customers, minimizing total cost while satisfying operational constraints.

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 given set of customers, minimizing total cost while satisfying operational constraints. A generalization of the classic Traveling Salesman Problem, VRP seeks to answer: given a depot, a fleet, and customer demand, what is the most cost-effective sequence of stops for each vehicle?

Core constraints typically include vehicle capacity limits, customer service time windows, and maximum route duration. Solving VRP involves navigating a vast solution space where exact methods like Mixed-Integer Linear Programming (MILP) guarantee optimality for small instances, while metaheuristics such as Adaptive Large Neighborhood Search (ALNS) and Genetic Algorithms find near-optimal solutions for real-world, large-scale logistics networks.

CORE FORMULATIONS

Key Variants of the Vehicle Routing Problem

The Vehicle Routing Problem (VRP) is not a single problem but a family of combinatorial optimization challenges. Each variant introduces specific real-world constraints that dramatically alter the solution strategy and computational complexity.

01

Capacitated VRP (CVRP)

The foundational extension of the standard VRP where each vehicle has a finite carrying capacity (weight, volume, or pallet count). The total demand of customers assigned to a single route cannot exceed the vehicle's capacity constraint. This transforms the problem from a pure routing challenge into a simultaneous assignment and routing problem, where the solver must cluster customers into feasible groups before sequencing them. CVRP is the baseline for most real-world logistics, as unlimited capacity is never a practical assumption.

NP-Hard
Computational Complexity
02

VRP with Time Windows (VRPTW)

Introduces a hard or soft temporal constraint where each customer must be serviced within a predefined interval. A vehicle arriving early must wait, while late arrivals incur a penalty or are forbidden. This adds a scheduling dimension to the spatial routing problem, requiring solvers to balance route compactness with temporal feasibility. VRPTW is critical for urban distribution, grocery delivery, and any operation governed by strict appointment slots. The tightness of time windows directly impacts fleet utilization.

Hard & Soft
Constraint Types
03

Pickup and Delivery Problem (PDP)

Models the transportation of goods or passengers between paired origin-destination locations. A single request consists of a pickup node and a corresponding delivery node, linked by a precedence constraint—the pickup must be visited before the delivery. This is the canonical model for ride-hailing services, courier operations, and less-than-truckload (LTL) freight consolidation. The pairing constraint fundamentally changes the solution structure, as vehicles carry inventory that must be unloaded at a specific future stop.

Paired Nodes
Core Structure
04

Heterogeneous Fleet VRP (HFVRP)

Generalizes the problem to a mixed fleet of vehicles with varying capacities, fixed costs, variable operating costs, and specialized equipment (e.g., refrigeration, lift gates). The solver must simultaneously decide which vehicle type to assign to each route in addition to the routing and sequencing decisions. This reflects the reality of most logistics operators who manage a diverse asset pool. The trade-off between using a small number of large vehicles versus many smaller ones becomes a central optimization variable.

Fleet Mix
Decision Variable
05

Stochastic VRP (SVRP)

Addresses the reality that input parameters are random variables, not deterministic values. Customer demand, travel times, or even customer presence may be unknown at the time of planning and are modeled with probability distributions. The goal shifts from finding a single optimal route to designing a robust or recourse-based strategy. A common approach is two-stage stochastic programming, where a planned route is executed, and a corrective recourse action (e.g., returning to the depot for restocking) is triggered if a failure occurs. This is essential for modeling operational uncertainty.

Probabilistic
Input Data Type
06

Dynamic VRP (DVRP)

A real-time variant where new orders arrive continuously during the execution of the plan, requiring the routes to be updated on the fly. Unlike static VRP, where all information is known a priori, DVRP requires an online algorithm that reacts to streaming events. This is the operational model for modern on-demand delivery platforms and emergency service dispatch. The key performance metric shifts from static optimality to the quality of real-time decision-making under partial information, often evaluated through competitive ratio analysis.

Online
Algorithm Class
VEHICLE ROUTING PROBLEM

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the Vehicle Routing Problem, its variants, and the algorithms used to solve it.

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, minimizing total cost while satisfying operational constraints. The problem was first introduced by Dantzig and Ramser in 1959 as a generalization of the Traveling Salesman Problem (TSP).

At its core, a VRP is defined on a graph where nodes represent a depot and customer locations, and edges represent travel paths with associated costs (distance, time, or monetary). The objective function typically minimizes:

  • Total distance traveled
  • Number of vehicles used
  • Total route duration
  • A weighted combination of these factors

Key constraints that define the problem space include:

  • Capacity constraints: Each vehicle has a finite carrying capacity (defining the Capacitated VRP variant)
  • Time windows: Deliveries must occur within specified intervals
  • Route duration limits: Maximum driving time per vehicle
  • Precedence constraints: Certain customers must be visited before others

The problem is NP-hard, meaning the computational complexity grows exponentially with the number of customers. A 100-customer VRP has more possible solutions than atoms in the observable universe, making exact solution methods impractical for real-world instances. Modern solvers like OR-Tools and Gurobi combine exact methods with metaheuristics to find near-optimal solutions in acceptable timeframes.

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.