The Capacitated Vehicle Routing Problem (CVRP) is a variant of the Vehicle Routing Problem where a homogeneous fleet of vehicles, each with an identical maximum carrying capacity, must service a set of customers with known demands. The objective is to find a set of minimum-cost routes, originating and terminating at a central depot, such that the total demand of customers assigned to any single route does not exceed the vehicle's capacity constraint.
Glossary
Capacitated VRP (CVRP)

What is Capacitated VRP (CVRP)?
The Capacitated Vehicle Routing Problem (CVRP) is a combinatorial optimization challenge that extends the standard VRP by imposing a finite carrying capacity on each vehicle, making it a foundational model for real-world logistics.
This binding capacity constraint transforms the problem from a pure spatial assignment into a complex bin-packing and routing hybrid. Solving a CVRP requires simultaneously deciding how to cluster customer demands into feasible vehicle loads and determining the optimal Hamiltonian path through each cluster. Exact solutions via Mixed-Integer Linear Programming (MILP) are computationally prohibitive for large instances, making the CVRP a primary benchmark for metaheuristics like Adaptive Large Neighborhood Search (ALNS) and Genetic Algorithms.
Core Characteristics of CVRP
The Capacitated Vehicle Routing Problem (CVRP) extends the standard VRP by introducing a binding vehicle capacity constraint, making it a fundamental model for real-world distribution where payload limits dictate route feasibility.
The Capacity Constraint
The defining feature of CVRP is that each vehicle k has a finite, non-negative capacity Q. The sum of customer demands qᵢ on any single route cannot exceed Q. This transforms the problem from a pure spatial challenge into a bin-packing and routing hybrid. A solution is infeasible if a route's total demand surpasses the vehicle's limit, regardless of how optimal the travel sequence is. This constraint is typically modeled as a knapsack-style restriction within the route construction logic.
Mathematical Formulation
CVRP is formally defined on a complete graph G = (V, A) where V = {0, 1, ..., n} (0 is the depot). Each customer i has a non-negative demand dᵢ. The objective is to find a set of K Hamiltonian cycles minimizing total travel cost, subject to:
- Route continuity: Each route starts and ends at the depot.
- Visit uniqueness: Each customer is visited exactly once.
- Capacity feasibility: For any route R, the sum of dᵢ for all i in R ≤ Q. This is an NP-hard problem, solvable exactly only for small instances via Mixed-Integer Linear Programming (MILP).
Two-Index Vehicle Flow Model
A common exact formulation uses binary variables xᵢⱼ equal to 1 if a vehicle travels directly from i to j. The capacity constraint is enforced using subtour elimination constraints (SECs). The standard Miller-Tucker-Zemlin (MTZ) formulation introduces auxiliary variables uᵢ representing the cumulative load after visiting customer i. The constraint uⱼ ≥ uᵢ + dⱼ - Q(1 - xᵢⱼ) simultaneously prevents subtours and enforces capacity. This compact model is suitable for MILP solvers like Gurobi.
Savings Algorithm Heuristic
The classic Clarke-Wright Savings Algorithm is a constructive heuristic specifically designed for CVRP. It starts with a trivial solution where each customer is served by a dedicated route. It then iteratively merges two routes (0...i,0) and (0,j...0) if the combined demand does not exceed Q. The merge is prioritized by the 'savings' value: sᵢⱼ = cᵢ₀ + c₀ⱼ - cᵢⱼ. This greedy approach quickly generates a good feasible solution, often used as a starting point for metaheuristics like Adaptive Large Neighborhood Search (ALNS).
Split Deliveries vs. CVRP
A key distinction is between CVRP and the Split Delivery VRP (SDVRP). In CVRP, each customer's demand is indivisible and must be fulfilled by a single vehicle. This is a hard assignment constraint. In SDVRP, a customer's demand can be split across multiple vehicles, which can reduce total cost when demand exceeds vehicle capacity. CVRP is the more restrictive model, applicable when splitting a delivery is operationally impossible or cost-prohibitive, such as delivering a single palletized machine.
Benchmark Datasets
Standardized test instances are crucial for comparing CVRP algorithms. The most famous are the CVRPLIB datasets, including:
- Set A (Augerat et al.): Instances with 32-80 customers, widely used for exact methods.
- Set P (Christofides & Eilon): Classic instances with 50-199 customers.
- Set X (Uchoa et al.): Large-scale instances with 100-1,000 customers, designed to challenge modern metaheuristics. These datasets provide known optimal solutions, allowing researchers to benchmark the optimality gap of their heuristics.
CVRP vs. Other VRP Variants
How the capacitated constraint distinguishes CVRP from other fundamental vehicle routing problem variants.
| Constraint / Feature | CVRP | VRP | VRPTW | SDVRP |
|---|---|---|---|---|
Vehicle Capacity Limit | ||||
Customer Time Windows | ||||
Split Deliveries Allowed | ||||
Heterogeneous Fleet | ||||
Objective Function | Minimize total distance | Minimize total distance | Minimize total distance | Minimize total distance |
Typical Solver Approach | Branch-and-Cut, ALNS | Savings Algorithm, Sweep | Branch-and-Price, Tabu Search | Branch-and-Cut, ALNS |
Computational Complexity | NP-Hard | NP-Hard | NP-Hard | NP-Hard |
Primary Industry Application | Retail distribution, food delivery | Postal services, meter reading | Pharma delivery, field service | Bulk fuel, industrial gases |
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the Capacitated Vehicle Routing Problem, its constraints, and its solution methodologies.
The Capacitated Vehicle Routing Problem (CVRP) is a combinatorial optimization problem where a fleet of identical vehicles, each with a finite carrying capacity Q, must service a set of customers with known demands d_i from a single depot, such that the total demand on any route does not exceed Q. The primary distinction from the standard Vehicle Routing Problem (VRP) is the explicit capacity constraint. In a basic VRP, the sole constraint might be route length or time, whereas the CVRP introduces a binding knapsack-like constraint on each vehicle. This transforms the problem from a pure partitioning and sequencing challenge into one where the assignment of customers to vehicles is fundamentally constrained by the sum of their demands. The objective remains to minimize the total distance traveled or the total cost of all routes, but the solution space is now restricted to only those partitions of customers that are weight-feasible.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding CVRP requires familiarity with the core problem it extends and the algorithmic techniques used to solve it. These related terms provide essential context for logistics engineers and operations researchers.
Vehicle Routing Problem (VRP)
The foundational combinatorial optimization problem from which CVRP is derived. VRP seeks the optimal set of routes for a fleet of vehicles to service geographically dispersed customers, minimizing total travel cost. CVRP adds the critical constraint of vehicle capacity, making it a more realistic model for physical goods distribution where trucks cannot carry infinite loads.
Mixed-Integer Linear Programming (MILP)
A mathematical optimization framework used to formulate CVRP as an exact model. MILP problems involve a linear objective function (e.g., minimize distance) and linear constraints, where some variables are restricted to integers—such as binary variables indicating whether a vehicle travels between two nodes. Solvers like Gurobi use Branch and Bound to find provably optimal solutions for small to medium CVRP instances.
Adaptive Large Neighborhood Search (ALNS)
A powerful metaheuristic widely used to solve large-scale CVRP instances where exact methods fail. ALNS iteratively improves a solution by destroying parts of routes (e.g., removing random customers) and repairing them (e.g., reinserting at lowest cost). An adaptive layer tracks the performance of different destroy/repair heuristics and selects the most effective ones, making it highly efficient for real-world logistics.
Column Generation
An advanced algorithm for solving large-scale CVRP formulations with an exponential number of possible routes. Instead of enumerating all routes upfront, it starts with a small subset and iteratively generates new columns (routes) with negative reduced cost by solving a pricing subproblem—often a shortest path problem with capacity constraints. This technique is foundational to state-of-the-art exact VRP solvers.
Constraint Programming
A declarative paradigm particularly effective for CVRP variants with complex side constraints. Rather than specifying a mathematical objective and constraints, you define variables, their domains, and the logical relationships between them. The solver systematically prunes infeasible assignments using propagation, excelling at problems where feasibility is as challenging as optimality, such as CVRP with time windows and driver rules.
Stochastic Vehicle Routing
An extension of CVRP where one or more parameters are random variables rather than fixed values. In a stochastic CVRP, customer demand might be uncertain until the vehicle arrives, requiring recourse actions like returning to the depot for restocking. This contrasts with deterministic CVRP and requires robust optimization or two-stage stochastic programming to generate routes that perform well under uncertainty.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us