Genetic Algorithms with Neural Cost Predictor for Solving Hierarchical Vehicle Routing Problems

Abhay Sobhanan, Junyoung Park, Jinkyoo Park, Changhyun Kwon

Abstract

Hierarchical Vehicle Routing Problems (HVRPs), such as the Multi-Depot VRP (MDVRP) and the Capacitated Location Routing Problem (CLRP), present significant computational challenges because high-level decisions—like customer-to-depot assignments—require solving multiple NP-hard sub-problems to evaluate. This paper introduces GANCP (Genetic Algorithm with Neural Cost Predictor), a framework that replaces expensive sub-route solvers with a fast Graph Neural Network (GNN). By utilizing Multi-Head Attention (MHA) and a novel stepwise training process, GANCP explores high-level decision spaces up to 11 times faster than traditional solvers while maintaining near-optimal solution quality.

Introduction

Vehicle Routing Problems (VRPs) are foundational to logistics and supply chain management. However, real-world scenarios often involve hierarchical layers. In an MDVRP, one must decide which depot serves which customer before determining the specific delivery sequence. In a CLRP, the problem is even more complex, requiring decisions on where to build depots in the first place.

The standard approach involves decomposing these into smaller Capacitated VRPs (CVRPs). However, evaluating a single high-level configuration requires solving these CVRPs, which is computationally expensive. While analytical approximations exist, they often lack the accuracy needed to guide an optimizer toward high-quality solutions. GANCP addresses this by using a neural network to "guess" the cost of a route almost instantaneously, allowing a Genetic Algorithm (GA) to search the solution space much more broadly.

Methodology: The GANCP Framework

GANCP adopts a "predict-then-optimize" workflow designed to balance speed and precision.

1. Neural Cost Predictor

The core of the framework is a GNN based on Multi-Head Attention (MHA). Unlike fixed-input neural networks, this architecture is permutation-invariant and can handle a variable number of customers and depots. It takes customer locations and demands as input and predicts the optimal routing cost without explicitly constructing the routes.

2. Genetic Algorithm (GA) Integration

The GA evolves "chromosomes" that represent customer-depot assignments. In a traditional GA, calculating the fitness of these chromosomes would require calling a heavy-duty solver like HGS-CVRP thousands of times. In GANCP, the GA queries the GNN instead. This allows the algorithm to evaluate thousands of potential assignments in the time it would normally take to solve a handful of instances.

3. GANCP+: Final Refinement

To ensure the final output is a valid, high-quality routing plan, the authors introduce GANCP+. Once the GA identifies the top $k$ candidate solutions based on neural predictions, these candidates are passed to a high-performance exact solver (HGS-CVRP). This hybrid approach combines the rapid exploration of neural networks with the precision of traditional optimization.

Overcoming the Distribution Shift

A significant challenge in using neural predictors for optimization is "distribution shift." A model trained on random customer clusters often fails when the GA begins to find highly optimized, non-random clusters. To solve this, the authors implemented Phase III Training. In this iterative process, the model is fine-tuned using the specific types of sub-problems generated during the GA's actual search process. This ensures the cost predictor remains accurate even as the GA converges on high-quality solutions.

Experimental Results

The framework was tested against synthetic instances and standard benchmarks (Cordeau, Tuzun & Burke, Barreto).

  • Efficiency: For large-scale problems involving 1,500 customers, GANCP+ achieved an 11.4x speedup compared to VROOM, a popular open-source solver.
  • Solution Quality: On standard test sets, GANCP+ frequently found better solutions in less time than the benchmarks. It maintained a performance gap of less than 1% even on out-of-distribution data where customer locations were clustered differently than in the training set.
  • Generalization: One of the most striking findings was the model's transferability. A cost predictor trained on MDVRP data was applied to the Capacitated Location Routing Problem (CLRP) without retraining and still performed effectively, suggesting the GNN learned fundamental geometric principles of routing costs.

Conclusion and Future Work

GANCP demonstrates that neural cost predictors can significantly accelerate the solving of hierarchical logistics problems without sacrificing accuracy. While the current model does not yet account for complex constraints like time windows or driver work-hour limits, it provides a robust proof-of-concept for "neural-accelerated" optimization. Future research will focus on expanding the framework to handle more complex variants, such as the Prize-Collecting VRP and Periodic VRP, and developing supervised models to detect infeasible assignments more efficiently.

Summary updated

BibTeX
@inproceedings{sobhanan2023genetic,
  author = {Abhay Sobhanan and Junyoung Park and Jinkyoo Park and Changhyun Kwon},
  title = {{Genetic Algorithms with Neural Cost Predictor for Solving Hierarchical Vehicle Routing Problems}},
  booktitle = {Transp. Sci},
  year = {2023},
}
Figure