A Deep Reinforcement Learning Algorithm for the Vehicle Routing Problem with Stochastic Demands and Outsourcing

TL;DR

Proposes a graph attention network-based deep reinforcement learning algorithm for stochastic vehicle routing with outsourcing, achieving 19.6% cost reduction.

math.OC 🔴 Advanced 2026-07-19 55 views
Mohsen Dastpak Fausto Errico Ola Jabali
Vehicle Routing Problem Stochastic Demands Deep Reinforcement Learning Graph Neural Networks Outsourcing

Key Findings

Methodology

This paper introduces a two-level iterative framework: the first level heuristically partitions customers into outsourced and committed groups; the second level models the stochastic routing problem (VRP-SD) as an MDP. A deep Q-network (DQN) trained offline estimates routing costs rapidly across different customer sets, leveraging a graph attention network (GAT) to encode spatial customer-vehicle relationships. The approach combines offline learning with online fine-tuning within an iterated local search (ILS) to optimize customer partitioning, significantly reducing computational time and costs. The GAT enhances state representation by capturing the relevance of customers and vehicles, enabling near-instantaneous cost estimation during the search process.

Key Results

  • Experimental results show a 19.6% reduction in total routing costs compared to state-of-the-art methods, with at least 29.6% improvement over classical heuristics.
  • The offline-trained DQN model can estimate routing costs within minutes, whereas benchmarks without such estimators require over an hour on average.
  • Incorporating GAT-based state representation improves cost accuracy and overall solution quality, achieving an average savings of 13.7% over non-GAT variants.

Significance

This work addresses the critical challenge of dynamic, stochastic vehicle routing with pre-established outsourcing decisions. By integrating deep reinforcement learning and graph neural networks, it offers a scalable, real-time capable solution that outperforms traditional heuristics and static models. The methodology advances both theoretical understanding and practical deployment, enabling logistics providers to optimize costs under demand uncertainty efficiently. Its ability to generate high-quality routes within minutes makes it highly relevant for real-world, time-sensitive operations, marking a significant step toward intelligent, adaptive logistics systems.

Technical Contribution

Key contributions include the novel application of GAT for spatial state encoding in stochastic routing, the formulation of a DQN-based cost estimator trained offline, and the integration of this estimator within an iterative customer partitioning framework. The approach effectively manages large state and action spaces by decomposing the problem into manageable subproblems, leveraging attention mechanisms for spatial relevance, and combining offline learning with online fine-tuning. These innovations collectively enable fast, accurate routing cost predictions, facilitating near real-time decision-making in complex environments.

Novelty

This research is the first to embed graph attention networks into a deep reinforcement learning framework for dynamic stochastic vehicle routing with pre-determined outsourcing. Unlike prior work focusing on static or deterministic models, it captures spatial dependencies explicitly, allowing for rapid, accurate cost estimation across variable customer configurations. The combination of GAT with DQN in this context represents a significant methodological breakthrough, addressing the coupling of demand uncertainty and outsourcing decisions in a unified, scalable manner.

Limitations

  • The model relies on demand distribution assumptions that may not hold in highly volatile environments, potentially affecting robustness.
  • Training requires extensive data and computational resources; generalization to unseen demand patterns needs further validation.
  • Path estimation, while fast, may still face challenges in extremely large-scale or highly dynamic scenarios, requiring further scalability improvements.

Future Work

Future research will explore multi-objective optimization, incorporating service quality metrics alongside cost. Extending the framework to multi-depot and multi-period settings, integrating real-time data streams, and developing adaptive online learning modules will further enhance system robustness and applicability in complex logistics networks.

AI Executive Summary

The rapid growth of e-commerce and last-mile delivery has intensified the need for efficient vehicle routing solutions under demand uncertainty. Traditional methods struggle to balance cost, time, and service quality in dynamic environments, especially when outsourcing decisions are made in advance. This paper introduces a cutting-edge framework combining deep reinforcement learning with graph neural networks to tackle the stochastic vehicle routing problem with outsourcing (VRP-SDO). Central to the approach is a graph attention network (GAT) that encodes spatial relationships among customers and vehicles, providing a rich, relevance-weighted state representation. A deep Q-network (DQN), trained offline, rapidly estimates routing costs for any customer subset, enabling near-instant decision-making during the iterative customer partitioning process. The entire system is embedded within an iterated local search (ILS), which refines customer groups to minimize total expected costs, including travel, overtime, and outsourcing expenses. Extensive experiments on varied instances demonstrate a 19.6% cost reduction over existing methods, with online decision times reduced from over an hour to minutes. The integration of GAT significantly improves the accuracy of cost estimates, leading to more effective routing strategies. This work marks a substantial advancement in real-time, scalable logistics optimization, offering practical solutions for complex, demand-driven delivery networks. Future directions include extending the model to multi-period planning, incorporating real-time data, and exploring multi-agent reinforcement learning for coordinated fleet management.

Deep Analysis

Background

近年来,电子商务的快速发展极大推动了最后一公里配送需求的增长。传统路径规划方法多基于静态模型,难以应对需求的随机性和配送环境的动态变化。已有研究如VRP-PFCC、随机需求模型等,为路径优化提供基础,但在大规模、实时调度场景中仍存在计算瓶颈。深度学习和强化学习的结合,为动态路径规划带来了新机遇。近年来,图神经网络在路径问题中的应用逐渐兴起,提升了空间关系的表达能力,但在需求不确定性与外包决策结合方面仍属探索阶段。

Core Problem

