arXiv:2609.00859cs.AISep 2026

Manuscript Offprint

arXiv:2609.00859

Reinforcement Learning Enhanced LLM Agents for Complex Vehicle Routing Problems

Yi Chen, Zikang Yu, Jiahai Wang, Jinbiao Chen, Jianpeng Zhou, Zizhen Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Yi Chen¹[0009-0009-6748-0479], Zikang Yu¹[0000-0001-6992-2829], Jiahai Wang¹(✉)[0000-0002-6961-7813], Jinbiao Chen²[0000-0001-7417-0430], Jianpeng Zhou¹[0009-0002-4570-3298], and Zizhen Zhang¹[0000-0003-0320-9355]

¹ School of Computer Science and Engineering, Sun Yat-sen University, Guangzhou 510006, China {cheny2596,wangjiah,yuzk6,zhoujp7}@mail2.sysu.edu.cn {wangjiah, zhangzzh7}@mail.sysu.edu.cn ² Department of Industrial Systems Engineering and Management, National University of Singapore, Singapore bill.cjb@nus.edu.sg

Abstract. Vehicle Routing Problems (VRPs) are fundamental combinatorial optimization problems with widespread applications in various scenarios. The advanced optimization solvers can effectively solve such problems. However, modeling complex VRP variants for solvers often requires substantial domain expertise, which limits the accessibility of advanced optimization technologies. In this paper, we propose Reinforcement Learning Enhanced LLM Agents (RLEA), a multi-agent framework designed to automate the modeling of complex VRPs. RLEA introduces a lightweight neural Planner trained with Soft Q-learning to efficiently orchestrate the actions of LLM-based agents. In addition, we equip the system with an evolutionary memory module and retrieval-augmented generation, enabling the agent to leverage both accumulated experience and external solver knowledge during program generation and refinement for solving VRPs. We evaluated 48 distinct VRP variants across various solvers. The experimental results demonstrate that RLEA outperforms the previous state-of-the-art method, achieving a 16.67% higher success rate while significantly reducing runtime errors. These results validate that integrating reinforcement learning with LLM-based reasoning is highly effective for automated optimization modeling. The appendix is available at: https://doi.org/10.5281/zenodo.19134435.

Keywords: Vehicle Routing Problem · Large Language Model · Automatic Modeling · Multi-Agent System · Reinforcement Learning.

1 Introduction

Vehicle routing problems (VRPs) constitute an important class of combinatorial optimization problems in operations research and have been widely applied across various domains, such as communication and transportation [23,2,15]. Recent studies increasingly focus on more complex VRP variants to better reflect

Chen. Author et al.

real-world scenarios [18,27]. As the number and complexity of the constraints increase, the challenge of solving these NP-hard VRPs grows commensurately [4].

Recently, large language models (LLMs) have been increasingly applied to solving complex VRPs due to their strong capabilities in reasoning and code generation [6]. The LLM-based methods for complex VRPs can be mainly divided into three categories.

The first paradigm attempts to directly generate solutions using LLM [11]. These methods prompt the model to infer routes or decision sequences from natural language descriptions. However, due to the complex combinatorial structure and strict feasibility constraints of VRPs, these methods often struggle to produce valid and scalable solutions. The second paradigm emphasizes automated heuristic design. Leveraging the reasoning and code generation capabilities of LLMs, this approach has demonstrated substantial potential for automating heuristic design. Recent works [22,16,26,30,3,7,5,29,13] focus on combining evolutionary computation (EC) with LLMs to generate heuristics to solve VRPs. Although these methods show promise, they remain heavily reliant on the internal knowledge of LLMs and fail to leverage the capabilities of state-of-the-art (SOTA) optimization solvers designed by experts.

The third paradigm focuses on automatic modeling [10,24,1,20,21], where problem constraints are transformed into programs, enabling direct invocation of expert solvers to solve complex VRPs. Its core value lies in democratizing advanced optimization tools, enabling non-expert users to bridge the gap between high-level business requirements and rigorous solver execution. Traditionally, converting real-world VRPs into solver-ready models requires substantial domain expertise, which limits the accessibility of powerful optimization engines such as Gurobi [8] and OR-Tools [19]. The rapid development of LLMs has made this process increasingly feasible through automated reasoning and code generation. Existing automatic modeling methods mainly follow two routes: formulation-first methods, which first derive explicit mathematical formulations before program implementation, and code-only methods, which directly generate executable solver code from problem descriptions. In this paper, we use automatic modeling as a broad term to refer to the process of transforming high-level problem descriptions into solver-ready optimization programs, regardless of whether an explicit mathematical formulation is generated as an intermediate step. Recent state-of-the-art method DRoC [12] also adopts a code-only paradigm and improves the modeling accuracy of complex VRP variants by using retrieval-augmented generation (RAG). However, DRoC primarily depends on LLMs for action decision-making at each modeling step, leading to high inference latency caused by repeated LLM calls. In addition, its retrieval process mainly leverages external solver knowledge, overlooking valuable internal experience accumulated from previous modeling attempts.

In this work, we follow the automatic modeling paradigm and propose a Reinforcement Learning Enhanced LLM Agents framework (RLEA) that integrates a lightweight neural Planner, retrieval-based knowledge augmentation, and an evolved memory mechanism. This design enables efficient action orchestration while leveraging both external knowledge and internal experience to improve modeling robustness for complex VRP variants. The contributions of this paper can be summarized as follow:

  1. We propose RLEA, a novel multi-agent framework that integrates reinforcement learning with LLM agents to automatically generate solver-ready programs for complex VRP variants.

  2. We introduce a lightweight Planner trained with Soft Q-learning to adaptively select actions for LLM agents, enabling efficient exploration while significantly reducing the latency compared with LLM-based decision-making.

  3. We present an agent equipped with evolvable memory. This agent actively analyzes interaction trajectories to identify successful action paths and derives the root causes of constraint conflicts from failure instances. Beyond the external knowledge provided by RAG, the agent further leverages its accumulated experience to enhance modeling robustness.

  4. We conducted a comprehensive evaluation of RLEA across 48 distinct VRP variants. Experimental results demonstrate that RLEA significantly outperforms existing methods. Compared to the state-of-the-art (SOTA) method DRoC, RLEA achieves a 16.67% increase in success rate and a 10.41% reduction in runtime error rate.

References (29)