GREAT: A Graph Edge Attention Network for the Electric Vehicle Routing Problem with Asymmetric Costs
Organizations: Chalmers University of Technology · University of Gothenburg
Abstract
Due to the ongoing electrification of transportation systems, energy-based routing problems such as the Electric Vehicle Routing Problem (EVRP) are becoming increasingly important. Unlike Euclidean routing problems, the EVRP involves asymmetric energy costs caused by road topology. Existing learning-based routing approaches are based on graph neural networks (GNNs) or transformer architectures operating on Euclidean node coordinates, making them poorly suited for asymmetric, non-Euclidean edge-based metrics such as energy consumption. To address this, we propose the Graph Edge Attention Network (GREAT), a novel GNN-related architecture that operates purely in edge space rather than on node coordinates, making it naturally compatible with asymmetric routing costs. Integrated into an end-to-end reinforcement learning framework, GREAT jointly optimizes routing and charging decisions for the EVRP. We train the model using real-world energy consumption data from San Francisco, derived from physical road networks enriched with topological features, and evaluate generalization on datasets from San Francisco, Vienna, and Gothenburg. Across diverse battery sizes (15-40 kWh) and customer demand distributions, GREAT outperforms a strong HGS-based EVRP heuristic in most tested settings, achieving energy reductions of up to 8.78% while reducing runtime by a factor of 60. Moreover, we benchmark against a custom adaptive large neighborhood search (ALNS) that jointly optimizes routing and charging. GREAT achieves competitive performance at a faster runtime, and we show that the ALNS can profit from a warm start with the GREAT solution. We further evaluate GREAT on standard (asymmetric) routing problems, including Traveling Salesman Problem, Capacitated Vehicle Routing Problem, and Orienteering Problem, where it achieves state-of-the-art performance among neural methods for non-Euclidean settings.
Figures & tables
| Abbreviation | Definition |
| EVRP | Electric Vehicle Routing Problem |
| CVRP | Capacitated Vehicle Routing Problem |
| TSP | Traveling Salesman Problem |
| OP | Orienteering Problem |
| EV | Electric Vehicle |
| SoC | State of Charge |
| Model | Epoch | Val | Total | Params |
| GREAT NB | 7.5 min | 60 s | 60 h | 1.42M |
| GREAT NF | 6.9 min | 50 s | 55 h | 1.29M |
| Pointerformer | 2.1 min | 12 s | 19 h | 1.09M |
| MatNet | 3.4 min | 22 s | 29 h | 1.42M |
| Customer Demand [1, 9] | Customer Demand [11, 19] | Customer Demand [21, 29] | ||||||||
| Battery (kWh) | Method | kWh | opt. gap | time | kWh | opt. gap | time | kWh | opt. gap | time |
| 15 | Baseline (HGS) | 26.66 | – | 8.6 min | 65.32 | – | 10.4 min | 110.53 | – | 6.2 min |
| ALNS (1s) | 31.92 | 20.10 | 11.7 s | 72.79 | 11.61 | 7.8 s | 112.43 | 1.82 | 8.2 s | |
| ALNS (5s) | 27.57 | 3.61 | 35.6 s | 69.33 | 6.16 | 35.5 s | 106.84 | -3.29 | 35.6 s | |
| ALNS (60s) | 26.53 | -0.39 | 7.0 min | 63.65 | -2.57 | 7.0 min | 102.66 | -7.06 | 7.0 min | |
| ALNS HGS-init (1s) | 25.53 | -4.13 | 8.8 min | 63.78 | -2.35 | 10.6 min | 107.54 | -2.70 | 6.3 min | |
| Customer Demand [1, 9] | Customer Demand [11, 19] | Customer Demand [21, 29] | ||||||||
| Battery (kWh) | Method | kWh | opt. gap | time | kWh | opt. gap | time | kWh | opt. gap | time |
| 15 | Baseline (HGS) | 46.17 | – | 7.0 min | 90.25 | – | 7.1 min | 142.45 | – | 5.7 min |
| ALNS (1s) | 54.41 | 18.77 | 15.1 s | 99.75 | 10.87 | 8.3 s | 151.71 | 6.75 | 8.7 s | |
| ALNS (5s) | 47.79 | 3.99 | 36.7 s | 95.73 | 6.27 | 35.9 s | 142.19 | -0.08 | 35.7 s | |
| ALNS (60s) | 44.38 | -3.68 | 7.0 min | 88.09 | -2.25 | 7.0 min | 137.44 | -3.39 | 7.0 min | |
| ALNS HGS-init (1s) | 43.90 | -4.72 | 7.1 min | 87.95 | -2.48 | 7.3 min | 139.88 | -1.71 | 5.9 min | |
| Customer Demand [1, 9] | Customer Demand [11, 19] | Customer Demand [21, 29] | ||||||||
| Battery (kWh) | Method | kWh | opt. gap | time | kWh | opt. gap | time | kWh | opt. gap | time |
| 15 | Baseline (HGS) | 37.73 | – | 8.0 min | 79.72 | – | 7.5 min | 127.24 | – | 5.8 min |
| ALNS (1s) | 44.84 | 19.33 | 14.1 s | 87.40 | 10.19 | 8.4 s | 134.71 | 6.16 | 8.9 s | |
| ALNS (5s) | 39.84 | 6.00 | 36.4 s | 84.15 | 5.74 | 35.7 s | 126.24 | -0.64 | 36.1 s | |
| ALNS (60s) | 37.13 | -1.58 | 7.0 min | 77.59 | -2.60 | 7.0 min | 121.91 | -4.04 | 7.0 min | |
| ALNS HGS-init (1s) | 36.23 | -3.86 | 8.1 min | 77.78 | -2.39 | 7.6 min | 124.77 | -1.87 | 5.9 min | |
| Method | OSM3 | OSM5 | OSM10 | POP5 |
| Battery 15 kWh, demand | ||||
| Baseline (HGS) | 28.43 | 27.61 | 27.19 | 27.47 |
| ALNS (1 s) | 33.67 | 33.26 | 32.63 | 32.91 |
| ALNS (5 s) | 29.40 | 29.17 | 28.73 | 29.02 |
| ALNS (60 s) | 26.58 | 26.47 | 26.37 | 26.43 |
| ALNS HGS-init (1 s) | 26.71 | 26.32 | 26.17 | 26.25 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Instance size | ||||||||||||
| Model | Mode | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | |
| Pointerformer | Train | 1 | ||||||||||
| 10 | – | – | – | – | – | |||||||
| 50 | – | – | – | – | – | – | – | |||||
| Infer | 1 | |||||||||||
| 10 | ||||||||||||
| Method | opt. gap (%) | time GPU | time CPU (seq.) |
| GREAT NB , POMO 100 | -1.13 | 5.2 s | 3.4 min |
| GREAT NB , POMO 100 + 2opt | -2.10 | 6.2 s | 3.5 min |
| GREAT , POMO 100 | -0.50 | 1.0 s | 25.0 s |
| GREAT , POMO 100 + 2opt | -1.61 | 2.0 s | 26.0 s |
| GREAT , POMO 5 | 0.74 | 0.9 s | 14.1 s |
| GREAT , POMO 5 + 2opt | -0.59 | 2.0 s | 15.2 s |
| Inference augmentation | ||
| Grouping | ||
| By battery capacity (kWh) | ||
| 15 | -0.49 | -0.44 |
| 20 | -0.26 | -0.20 |
| 30 | -0.13 | -0.07 |
| 40 | -0.06 | -0.02 |
| Model | Edge input | ||||
| MatNet | only | 1 | 7.54 | 5.28 | 4.40 |
| GREAT NB | + 4 engineered | 5 | 1.52 | 1.07 | 1.03 |
| GREAT NB (ablation) | only | 1 | 1.78 | 1.19 | 1.12 |
| Customer Demand [1, 9] | Customer Demand [11, 19] | Customer Demand [21, 29] | ||||||||
| City | Battery (kWh) | gap | 95% CI | win | gap | 95% CI | win | gap | 95% CI | win |
| San Francisco | 15 | 0.11 | [-0.57, 0.80] | 52 | -5.64 | [-6.34, -4.94] | 96 | -8.78 | [-9.54, -8.02] | 100 |
| 20 | 1.31 | [0.61, 2.02] | 30 | -4.61 | [-5.32, -3.89] | 90 | -7.56 | [-8.33, -6.78] | 100 | |
| 30 | 1.96 | [1.46, 2.45] | 20 | -3.33 | [-3.94, -2.73] | 86 | -6.51 | [-7.25, -5.77] | 99 | |
| 40 | 3.63 | [3.14, 4.11] | 10 | -2.68 | [-3.24, -2.12] | 80 | -5.97 | [-6.70, -5.23] | 99 | |
| Gothenburg | 15 | -3.15 | [-3.93, -2.37] | 83 | -2.89 | [-3.40, -2.38] | 86 | -3.84 | [-4.26, -3.42] | 98 |
| Customer Demand [1, 9] | Customer Demand [21, 29] | ||||||||
| Battery (kWh) | Method | depot | charger | mean SoC | min SoC | depot | charger | mean SoC | min SoC |
| 15 | Baseline (HGS) | 10.52 | 2.49 | 0.50 | 0.01 | 54.53 | 12.76 | 0.45 | 0.01 |
| ALNS (60 s) | 11.06 | 2.91 | 0.56 | 0.04 | 55.20 | 20.70 | 0.60 | 0.03 | |
| GREAT NB + 2opt | 10.81 | 3.68 | 0.62 | 0.13 | 54.73 | 27.10 | 0.68 | 0.12 | |
| 40 | Baseline (HGS) | 10.52 | 0.55 | 0.54 | 0.04 | 54.53 | 4.05 | 0.50 | 0.01 |
| ALNS (60 s) | 11.12 | 0.87 | 0.57 | 0.06 | 55.10 | 11.34 | 0.67 | 0.06 | |
| EUC100 | TMAT100 | XASY100 | |||||
| opt. gap | time | opt. gap | time | opt. gap | time | ||
| TSP | Baseline - Gurobi | - | - | - | - | - | - |
| LKH | 0.0% | 442s | 0.0% | 936s | 0.01% | 1006s | |
| Nearest Neighbor | 24.86% | 1.3s | 36.04% | 1.2s | 185.26% | 1.2s | |
| Nearest Insertion | 21.8% | 27s | 31.8% | 28s | 301.65% | 28s | |
| Farthest Insertion | 7.66% | 32s | 23.92% | 33s | 310.98% | 33s | |
| EUC100 | TMAT100 | XASY100 | |||||
| opt. gap | time | opt. gap | time | opt. gap | time | ||
| Baseline - Greedy | - | 7.9s | - | 6.9s | - | 340s | |
| OP | EA4OP | -23.64% | 5609s | NA | NA | NA | NA |
| Pointerformer x1 | -19.61% | 12s | NA | NA | NA | NA | |
| Pointerformer x8 | -21.31% | 74s | NA | NA | NA | NA | |
| MatNet x1 | -15.54% | 21s | -24.13% | 21s | 54.98% | 17s | |
| EUC | TMAT | XASY | |||||
| opt. gap | time | opt. gap | time | opt. gap | time | ||
| TSP200 | Baseline - LKH | - | 23s | - | 40s | - | 36s |
| Nearest Neighbor | 25.5% | 0.1s | 36.71 % | 0.1s | 224.93 % | 0.1s | |
| Nearest Insertion | 23.39% | 3.8s | 37.95 % | 3.9s | 465.76% | 4.1s | |
| Farthest Insertion | 9.04% | 2.9s | 29.41 % | 2.9s | 481.4% | 3.0s | |
| BQ-NCO bs16* | 0.09%* | 3min* | 1.41%* | 1min* | UNK | UNK | |
| TMAT150 | TMAT250 | TMAT1000 | ||||
| opt. gap | time | opt. gap | time | opt. gap | time | |
| LKH | - | 6s | - | 15s | - | 231s |
| BQ-NCO bs16 | UNK | UNK | UNK | UNK | ||
| GLOP | ||||||
| GREAT NF ZS x1 | 4.47% | 3s | 11.98% | 6s | 85.54% | 54s |
| GREAT NF ZS x9 | 3.42% | 19s | 7.81% | 17s | 52.07% | 455s |
| Dist. | Mean | Q10 | Q25 | Median | Q75 | Q90 | ||
| TSPLIB | Baseline - LKH | - | - | - | - | - | - | - |
| GREAT NB x9 | EUC | 2.38% | 0.66% | 1.32% | 2.16% | 3.44% | 3.65% | |
| GREAT NF x9 | EUC | 20.45% | 0.72% | 1.9% | 3.56% | 7.17% | 57.38% | |
| GREAT NB x9 | MIX | 2.25% | 1.45% | 1.85% | 2.28% | 2.59% | 2.82% | |
| GREAT NF x9 | MIX | 5.6% | 1.61% | 2.69% | 4.64% | 7.76% | 10.68% | |
| MatNet x9 | EUC | 2.82% | 1.08% | 1.43% | 3.08% | 3.55% | 3.97% |
| Dist. | Mean | Q10 | Q25 | Median | Q75 | Q90 | ||
| TSPLIB | Baseline - LKH | - | - | - | - | - | - | - |
| GREAT NB x9 | EUC | 5.97% | 1.68% | 2.2% | 3.94% | 6.89% | 10.76% | |
| GREAT NF x9 | EUC | 9.27% | 1.55% | 3.44% | 7.07% | 14.26% | 22.3% | |
| GREAT NB x9 | MIX | 6.28% | 2.42% | 3.11% | 4.35% | 7.03% | 8.56% | |
| GREAT NF x9 | MIX | 14.26% | 3.81% | 5.81% | 13.87% | 20.91% | 23.64% | |
| Pointerformer x8 | EUC | 3.9% | 0.93% | 1.63% | 2.18% | 5.3% | 6.88% |