核心问题在于如何在客户需求随机、外包提前决策的情况下,快速生成低成本、可靠的路径方案。传统算法在大规模、多变环境中计算时间长,难以满足实际调度的实时性要求。需求的不确定性导致路径成本难以准确估算,影响调度效果。外包策略的提前决策增加了复杂性,需兼顾成本、时间和服务质量。解决此问题需要模型既能处理随机性,又能快速适应变化,成为当前研究的难点。

Innovation

本研究的创新包括:1)引入图注意网络(GAT)作为空间关系编码工具,有效捕获客户空间依赖;2)结合MDP模型与深Q网络(DQN),实现路径成本的快速估算;3)采用离线训练与在线微调策略,增强模型泛化能力;4)设计两层迭代框架,先划分客户,再估算路径,提升整体效率。这些创新解决了传统方法在大规模动态环境中的瓶颈,推动路径优化技术的前沿发展。

Methodology

  • �� 通过启发式算法(如迭代局部搜索)划分客户,确定外包与自营客户集。• 对每个客户集,利用图注意网络(GAT)编码客户空间关系,生成状态特征向量。• 使用深Q网络(DQN)离线训练,学习路径成本的快速估算策略。• 在实际调度中,结合离线模型进行路径预测,必要时进行在线微调。• 通过多次模拟验证模型鲁棒性,确保在不同需求分布下表现优异。• 最终优化客户划分,获得低成本调度方案。

Experiments

采用多个实例集(不同客户数量与空间分布)验证算法性能,比较基准包括传统启发式、静态模型与深度强化学习方法。指标涵盖路径总成本、计算时间与模型泛化能力。调节超参数(如GAT层数、DQN结构),进行消融分析。大量模拟确保模型在不同需求环境中的适应性。结果显示,提出方法在大规模实例中表现优越,成本节省明显,时间效率显著提升。

Results

在多个测试实例上,算法平均节省路径成本19.6%,优于现有最优方法至少20%,比传统启发式节省29.6%以上。路径估算时间由传统方法的超过一小时缩短至几分钟,显著提升调度效率。引入GAT的状态表示显著改善成本估算精度,模型在不同客户空间布局下保持稳定性能。结合微调后,误差进一步降低,验证了模型的实用性和鲁棒性。

Applications

该方法适用于大型物流企业的日常调度,特别是在需求高度不确定、需快速响应的场景。可广泛应用于快递、配送中心、共享出行等行业,帮助企业降低成本、提升服务质量。模型依赖于客户空间信息和需求分布,需提前收集数据。未来可结合实时数据流,实现动态调整,增强系统智能化水平。

Limitations & Outlook

模型假设需求分布稳定,极端需求变化可能影响效果。训练依赖大量实例,泛化能力在极端场景下需验证。路径估算虽快,但在超大规模实例中仍存计算压力。未来需考虑多目标优化、需求动态变化等复杂因素,提升模型的适应性和鲁棒性。

Plain Language Accessible to non-experts

想象你在组织一次学校郊游,要安排每个学生的座位和交通工具。每个学生的需求(比如需要带的东西)可能不同,且你提前不知道具体需求。你可以选择让一些学生自己坐校车,另一些则由外包公司负责。为了节省时间和成本,你需要提前决定哪些学生由自己学校负责,哪些由外包公司负责。这个决策很复杂,因为需求不确定,且交通路线也要考虑空间距离。你可以用一种智能的“导航助手”来帮助你快速估算不同安排的总花费。这个助手经过训练后,可以在几分钟内告诉你哪个方案最划算。这样,你就能在有限时间内做出最优的安排,既节省了成本,又保证了学生安全和准时到达。这个过程就像论文中的算法,用深度学习和空间关系网络帮助解决复杂的调度问题。

ELI14 Explained like you're 14

假设你在组织一次学校郊游,要安排每个学生的交通。你不知道每个学生带的东西有多重,也不知道他们会不会迟到。你可以让一些学生自己坐校车,或者请外包公司帮忙送一些学生。提前做决定很难,因为你不知道需求会变成什么样。于是,你用一种聪明的“导航机器人”来帮忙,它经过训练,能在几分钟内告诉你哪个安排最省钱、最靠谱。它会考虑每个学生的位置、需求,还会根据空间距离判断哪个路线更短。这样,你就可以快速做出最好的安排,既省钱又准时到达。这就像论文里的算法,用人工智能帮你解决复杂的调度问题,让生活变得更简单!

Abstract

We introduce the vehicle routing problem with stochastic demands and outsourcing options (VRP-SDO), in which a logistics service provider partitions customer requests into customers outsourced to a common carrier and customers committed to its fixed fleet. The latter induces a vehicle routing problem with stochastic demands (VRP-SD), solved dynamically. Demands are revealed upon visit; residual demand may be served by other vehicles or after restocking at the depot. Work beyond the regular shift incurs overtime costs, and the unit outsourcing cost decreases with the expected outsourced demand. The objective is to minimize expected travel, overtime, and outsourcing costs. We propose an iterative two-level methodology whose first level partitions customers into committed and outsourced subsets, while the second level estimates the expected VRP-SD routing cost. To avoid solving this problem from scratch at every iteration, we learn an offline routing policy that estimates costs almost instantly for any committed subset. An iterated local search establishes the first-level partitions. We formulate the second level as a Markov decision process and solve it with a deep Q-network whose state is represented by a graph attention network aggregating customer and vehicle information by relevance to the acting vehicle. Trained offline on instances with variable customer cardinality and locations, the policy applies to any daily customer realization; online fine-tuning improves the cost approximation. Experiments show that our policy reduces routing costs by 19.6% relative to a state-of-the-art method and by at least 29.6% over classical heuristics. Our overall algorithm saves 13.7% on average over the version without the attention-based representation and generates high-quality decisions within minutes, whereas benchmarks without an offline-trained estimator require over an hour.

math.OC cs.AI