ARS: Automatic Routing Solver with Large Language Models

Xiongwei Han · DOI

Designing efficient routes for a fleet of vehicles—the classic Vehicle Routing Problem (VRP)—is a cornerstone of modern logistics. However, real-world VRPs are rarely "standard." They come with a messy tangle of constraints: specific time windows, varying vehicle capacities, priority customers, and incompatible cargo. Traditionally, adapting a solver to these specific needs required a human expert to spend days or weeks writing custom code.

A new framework titled ARS (Automatic Routing Solver) introduces a system that leverages the reasoning power of Large Language Models (LLMs) to automatically design and solve thousands of VRP variants by bridging the gap between natural language requirements and executable optimization logic.

The Challenge of Real-World Routing

The primary hurdle in current routing technology is generalization. Expert-designed heuristics are highly effective but narrow; a simple change in business rules often necessitates a total code rewrite. Conversely, while LLMs are proficient at writing code, they struggle to solve complex mathematical optimizations directly or adhere to the rigid modeling requirements of general-purpose solvers like Gurobi or CPLEX. Furthermore, most research evaluates solvers on limited standard problems, which fails to reflect the chaotic variety of real-world constraints.

The ARS Framework

ARS addresses these challenges by augmenting a "Backbone Metaheuristic Solver" through a three-step pipeline:

  1. Constraint Selection: An LLM agent identifies relevant "reference constraints" (e.g., Vehicle Capacity, Time Windows) from a pre-defined database based on a natural language problem description.
  2. Program Generation: The LLM generates two Python functions: a Feasibility Checker and a Violation Scorer. The scorer is a critical innovation; by quantifying the degree of constraint violation, it creates a "gradient" that guides the solver from infeasible solutions toward feasibility.
  3. Augmented Heuristic Solver: These functions are integrated into a "Destroy & Repair" framework, where the solver iteratively refines routes using the LLM-generated logic.
The ARS framework overview, illustrating the pipeline from natural language problem descriptions to an augmented heuristic solver.

RoutBench: A New Standard for Complexity

To rigorously test the system, the researchers introduced RoutBench, a massive benchmark containing 1,000 unique VRP variants derived from 24 different attributes. It is categorized into RoutBench-S (Simple, $\le 3$ constraints) and RoutBench-H (Hard, $> 3$ constraints) to evaluate how solvers handle increasing complexity.

Results and Performance

ARS demonstrates significant improvements over both traditional solvers and existing LLM-based methods. On common VRP variants, ARS achieved a 91.67% success rate, doubling the performance of the next best LLM-based method (Reflexion at 45.83%). On the challenging RoutBench-H dataset, ARS maintained a 46.80% success rate, while other LLM methods fell below 16%.

Success rate comparison on complex routing problems, showing ARS significantly outperforming traditional solvers like CPLEX, Gurobi, and OR-Tools.

Beyond success rates, ARS proved more efficient than general-purpose mathematical solvers. For complex variants like DCVRP-L, ARS found high-quality solutions in seconds, whereas solvers like CPLEX often required over an hour or failed entirely. This efficiency stems from the LLM's ability to write simple Python logic for heuristics, which is more effective than generating complex, rigid mathematical models.

Conclusion

ARS represents a shift toward automated, generalizable optimization. By using LLMs as a bridge to generate constraint-aware heuristics rather than raw mathematical models, the framework provides a scalable solution for the diverse and evolving needs of modern logistics. Future work will focus on improving the model's handling of complex logical dependencies, such as customer priority, and exploring the design of specialized operators for even greater efficiency.

Summary updated

BibTeX
@misc{han2025ars,
  author = {Xiongwei Han},
  title = {{ARS: Automatic Routing Solver with Large Language Models}},
  year = {2025},
  eprint = {2502.15359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.15359},
}
Figure