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 TIinformationExtraction(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: AGgroupByAreaTP(TI);
  5: RGgroupByRouteTP(TI);
// construct basic summaries
  6: Initialize ASP for an area summary;
  7: Initialize RSP for a route summary;
  8: ASPBuildAreaSummary(AG); // Algorithm 2
  9: RSPBuildRouteSummary(RG); // Algorithm 3
// PQ-index construction
10: An extended route summary ERSPBuildExtendedRouteSummary(RSP); // Algorithm 4
11: PQImergeByKey(ASP,ERSP);
12: return PQI;