Research Article

Semantic-Aware Top-k Multirequest Optimal Route

Algorithm 4

R2(Q,R).

Input: route: R=; query: Q
Output: route: R’
1 ,
2 for   in R and do
3  V.add(between(,));
4 for   in V do
5  if  QRP() then
6    for   in R do
7      if QRP()Q=QRP()Q and cost()< cost()+cost() then
8       R’=R.del();
9       R’=R’.add(v);
10     else  continue;
11  else  continue;
12 return R’;