630 likes | 752 Views
Αποτίμηση Ερωτημάτων σε Συλλογές Διαδρομών (Evaluating Queries on Route Collections). Παναγιώτης Μπούρος Ενδιάμεση Κρίση Επιβλέπων: Ι. Βασιλείου. Outline. Introduction Route collections, queries & frequent updates Existing work Proposed framework Experiments Conclusions.
E N D
Αποτίμηση Ερωτημάτων σε Συλλογές Διαδρομών(Evaluating Queries on Route Collections) Παναγιώτης Μπούρος Ενδιάμεση Κρίση Επιβλέπων: Ι. Βασιλείου
Outline • Introduction • Route collections, queries & frequent updates • Existing work • Proposed framework • Experiments • Conclusions
Examples of route collections • People visiting Athens • Use e-devices to track their sightseeing • Create routes through interesting places • Upload/propose routes to Web sites like ShareMyRoutes.com • Query such route collection: • Find a sequence of interesting places from Omonia Square to Cathedral • Find a sequence of interesting places from Academy to Museum of Acropolis that passes through Zappeion • Answers may involve nodes from more than one route
People visiting Athens Use e-devices to track their sightseeing Create routes through interesting places Upload/propose routes to Web sites like ShareMyRoutes.com Querying such route collection: Find a sequence of interesting places from Omonia Square to Cathedral Find a sequence of interesting places from Academy to Museum of Acropolis that passes through Zappeion Answers may involve nodes from more than one route Examples of route collections
Examples of route collections • People visiting Athens • Use e-devices to track their sightseeing • Create routes through interesting places • Upload/propose routes to Web sites like ShareMyRoutes.com • Querying such route collection: • Find a sequence of interesting places from Omonia Square to Cathedral • Find a sequence of interesting places from Academy to Museum of Acropolis that passes through Zappeion • Answers may involve nodes from more than one routes
Examples of route collections • Courier company offering same day pickup and delivery services • Route collection created from previous day • Each route performed by a vehicle • Each node in routes is a point for picking-up, delivering or just waiting • Each node in a route has time interval I • Querying such collection: • Ad-hoc customer requests • Pick-up parcel from Academy within IS • Deliver parcel at Zappeion within IT • Serve ad-hoc request • Not add new route • Exploit one or more existing routes, pass parcel among vehicles
Examples of route collections • Courier company offering same day pickup and delivery services • Route collection created from previous day • Each route performed by a vehicle • Each node in routes is a point for picking-up, delivering or just waiting • Each node in a route has time interval I • Querying such collection: • Ad-hoc customer requests • Pick-up parcel from Academy within IS • Deliver parcel at Zappeion within IT • Serve ad-hoc request • Not add new route • Exploit one or more existing routes, pass parcel among vehicles
Examples of route collections • Courier company offering same day pickup and delivery services • Route collection created from previous day • Each route performed by a vehicle • Each node in routes is a point for picking-up, delivering or just waiting • Each node in a route has time interval I • Querying such collection: • Ad-hoc customer requests • Pick-up parcel from Academy within IS • Deliver parcel at Zappeion within IT • Serve ad-hoc request • Not add new route • Exploit one or more existing routes, pass parcel among vehicles
Examples of route collections • Courier company offering same day pickup and delivery services • Route collection created from previous day • Each route performed by a vehicle • Each node in routes is a point for picking-up, delivering or just waiting • Each node in a route has time interval I • Querying such collection: • Ad-hoc customer requests • Pick-up parcel from Academy within IS • Deliver parcel at Zappeion within IT • Serve ad-hoc request • Not add new route • Exploit one or more existing routes, pass parcel among vehicles Passing parcel possible
Examples of route collections • Courier company offering same day pickup and delivery services • Route collection created from previous day • Each route performed by a vehicle • Each node in routes is a point for picking-up, delivering or just waiting • Each node in a route has time interval I • Querying such collection: • Ad-hoc customer requests • Pick-up parcel from Academy within IS • Deliver parcel at Zappeion within IT • Serve ad-hoc request • Not add new route • Exploit one or more existing routes, pass parcel among vehicles • Related to dynamic pickup and delivery problem Passing parcel impossible
Consider route collections Very large, stored in secondary storage Frequently updated with new routes E.g. new routes are proposed or new vehicle routes are included Evaluate queries that identify paths Sequences of distinct nodes from one or more routes In the latter we use links, i.e., shared nodes PATH(S,T) Find a sequence of interesting places from Omonia Square to Cathedral FLSP(S,IS,T,IT) Moving cost m inside routes Changing cost c between routes via links Find the sequence of points to pick-up parcel from Cathedral and deliver it to Zappeion that: Abides with the temporal constraints imposed by time intervals Minimizes primarily the changing cost and secondarily the moving cost What’s all about…
What’s all about… Consider route collections Very large, stored in secondary storage Frequently updated with new routes E.g. new routes are proposed or new vehicle routes are included Evaluate queries that identify paths Sequences of distinct nodes from one or more routes In the latter we use links, i.e., shared nodes PATH(S,T) Find a sequence of interesting places from Omonia Square to Cathedral FLSP(S,IS,T,IT) Moving cost m inside routes Changing cost c between routes via links Find the sequence of points to pick-up parcel from Cathedral and deliver it to Zappeion that: Abides with the temporal constraints imposed by time intervals Minimizes primarily the changing cost and secondarily the moving cost
What’s all about… Consider route collections Very large, stored in secondary storage Frequently updated with new routes E.g. new routes are proposed or new vehicle routes are included Evaluate queries that identify paths Sequences of distinct nodes from one or more routes In the latter we use links, i.e., shared nodes PATH(S,T) Find a sequence of interesting places from Omonia Square to Cathedral FLSP(S,IS,T,IT) Moving cost m inside routes Changing cost c between routes via links Find the sequence of points to pick-up parcel from Cathedral and deliver it to Zappeion that: Abides with the temporal constraints imposed by time intervals Minimizes primarily the changing cost and secondarily the moving cost
What’s all about… Consider route collections Very large, stored in secondary storage Frequently updated with new routes E.g. new routes are proposed or new vehicle routes are included Evaluate queries that identify paths Sequences of distinct nodes from one or more routes In the latter we use links, i.e., shared nodes PATH(S,T) Find a sequence of interesting places from Omonia Square to Cathedral FJP(S,IS,T,IT) Moving cost m inside routes Changing cost c between routes via links Find the sequence of points to pick-up parcel from Cathedral and deliver it to Zappeion that: Abides with the temporal constraints imposed by time intervals Minimizesprimarily the changing cost and secondarily the moving cost
Outline • Introduction • Existing work • Graph-based solutions for • PATH queries • FJP queries • Proposed framework • Experiments • Conclusions
Convert route collection to a graph GPATH for PATH queries GFJP for FJP queries Answer queries on graph following one of the following paradigms: Direct evaluation Low storage and maintenance cost Slow query evaluation Preprocessing Fast query evaluation High maintenance cost Existing work
Evaluating PATH queries • Strongly related with REACH query • Exists path between two nodes? • Direct evaluation • Search algorithms • Depth-first or breadth-first search • Preprocessing GPATH • Directly exploiting transitive closure is not feasible • Labeling and compression schemes • Mainly focus on REACH • Some transform graph to DAG • 2-hop, HOPI, 3-hop, Dual Labeling, Interval labeling, Path Cover, GRIPP etc
Evaluating FJP queries • Shortest path on GFJP • Direct evaluation • Dijkstra, A* • Preprocessing • Compression scheme • 2-hop, construction cost • Graph embedding + A* • Assumes that graph structure does not change
Outline • Introduction • Existing work • Proposed framework • PATH & FJP queries • Indices, algorithms & methods for handling updates • Experiments • Conclusions
Evaluate PATH and FJP queries directly on route collections Route are precomputed answer to queries Our framework involves the following: A search algorithm Depth-first search for PATH queries Uniform-Cost Search for FJP queries Indices on route collection for efficiently answering queries Reduce iterations of the search algorithm P-Index, H-Index, L-Index Methods for handling frequent updates Proposed framework
Indexing route collections P-Index • Associates each node of the collection with the routes containing it • List routes[n] • <ri, oi> • Sorted by route identifier
Indexing route collections P-Index • Associates each node of the collection with the routes containing it • List routes[n] • <ri, oi> • Sorted by route identifier
Indexing route collections H-Index • Captures all possible transitions between routes via links • Links are shared nodes • List edges[r] • <ri, n:o:oi> • Sorted by primarily by route identifier riand then by position o • Each node in r before n can reach every node after n in ri
Indexing route collections H-Index • Captures all possible transitions between routes via links • Links are shared nodes • List edges[r] • <ri, n:o:oi> • Sorted by primarily by route identifier riand then by position o • Each node in r before n can reach every node after n in ri
Indexing route collections H-Index • Captures all possible transitions between routes via links • Links are shared nodes • List edges[r] • <ri, n:o:oi> • Sorted by primarily by route identifier riand then by position o • Each node in r before n can reach every node after n in ri
Indexing route collections H-Index • Captures all possible transitions between routes via links • Links are shared nodes • List edges[r] • <ri, n:o:oi> • Sorted by primarily by route identifier riand then by position o • Each node in r before n can reach every node after n in ri
Indexing route collections L-Index • Disadvantage of H-Index • Large edges lists • High storage and maintenancecost • Notice: each edges list involves a few distinct links • Store links contained in each route • List links[r] • <n:o> • Sorted by link identifier n
Indexing route collections L-Index • Disadvantage of H-Index • Large edges lists • High storage and maintenancecost • Notice: each edges list involves a few distinct links • Store links contained in each route • List links[r] • <n:o> • Sorted by link identifier n
Basic idea Traverse nodes similar to depth-first search Exploit indices on route collection to terminate search P-Index => method pfsP H-Index => method pfsH L-Index => method pfsL At each iteration: Pop current node n Check termination condition Access routes containing n, routes[n] from P-Index For each route, push nodes after n in search stack Evaluating PATH queries
Evaluating PATH queries cont. • pfsP terminates search • When: current node n is contained in a route before target t • How: joinsroutes[n] with routes[t] & stops after finding a common route entry S T
Evaluating PATH queries cont. • pfsP terminates search • When: current node n is contained in a route before target t • How: joinsroutes[n] with routes[t] & stops after finding a common route entry … S n T
Evaluating PATH queries cont. • pfsP terminates search • When: current node n is contained in a route before target t • How: joinsroutes[n] with routes[t] & stops after finding a common route entry r1 … S n r2 T r3 routes[n] = {<r1:o1>,<r2:o2>,<r3:o3>}
Evaluating PATH queries cont. • pfsP terminates search • When: current node n is contained in a route before target t • How: joinsroutes[n] with routes[t] & stops after finding a common route entry r1 … S n r2 T r3 routes[n] = {<r1:o1>,<r2:o2>,<r3:o3>} JOIN routes[T] = {…,<r2:oT>,…}
Evaluating PATH queries cont. • pfsP terminates search • When: current node n is contained in a route before target t • How: joinsroutes[n] with routes[t] & stops after finding a common route entry r1 … S n T r2 o2 < oT r3 routes[n] = {<r1:o1>,<r2:o2>,<r3:o3>} JOIN routes[T] = {…,<r2:oT>,…}
Evaluating PATH queries cont. pfsP terminates search When: current node n is contained in a route before target t How: joinsroutes[n] with routes[t] & stops after finding a common route entry r1 … S n T r2 … rk Answer: path from S to n => part of r2 from n to T
Evaluating PATH queries cont. • pfsH terminates search • When: current node n is contained in a route that is connected with a route containing target t • How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry S T
Evaluating PATH queries cont. • pfsH terminates search • When: current node n is contained in a route that is connected with a route containing target t • How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry … S n T
Evaluating PATH queries cont. • pfsH terminates search • When: current node n is contained in a route that is connected with a route containing target t • How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry r1 … S n r2 T r3 routes[n] = {<r1:o1>,<r2:o2>,<r3:o3>}
Evaluating PATH queries cont. • pfsH terminates search • When: current node n is contained in a route that is connected with a route containing target t • How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry r1 rX … r2 S n X Y T r3 rY routes[n] = {<r1:o1>,<r2:o2>,<r3:o3>}, edges[r2] = {<rX,X:oX2:oX>,<rY,Y:oY2:oY>}
Evaluating PATH queries cont. • pfsH terminates search • When: current node n is contained in a route that is connected with a route containing target t • How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry r1 rX … r2 S n X Y T r3 rY edges[r2] = {<rX,X:oX2:oX>,<rY,Y:oY2:oY>} JOINroutes[T] = {…,<rY:oT>,…}
Evaluating PATH queries cont. • pfsH terminates search • When: current node n is contained in a route that is connected with a route containing target t • How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry r1 rX … r2 S n X Y o2 < oY2ANDoY < oT T r3 rY edges[r2] = {<rX,X:oX2:oX>,<rY,Y:oY2:oY>} JOINroutes[T] = {…,<rY:oT>,…}
Evaluating PATH queries cont. pfsH terminates search When: current node n is contained in a route that is connected with a route containing target t How: for each route r containing n, joinsedges[r] with routes[t] & stops after finding a common route entry r1 rX … r2 S n X Y T r3 rY Answer: path from S to n => part of r2 from n to Y => part of rY from Y to T
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry S T
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry S Y T rY T = {<Y,(rY:oY:oT)>}
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry … S n Y T rY T = {<Y,(rY:oY:oT)>}
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry r1 … S n r2 Y T rk pY routes[n] = {<r1:o1>,<r2:o2>,<r3:o3>}, T = {<Y,(rY:oY:oT)>}
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry r1 … S n r2 Y T r3 pY links[r2] = {…<X:oX>,<Y:oY2>} JOINT = {<Y,(rY:oY:oT)>}
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry r1 … r2 S n X Y o2 < oY2 T r3 rY links[r2] = {…<X:oX>,<Y:oY2>} JOINT = {<Y,(rY:oY:oT)>}
Evaluating PATH queries cont. • pfsL • Visits only the links in a route • Constructs list T of the links before target • Terminates search • When: current node n is contained in a route before a link of T • How: for each route r containing n, joinslinks[r] with list T & stops after finding a common link entry r1 … r2 S n X Y … T rk rY Answer: path from S to n => part of r2 from n to Y => part of rY from Y to T
Basic idea Traverse nodes similar to uniform-cost search Compute lower bound of the answer, a candidateanswer Using P-Index => method MP, L-Index => method ML Triggers early termination condition Prunes search space At each iteration: Pop current node n Check termination condition against candidate answer Update candidate answer through n Access routes containing n, routes[n] from P-Index For each route, push nodes after n in search queue iff expanding them would give answer better than candidate Evaluating FJP queries