Skip to main content
. 2017 Sep 25;17(10):2201. doi: 10.3390/s17102201
Algorithm 1: Distributed PQ-index Construction
  Input: Set of taxi trips T
 Output: PQ-index PQI
 // information extraction
  1: Taxi trip information TI←informationExtraction(T);
 // grouping by area or route
  2: Initialize AG as a tuple of (pair (ar,tp), a list of taxi trip information);
  3: Initialize RG as a tuple of (pair (rt,tp), a list of taxi trip information);
  4: AG ← groupByAreaTP(TI);
  5: RG ← groupByRouteTP(TI);
 // construct basic summaries
  6: Initialize ASP for an area summary;
  7: Initialize RSP for a route summary;
  8: ASP ← BuildAreaSummary(AG); // Algorithm 2
  9: RSP ← BuildRouteSummary(RG); // Algorithm 3
 // PQ-index construction
10: An extended route summary ERSP ← BuildExtendedRouteSummary(RSP); // Algorithm 4
11: PQI ← mergeByKey(ASP,ERSP);
12: return PQI;