Abstract
The Capacitated Vehicle Routing Problem (CVRP) is a fundamental NP-hard optimization challenge with significant implications for logistics and supply chain management. This paper explores the efficacy of Reinforcement Learning (RL) as a "learned heuristic" compared to traditional exact methods and hand-crafted heuristics. While RL models currently lag behind state-of-the-art heuristics in absolute solution quality, they demonstrate a transformative advantage in inference speed and the ability to generalize across diverse problem instances without re-solving from scratch.
Introduction: The CVRP Challenge
The CVRP involves a fleet of vehicles with fixed capacity $Q$ that must deliver goods from a central depot to a set of customers with varying demands $q_i$. The objective is to minimize the total distance traveled while ensuring no vehicle exceeds its capacity.
As an NP-hard problem, the search space for CVRP grows exponentially with the number of customers. Traditional approaches typically rely on Exact Methods (e.g., Mixed Integer Programming), which guarantee optimality but scale poorly, or Heuristics, which are fast but often rigid and scenario-specific. This research investigates whether RL can bridge this gap by learning to construct efficient routes through experience.
Methodology
The study evaluates five distinct solvers across three categories:
- Exact Solver: AMPL + Gurobi (MIP model).
- Traditional Heuristics: LKH3 (state-of-the-art) and Google OR-Tools.
- Reinforcement Learning: Two modern architectures—an RNN-based model with attention (Nazari et al., 2018) and a Transformer-based model (Kool et al., 2019).
The RL agents are trained to interact with the environment by selecting the next customer to visit. A critical component is masking, which prevents the agent from choosing invalid actions, such as visiting a customer twice or exceeding vehicle capacity. The Transformer model, in particular, utilizes the REINFORCE algorithm with a rollout baseline to stabilize the learning process.
Experimental Setup and Datasets
To ensure rigorous comparison with established Operations Research (OR) literature, the models were tested on the CMT benchmark instances (Christofides et al., 1979). These benchmarks range from 50 to 120 customers, providing a standardized "stress test" for routing algorithms beyond simple randomly generated data.
Key Insights and Results
The evaluation revealed a fundamental trade-off between solution optimality and latency:
- Speed Advantage: RL models provided solutions in under 3 seconds, significantly outperforming LKH3 (up to 39 seconds) and Gurobi (which often failed to find optima within a 60-second limit).
- Quality Gap: LKH3 remains the benchmark for quality (0.0%–0.4% gap from optimum). The Transformer-based RL model achieved a 1.4% gap for 50 customers, though this widened to 15.9% for 120 customers, indicating a scalability challenge.
- Emergent Behavior: Interestingly, RL agents were observed to "re-discover" classic human-designed heuristics, such as the Clarke & Wright savings algorithm, during the training phase.
- Transferability: Models pre-trained on the Traveling Salesman Problem (TSP) could be successfully adapted for CVRP, demonstrating that the network learns fundamental spatial routing patterns.
Conclusion
Reinforcement Learning represents a paradigm shift from "solving from scratch" to "learning to solve." While specialized heuristics like LKH3 still dominate in static, high-precision scenarios, RL offers a compelling alternative for real-time applications where speed is paramount. Future research should focus on hybrid approaches—using RL to generate high-quality initial solutions that are then refined by local search heuristics—to combine the best of both worlds.
Summary updated