Abstract
Districting-and-routing is a strategic problem aiming to aggregate basic geographical units (e.g., zip codes) into delivery districts. Its goal is to minimize the expected long-term routing cost of performing deliveries in each district separately. Solving this stochastic problem poses critical challenges since repeatedly evaluating routing costs on a set of scenarios while searching for optimal districts takes considerable time. Consequently, solution approaches usually replace the true cost estimation with continuous cost approximation formulas extending Beardwood-Halton-Hammersley and Daganzo's work. These formulas commit errors that can be magnified during the optimization step. To reconcile speed and solution quality, we introduce a supervised learning and optimization methodology leveraging a graph neural network for delivery-cost estimation. This network is trained to imitate known costs generated on a limited subset of training districts. It is used within an iterated local search procedure to produce high-quality districting plans. Our computational experiments, conducted on five metropolitan areas in the United Kingdom, demonstrate that the graph neural network predicts long-term district cost operations more accurately, and that optimizing over this oracle permits large economic gains (10.12% on average) over baseline methods that use continuous approximation formulas or shallow neural networks. Finally, we observe that having compact districts alone does not guarantee high-quality solutions and that other learnable geometrical features of the districts play an essential role.
Introduction
In logistics management, "districting" represents a critical strategic decision: how to partition a large service area into smaller zones to be served by individual vehicles. The objective is to minimize long-term operational costs, but the problem is inherently stochastic. While the district boundaries are fixed for months or years, the daily demand—the number and location of delivery stops—fluctuates constantly.
To find an optimal districting plan, an optimization algorithm must evaluate thousands of potential boundary configurations. Ideally, one would use Sample Average Approximation (SAA), simulating hundreds of daily routes for every potential configuration to find the true expected cost. However, SAA is computationally prohibitive for use within an iterative search. Historically, researchers have relied on Continuous Approximation (CA) formulas, such as the Beardwood-Halton-Hammersley (BHH) formula, which estimate travel distance based on area and stop density. While fast, these formulas often lack the precision needed for high-stakes logistics planning.
The GNN Oracle Methodology
We propose a supervised learning framework that bridges the gap between slow, high-fidelity simulations and fast, low-fidelity mathematical formulas. Our approach introduces a Graph Neural Network (GNN) "oracle" designed to predict routing costs with high accuracy in milliseconds.
Model Architecture and Features
We represent the service area as a graph where nodes are Basic Units (such as UK census zip codes) and edges represent geographical adjacency. We employ a Structure2Vec GNN architecture to learn node embeddings, which are then aggregated into a graph-level embedding representing the entire district. The model processes eight features per node, including:
- Population density and area.
- Perimeter and spatial coordinates.
- Distance to the central depot (a critical factor in "stem" travel costs).
Training and Optimization
The GNN is trained to imitate the high-accuracy costs generated by SAA on a limited subset of training districts. Once trained, the GNN acts as a high-speed surrogate model. We integrate this oracle into an Iterated Local Search (ILS) metaheuristic. During the search, the ILS performs "Relocate" and "Swap" moves to adjust district boundaries, querying the GNN at each step to instantly evaluate the economic impact of the change.
Computational Experiments
We evaluated our methodology using real-world geographical and census data from five major UK metropolitan areas: London, Bristol, Manchester, Leeds, and the West Midlands. The regions were divided into Middle Layer Super Output Areas (MSOAs), standard census units containing approximately 8,000 inhabitants. We generated 75 distinct problem instances per city, varying the number of units ($n=60, 90, 120$), target district sizes, and depot locations.
Key Results
- Predictive Accuracy: The GNN achieved a Mean Absolute Percentage Error (MAPE) of 2.72%, significantly outperforming traditional CA formulas (5.46%) and shallow neural networks (5.16%).
- Economic Impact: By optimizing over the GNN oracle rather than a CA formula, we produced districting plans that were 10.12% cheaper on average. In certain instances, cost savings exceeded 20%.
- Computational Efficiency: Once trained, the GNN performs a single cost inference in approximately 8 milliseconds, enabling its use in large-scale local search procedures.
Discussion: The "Optimizer's Curse" and District Geometry
A central finding of this research is the impact of the "Optimizer's Curse." When an optimization algorithm uses an inaccurate cost estimator, it tends to exploit the estimator's errors. If a formula underestimates the cost of a bizarrely shaped district, the optimizer will gravitate toward that solution. The GNN’s superior accuracy prevents the search from being misled by these mathematical artifacts.
Furthermore, our results challenge the traditional logistics wisdom that districts should always be perfectly compact (e.g., circles or squares). While GNN-optimized districts remain generally compact, they often exhibit elongation toward the depot. These "pizza slice" shapes account for the travel distance from the warehouse to the first stop, a geometric nuance that CA formulas typically ignore but the GNN successfully learns.
Conclusion
This work demonstrates that deep learning can significantly enhance strategic logistics planning by providing fast, accurate approximations of complex stochastic functions. By replacing blunt mathematical formulas with learnable graph-based oracles, organizations can achieve substantial long-term operational savings. Future research will explore the generalization of these models across different urban structures and their application to more complex vehicle routing constraints, such as time windows and multi-depot systems.
Summary updated