Abstract
The Weight-Constrained Shortest-Path (WCSP) problem is a fundamental challenge in routing, requiring the optimization of a primary cost while adhering to a secondary weight constraint. While NP-hard, many real-world applications can tolerate slight suboptimality for significant gains in computational efficiency. This paper introduces WC-A*pex, a bounded-suboptimal algorithm that utilizes a novel "merged" path representation. By grouping similar paths into apex-path pairs, WC-A*pex achieves up to a 10x speedup over state-of-the-art optimal solvers on massive road networks while maintaining a suboptimality bound as low as 1%.
Introduction
The Weight-Constrained Shortest-Path (WCSP) problem involves finding the minimum-cost path between two nodes in a graph while ensuring that a secondary "weight" metric—such as time, energy consumption, or elevation gain—remains below a specified threshold $W$. While standard shortest-path problems are solvable in polynomial time, the addition of a weight constraint renders the problem NP-hard.
In many practical scenarios, such as routing electric vehicles with limited battery capacity or planning paths for cyclists, finding the absolute optimal solution is often less important than finding a "good enough" solution quickly. WC-A*pex is designed to provide rigorous quality guarantees—ensuring the path cost is within a factor of $(1+\epsilon)$ of the optimum—while delivering significant computational speedups on massive road networks.
The Challenge of Constrained Search
The primary difficulty in WCSP lies in the "combinatorial explosion" of potential paths. Unlike standard search where a node only needs to store the single best path found so far, constrained search must track multiple paths that offer different trade-offs between cost and weight.
As shown in Figure 6, multiple paths can exist between the start and goal, each represented as a point in the cost ($c_1$) and weight ($c_2$) space. An optimal solver must explore all "non-dominated" paths to ensure it finds the best one that satisfies $c_2 \le W$. On continental-scale networks, this requirement leads to prohibitive memory and time costs.
Methods: Efficient Path Representation via Merging
The core innovation of WC-Apex is its use of Apex-Path Pairs* to represent sets of paths. Instead of maintaining every individual path, the algorithm merges "similar" paths into a single representation during the search process.
- Apex-Path Pairs: A set of paths is represented by an "apex" (the component-wise minimum cost and weight of the set) and a single "representative path" from that set.
- Path Merging: If a new path is discovered that is sufficiently close to an existing one, the algorithm attempts to merge them. A merge is only performed if the resulting representation still guarantees that any solution derived from it will respect the $(1+\epsilon)$ suboptimality bound.
- Dominance Pruning: The algorithm uses a $g^{min}_2$ value (the minimum weight found so far for a state) to prune paths that are clearly worse than what has already been explored.
By merging paths (as illustrated in Figure 2), WC-A*pex drastically reduces the number of states it needs to expand. This approach is far more effective than simple early-termination strategies, which often continue to explore nearly identical paths before reaching the goal.
Experimental Evaluation
The authors evaluated WC-A*pex on seven large-scale road networks from the 9th DIMACS Implementation Challenge, ranging from Florida (1.1M states) to the Central US (14.1M states). Key findings include:
- Significant Speedups: On the largest network (CTR), WC-Apex with a 1% suboptimality bound ($\epsilon = 0.01$) was over 11 times faster than the optimal WC-A algorithm.
- Efficiency of Merging: Compared to a variant that simply terminates early (WC-A-\epsilon), WC-Apex provided nearly an order of magnitude better performance. While early termination only offered a 20% speedup on the CTR network, the merging strategy in WC-A*pex yielded a ~950% improvement.
- Heuristic Guidance: The algorithm utilizes precomputed "perfect-distance heuristics" to guide the search efficiently toward the destination, further reducing node expansions.
Conclusion
WC-A*pex demonstrates that allowing for a tiny amount of suboptimality can lead to dramatic improvements in search efficiency for NP-hard constrained routing problems. By moving from individual path tracking to a merged representation, the algorithm overcomes the combinatorial hurdles that limit optimal solvers, making bounded-suboptimal search a viable and highly efficient alternative for real-world, large-scale applications.
Summary updated