1 Introduction
-
We formally defined the k-shortest paths with limited overlap (\(k\text {SPwLO}\)) problem for computing alternative routes on road networks (Sect. 4).
-
We introduced two exact algorithms for \(k\text {SPwLO}\) queries: OnePass traverses the road network once expanding only paths that qualify the similarity constraint; MultiPass improves OnePass by employing an additional pruning criterion and traversing the network \(k{-}1\) times (Sect. 5).
-
We presented three performance-oriented heuristic algorithms that limit the number of examined paths but do not minimize the length of each subsequent result: OnePass \(^+\) employs the pruning power of MultiPass but traverses the network only once; SVP \(^+\) selects alternative paths from the set of single-via paths [2]; ESX removes edges from the road network incrementally and computes the shortest path on the updated network (Sect. 6).
-
We examine additional edge removal criteria for ESX in order to further improve its performance and result quality (Sect. 6.4).
-
We present the
Complete_kSPwLO
function that gradually relaxes the similarity constraint, and we discuss two completeness-oriented heuristic algorithms, termed ESX-C and SVP-C, that employ this function to always compute a complete result set of k paths (Sect. 7).
2 Related work
3 Preliminaries
4 k-Shortest paths with limited overlap
4.1 Complexity analysis
4.2 Computing \(k\text {SPwLO}\) queries
4.3 Incomplete solutions
4.4 Extending \(k\text {SPwLO}\)
5 Exact algorithms
5.1 The OnePass algorithm
5.2 The MultiPass algorithm
6 Performance-oriented heuristic algorithms
6.1 The OnePass\(^+\) algorithm
6.2 The SVP\(^+\) algorithm
6.3 The ESX algorithm
6.4 Optimizing ESX
7 Completeness-oriented heuristic algorithms
7.1 Relaxation of \(\theta \)
Complete_kSPwLO
illustrated in Function 1. The function receives as input a set of candidate paths \(P_{cand}\) out of which the result will be extracted, the number k of requested paths, and an initial similarity threshold \(\theta \). The first step is to sort the paths in \(P_{cand}\) in increasing length order. Note that if \(P_{cand}\) contains less than k paths, it is impossible to return a complete result; hence, the function terminates and \(P_{ LO } \leftarrow P_{cand}\).Complete_kSPwLO
examines the paths in \(P_{cand}\) in increasing length order. Fix such a path p. If p is alternative to the current result set \(P_{ LO }\), p is added to \(P_{ LO }\). At this point, the function will terminate if \(P_{ LO }\) already contains k paths as the result set is now complete. In contrast, if the current path p is not alternative to \(P_{ LO }\), the current \(\theta _{min}\) is checked against \(Sim _{max}\) of p to \(P_{ LO }\) in Line 13 and is updated in Line 14 accordingly using Eqs. 4 and 5. Finally, the value of \(\theta \) is relaxed, i.e., increased to \(\theta _{min}\) to prepare for the next round. Note that the while loop eventually terminates due to the condition in Line 10, i.e., after k paths are added to \(P_{ LO }\).
Complete_kSPwLO
continues in the same manner until all 24 paths are examined. Note that when \(p_{17}\) is examined, \(\theta _{min}\) is set to 0.365, which is also the value at the end of the round. Consequently, \(\theta \) gets a new value \(\theta = \theta _{min} = 0.364\), indicating that in order for the \(P_{ LO }\) to change, paths should be allowed to be at most \(36.4\%\) similar to each other instead of the initial \(30\%\). Columns 4–6 in Fig. 10 report all path similarities computed during the first round.
Complete_kSPwLO
operates exactly as in the first round until \(p_{17}\) is examined. This time, the path is sufficiently dissimilar to the current result set, and \(P_{ LO }\) is updated to \(\{p_1,p_4,p_{11},p_{17}\}\). At the end of the second round, the similarity threshold is further relaxed to \(\theta = 0.375\). For illustration purposes, Fig. 10 reports only the extra path similarities computed in the second round.Complete_kSPwLO
adds to \(P_{ LO }\) paths \(p_1\), \(p_3\), \(p_4\), \(p_6\), and \(p_{15}\), in this order. Note that it is possible to add \(p_{15}\) because \(p_{11}\) is now excluded from the result as \(Sim (p_{11},p_6)\,{=}\,0.58 > \theta \). The process terminates after adding \(p_{15}\), as \(P_{ LO } \) contains \(k\,{=}\,5\) paths.Complete_kSPwLO
determines the lowest value for \(\theta _{min} \ge \theta \) such that there is a solution set \(P_{ LO } \subseteq P_{cand}\) with \(|P_{ LO } | = k\).Complete_kSPwLO
terminate after I iterations of its main while-loop. Let \(\theta _i\) denote the value of the similarity threshold and \(k_{\theta _{i}}\) the size of the result set \(P_{ LO } \) during the i-th iteration. We prove by induction on \(i \in \{1,\ldots ,I\}\) that \(k_{\theta ^\prime }{<}k\) holds for all \(\theta ^\prime \in [\theta ,\theta _I)\). If \(I{=1}\), i.e., the function Complete_kSPwLO
terminates after a single iteration, we have \(\theta _1\,{=}\,\theta \) which is by definition the minimum possible value. Now, if the inductive hypothesis holds for \(i{<}I\) but not for \(i{+}1\), there is a \(\theta ^\prime \in [\theta , \theta _{i{+}1})\) such that \(k_{\theta ^\prime }\,{=}\,k\). We know from the hypothesis that \(\theta ^\prime {\ge }\theta _i\). Furthermore, we know from the definition of \(\theta _i\) and \(\theta _{i{+}1}\) that all \(\theta ^\prime \in [\theta _i,\theta _{i{+}1})\) yield the same result set (cf. Eqs. 4 and 5). Together, these observations imply that \(k_{\theta _i}\,{=}\,k\), which contradicts the fact that function Complete_kSPwLO
did not terminate at the i-th iteration. \(\square \)Complete_kSPwLO
depends on the size of \(|P_{cand}|\). At each round, the number of paths examined by Complete_kSPwLO
is \(O(|P_{cand}|)\). To determine whether a path should be added to \(P_{ LO } \) or not requires O(k) time. Furthermore, as for each path we keep at most \(k{-}1\) similarities with paths in the result set, to add a single path to \(P_{ LO } \) we need, in the worst case, to run an iteration for all the similarities of all paths, i.e., \(O(|P_{cand}|{\cdot }k)\) iterations. Since, we need to fill the result set with k paths, the total number of iterations is \(O(|P_{cand}|{\cdot }k^2)\). Therefore, the overall runtime complexity of Complete_kSPwLO
is \(O(|P_{cand}|^2{\cdot }k^3)\).7.2 The SVP-C and ESX-C algorithms
Complete_kSPwLO
function can operate with any arbitrary set of \((s{\rightarrow }t)\) paths as input. The only requirement dictated by Definition 2 for \(P_{cand}\) is to include the shortest path from s to t.Complete_kSPwLO
to produce a complete \(P_{ LO }\) result in Line 6.
8 Optimization with lower bounds
9 Experimental evaluation
Road networks | Nodes | Edges | Structure |
---|---|---|---|
Rome | 3353 | 8870 | City-center |
Oldenburg | 6105 | 14,058 | City-center |
San Joaquin | 18,263 | 47,594 | Grid-based |
Tianjin | 31,002 | 86,584 | Ring-based |
Porto Alegre | 63,751 | 187,364 | Grid-based |
Beijing | 74,383 | 222,778 | Ring-based |
Milan | 187,537 | 525,296 | Ring-based |
Chicago | 386,533 | 1,121,620 | Grid-based |
Colorado | 435,666 | 1,057,066 | State |
Florida | 1,070,376 | 2,712,798 | State |
9.1 Exact algorithms
9.2 Heuristic algorithms
9.2.1 Comparison of ESX variants
9.2.2 Performance-oriented heuristic algorithms
Road net. | k | \(\theta \) | \(k\text {SPwLO}\) | OnePass \(^+\) | SVP \(^+\) | ESX |
---|---|---|---|---|---|---|
San Joaquin | 2 | 0.5 | 100 | 100 | 100 | 100 |
3 | 0.5 | 100 | 99.8 | 99.6 | 99.5 | |
4 | 0.5 | 99.88 | 99 | 96.5 | 97.8 | |
5 | 0.5 | 99.67 | 98.3 | 94.1 | 96.9 | |
3 | 0.9 | 100 | 100 | 99.9 | 100 | |
3 | 0.7 | 100 | 99.9 | 99.7 | 99.8 | |
3 | 0.3 | 99.1 | 98.5 | 92.2 | 96.5 | |
3 | 0.1 | 92.1 | 89.6 | 55.3 | 81.7 | |
Tianjin | 2 | 0.5 | 99.9 | 99.9 | 99.8 | 99.9 |
3 | 0.5 | 99.9 | 99.8 | 99.8 | 99.5 | |
4 | 0.5 | 99.8 | 98.6 | 99.4 | 98.6 | |
5 | 0.5 | 99.7 | 97.7 | 98.6 | 96.4 | |
3 | 0.9 | 100 | 100 | 100 | 100 | |
3 | 0.7 | 100 | 99.7 | 100 | 100 | |
3 | 0.3 | 99.4 | 99.2 | 97.7 | 97.8 | |
3 | 0.1 | 95 | 93.5 | 74 | 87.5 | |
Porto Alegre | 2 | 0.5 | 100 | 100 | 100 | 100 |
3 | 0.5 | 100 | 99.9 | 99.9 | 99.2 | |
4 | 0.5 | 100 | 99.5 | 99.5 | 98.3 | |
5 | 0.5 | 100 | 98.6 | 98.6 | 96.8 | |
3 | 0.9 | 100 | 100 | 100 | 100 | |
3 | 0.7 | 100 | 100 | 100 | 99.9 | |
3 | 0.3 | 100 | 99.7 | 91.2 | 97.6 | |
3 | 0.1 | 98.5 | 97.5 | 53.2 | 90.9 | |
Beijing | 2 | 0.5 | 100 | 100 | 100 | 100 |
3 | 0.5 | 100 | 99.9 | 99.5 | 99.6 | |
4 | 0.5 | 100 | 98.7 | 98.5 | 99.4 | |
5 | 0.5 | 100 | 97.4 | 98.5 | 98.3 | |
3 | 0.9 | 100 | 100 | 100 | 100 | |
3 | 0.7 | 100 | 100 | 100 | 99.9 | |
3 | 0.3 | 99.7 | 99.6 | 98.2 | 98.6 | |
3 | 0.1 | 95.4 | 94.6 | 85.2 | 88 |
Milan | Chicago | ||||||
---|---|---|---|---|---|---|---|
k | \(\theta \) | SVP \(^+\) | ESX | k | \(\theta \) | SVP \(^+\) | ESX |
5 | 0.5 | 100 | 98.6 | 5 | 0.5 | 100 | 98.7 |
10 | 0.5 | 99 | 95.7 | 10 | 0.5 | 98.8 | 95.3 |
15 | 0.5 | 91.9 | 94.2 | 15 | 0.5 | 98.2 | 93.1 |
20 | 0.5 | 72.8 | 92.6 | 20 | 0.5 | 93.1 | 91.4 |
10 | 0.9 | 100 | 99.7 | 10 | 0.9 | 100 | 99.6 |
10 | 0.7 | 100 | 98.8 | 10 | 0.7 | 100 | 99.1 |
10 | 0.3 | 36.5 | 86.4 | 10 | 0.3 | 69.9 | 86.9 |
10 | 0.1 | 0 | 37 | 0 | 0.1 | 0 | 50.7 |
Colorado | Florida | ||||||
---|---|---|---|---|---|---|---|
k | \(\theta \) | SVP \(^+\) | ESX | k | \(\theta \) | SVP \(^+\) | ESX |
5 | 0.5 | 99.4 | 98.6 | 5 | 0.5 | 94.8 | 99.1 |
10 | 0.5 | 78.6 | 96.6 | 10 | 0.5 | 57.1 | 97.8 |
15 | 0.5 | 43.7 | 95.2 | 15 | 0.5 | 20.1 | 97 |
20 | 0.5 | 22.5 | 94.5 | 20 | 0.5 | 3.8 | 96.7 |
10 | 0.9 | 100 | 99.5 | 10 | 0.9 | 100 | 99.8 |
10 | 0.7 | 99.9 | 98.8 | 10 | 0.7 | 100 | 99.4 |
10 | 0.3 | 8.8 | 91.1 | 10 | 0.3 | 1.1 | 94.4 |
10 | 0.1 | 0 | 25.2 | 10 | 0.1 | 0 | 62 |
9.2.3 Completeness-oriented heuristic algorithms
Complete_kSPwLO
. Hence, the runtime of SVP-C and ESX-C is almost the same with SVP \(^+\) and ESX, respectively. For smaller values of \(\theta \) though, we observe in all networks that ESX-C clearly outperforms SVP-C. Also, the difference between the runtime of SVP \(^+\) and SVP-C is much greater than the difference between the runtime of ESX and ESX-C. As the completeness ratio of SVP \(^+\) is fairly low for small values of \(\theta \), function Complete_kSPwLO
has to be invoked many times to relax \(\theta \) and compute a complete result.Complete_kSPwLO
using a much smaller \(P_{cand}\) as input.
9.3 Summary of findings
Complete_kSPwLO
to find a result set of more dissimilar paths than ESX-C.