Bounded-Suboptimal Weight-Constrained Shortest-Path Search via Efficient Representation of Paths

Han Zhang, Oren Salzman, Ariel Felner, T. K. Satish Kumar, Sven Koenig

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 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.

A sample graph (a) and its corresponding paths in the cost-weight space (b), illustrating how different routes interact with the weight constraint W.

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.

  1. 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.
  2. 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.
  3. 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.
The merge operation in WC-A*pex, combining two path representations (A, π) and (A', π') into a new, more efficient pair.

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

Abstract

In the Weight-Constrained Shortest-Path (WCSP) problem, given a graph in which each edge is annotated with a cost and a weight, a start state, and a goal state, the task is to compute a minimum-cost path from the start state to the goal state with weight no larger than a specified weight limit. While most existing works have focused on solving the WCSP problem optimally, many real-world situations admit a trade-off between efficiency and a suboptimality bound for the path cost. In this paper, we propose a novel bounded suboptimal WCSP algorithm called WC-A\*pex that is built on a state-of-the-art approximate bi-objective search algorithm called A\*pex. WC-A\*pex uses an efficient, albeit approximate, representation of paths with similar costs and weights to compute a (1 + ε)-suboptimal path, for a user-specified ε. During search, WC-A\*pex avoids storing all paths explicitly and thereby reduces the search effort while still retaining its (1 + ε)-suboptimality property. On benchmark instances that model road networks, our experimental results show that WC-A*pex with ε = 0.01 (i.e., with 1% suboptimality) achieves an order-of-magnitude speed-up over WC-A\*, a state-of-the-art WCSP algorithm, and its bounded suboptimal variant.
BibTeX
@inproceedings{zhang2024bounded,
  author = {Han Zhang and Oren Salzman and Ariel Felner and T. K. Satish Kumar and Sven Koenig},
  title = {{Bounded-Suboptimal Weight-Constrained Shortest-Path Search via Efficient Representation of Paths}},
  booktitle = {ICAPS},
  year = {2024},
  doi = {10.1609/icaps.v34i1.31531},
}
Figure