Skip to main content
. 2017 Sep 25;17(10):2201. doi: 10.3390/s17102201
Algorithm 3: Build a Route Summary
  Input: RG: a tuple (key, L), where key is the pair (route, time period) key and L is a list of taxi information
 Output: RSP: a tuple (a pair (ar, tp), area, first time period, second time period, a route summary)
  1 Initialize RS as a route summary;
 // compute elements of a route summary
  2 RSkey ← RGkey;
  3 RSkey.μd is calculated from each group RGkey,L; // Equation (5)
  4 RSkey.μtt is computed from RGkey,L; // Equation (6)
  5 RSkey.μc is calculated from RGkey,L; // Equation (7)
  6 a destination area ard ←RGkey.getDestArea();
  7 an origin area aro ←RGkey.getOriginArea();
 // compute two time intervals: tpmin and tpmax
  8 ArrivalTimeMapping (tpmin, tpmax, RSkey);
 // make an RSP with time invtervals for the extension
  9 a spatio-temporal hashkey hkey ← a pair of (aro, RGkey.tp);
10 RSP ← a tuple of (hkey, ard, tpmin, tpmax, RS);
11 return RSP;