Table of Contents
Fetching ...

An Agentic Framework with LLMs for Solving Complex Vehicle Routing Problems

Ni Zhang, Zhiguang Cao, Jianan Zhou, Cong Zhang, Yew-Soon Ong

TL;DR

This work introduces AFL, an agentic LLM framework that solves complex VRPs end-to-end by decomposing the pipeline into three subtasks and coordinating four specialized agents to ensure cross-functional consistency and constraint satisfaction. AFL extracts domain knowledge directly from VRPLIB inputs, generates self-contained solver code using a destroy-insert heuristic, and iteratively derives feasible solutions with error analysis to enhance trustworthiness. Across 60 VRP variants, including standard benchmarks and electric-vehicle scenarios, AFL achieves competitive performance while delivering superior code reliability and solution feasibility relative to existing LLM-based approaches, often approaching state-of-the-art baselines without external modules. The framework demonstrates broad applicability to additional VRP variants (TSP, ATSP, ACVRP, SOP), highlighting AFL’s potential as a general, autonomous optimization platform that can democratize access to advanced VRP solving capabilities.

Abstract

Complex vehicle routing problems (VRPs) remain a fundamental challenge, demanding substantial expert effort for intent interpretation and algorithm design. While large language models (LLMs) offer a promising path toward automation, current approaches still rely on external intervention, which restrict autonomy and often lead to execution errors and low solution feasibility. To address these challenges, we propose an Agentic Framework with LLMs (AFL) for solving complex vehicle routing problems, achieving full automation from problem instance to solution. AFL directly extracts knowledge from raw inputs and enables self-contained code generation without handcrafted modules or external solvers. To improve trustworthiness, AFL decomposes the overall pipeline into three manageable subtasks and employs four specialized agents whose coordinated interactions enforce cross-functional consistency and logical soundness. Extensive experiments on 60 complex VRPs, ranging from standard benchmarks to practical variants, validate the effectiveness and generality of our framework, showing comparable performance against meticulously designed algorithms. Notably, it substantially outperforms existing LLM-based baselines in both code reliability and solution feasibility, achieving rates close to 100% on the evaluated benchmarks.

An Agentic Framework with LLMs for Solving Complex Vehicle Routing Problems

TL;DR

This work introduces AFL, an agentic LLM framework that solves complex VRPs end-to-end by decomposing the pipeline into three subtasks and coordinating four specialized agents to ensure cross-functional consistency and constraint satisfaction. AFL extracts domain knowledge directly from VRPLIB inputs, generates self-contained solver code using a destroy-insert heuristic, and iteratively derives feasible solutions with error analysis to enhance trustworthiness. Across 60 VRP variants, including standard benchmarks and electric-vehicle scenarios, AFL achieves competitive performance while delivering superior code reliability and solution feasibility relative to existing LLM-based approaches, often approaching state-of-the-art baselines without external modules. The framework demonstrates broad applicability to additional VRP variants (TSP, ATSP, ACVRP, SOP), highlighting AFL’s potential as a general, autonomous optimization platform that can democratize access to advanced VRP solving capabilities.

Abstract

Complex vehicle routing problems (VRPs) remain a fundamental challenge, demanding substantial expert effort for intent interpretation and algorithm design. While large language models (LLMs) offer a promising path toward automation, current approaches still rely on external intervention, which restrict autonomy and often lead to execution errors and low solution feasibility. To address these challenges, we propose an Agentic Framework with LLMs (AFL) for solving complex vehicle routing problems, achieving full automation from problem instance to solution. AFL directly extracts knowledge from raw inputs and enables self-contained code generation without handcrafted modules or external solvers. To improve trustworthiness, AFL decomposes the overall pipeline into three manageable subtasks and employs four specialized agents whose coordinated interactions enforce cross-functional consistency and logical soundness. Extensive experiments on 60 complex VRPs, ranging from standard benchmarks to practical variants, validate the effectiveness and generality of our framework, showing comparable performance against meticulously designed algorithms. Notably, it substantially outperforms existing LLM-based baselines in both code reliability and solution feasibility, achieving rates close to 100% on the evaluated benchmarks.
Paper Structure (40 sections, 4 equations, 3 figures, 14 tables, 1 algorithm)

This paper contains 40 sections, 4 equations, 3 figures, 14 tables, 1 algorithm.

Figures (3)

  • Figure 1: Overview of an agentic framework with LLMs for solving complex VRPs.
  • Figure 2: Code structure.
  • Figure 3: Ablation studies on the JA and RA.