450 likes | 660 Views
Time-Aggregated Graphs- Modeling Spatio-temporal Networks. Betsy George. Advisor : Prof. Shashi Shekhar. Department of Computer Science and Engineering University of Minnesota. September 7, 2007. Publications. Time Aggregated Graphs
E N D
Time-Aggregated Graphs-Modeling Spatio-temporal Networks Betsy George Advisor : Prof. Shashi Shekhar Department of Computer Science and Engineering University of Minnesota September 7, 2007
Publications Time Aggregated Graphs • B. George, S. Shekhar, Time Aggregated Graphs for Modeling Spatio-temporal Networks-An Extended Abstract, Proceedings of Workshops (CoMoGIS) at International Conference on Conceptual Modeling, (ER2006) 2006. (Best Paper Award) • B. George, S. Kim, S. Shekhar, Spatio-temporal Network Databases and Routing Algorithms: A Summary of Results, Proceedings of International Symposium on Spatial and Temporal Databases (SSTD07), July, 2007. • B. George, J. Kang, S. Shekhar, STSG: A Data Model for Representation and Knowledge Discovery in Sensor Data, Proceedings of Workshop on Knowledge Discovery from Sensor data at the International Conference on Knowledge Discovery and Data Mining (KDD) Conference, August 2007. (Best Paper Award). • B. George, S. Shekhar, Modeling Spatio-temporal Network Computations: A Summary of Results, Accepted for presentation at the Second International Conference on GeoSpatial Semantics (GeoS2007), 2007. • B. George, S. Shekhar, Time Aggregated Graphs for Modeling Spatio-temporal Networks, Journal on Semantics of Data (In second review) , Special issue of Selected papers from ER 2006. Evacuation Planning • Q Lu, B. George, S. Shekhar, Capacity Constrained Routing Algorithms for Evacuation Planning: A Summary of Results, Proceedings of International Symposium on Spatial and Temporal Databases (SSTD05), August, 2005. • S. Kim, B. George, S. Shekhar, Evacuation Route Planning: Scalable Algorithms, Accepted for presentation at ACM International Symposium on Advances in Geographic Information Systems (ACMGIS07), November, 2007. • Q Lu, B. George, S. Shekhar, Capacity Constrained Routing Algorithms for Evacuation Planning, International Journal of Semantic Computing, Volume 1, No. 2, June 2007.
Representation • Case Studies • Routing Algorithms • Sensor Data Representation Outline • Introduction • Motivation • Problem Statement • Related Work • Contributions • Conclusion and Future Work
Motivation Many Applications… Examples: Transportation network Routing, Crime pattern analysis, knowledge discovery from Sensor data. • VaryingCongestion Levels and turn restrictions travel time changes. • accurate computation of frequent routing queries. I94 @ Hamline Ave at 8AM & 10AM • Identification of frequent routes • Crime Analysis • Identification of congested routes • Network Planning Traffic sensors on Twin-Cities, MN Road Networkmonitor traffic levels/travel time on the road network. (Courtesy: MN-DoT (www.dot.state.mn.us) )
Problem Definition • Input : a) A Spatial Network b) Temporal changes of the network topology and parameters. • Output : A model that supports efficient correct algorithms for computing the query results. • Objective : Minimize storage and computation costs. • Constraints : (i) Changes occur at discrete instants of time, (ii) Logical & Physical independence
Key assumptions violated. • Ex., Prefix optimality of shortest paths Challenges • Conflicting Requirements • Expressive Power • Storage Efficiency • New and alternative semantics for common graph operations. • Ex.,Shortest Paths are time dependent.
Graph-based Models Databases Operations Research Spatial Graphs Spatio-temporal Graphs (Time Aggregated Graphs) Flow networks ( Time Expanded Graphs) Related Work • Spatial Graphs [Erwig’94, Guting’96, Mouratidis’06, Shekhar’97] • Does not model temporal variations in the network topology, parameters • Supports operations such as shortest path computation on static graphs • Maintains connectivity of link-node networks • Flow Networks (Time expanded Graphs)[Ford’58, Kaufman’93, Kohler’02,Dean’04] • Models time-dependent flow networks • Maintains a copy of the graph for each time instant. • Cannot model scenarios where edge parameter does not represent a “flow”.
N2 N2 N2 1 1 1 1 1 2 N4 N4 N5 N1 N5 N1 N4 N5 N1 2 2 2 2 2 2 N3 N3 N3 t=2 t=3 t=1 N2 N2 1 1 1 1 2 Node: N4 N5 N4 N1 N5 N1 2 2 Edge: 2 N3 N3 2 N.. t=4 t=5 Travel time Holdover Edge N1 N1 N1 N1 N1 N1 N1 N2 N2 N2 N2 N2 N2 N2 Transfer Edges N3 N3 N3 N3 N3 N3 N3 N4 N4 N4 N4 N4 N4 N4 N5 N5 N5 N5 N5 N5 N5 t=3 t=4 t=6 t=7 t=1 t=5 t=2 Related Work Snapshots at t=1,2,3,4,5 Time Expanded Graph
E : set of edges in the TEG C(e) : Edge Cost x(e) =1 if edge e is taken = 0, otherwise Related Work Shortest Paths in Time Expanded Graphs • LP solvers (NETFLO, RELAX IV) provide support for Shortest Path Computation. • Models the time-expanded graph as an Uncapacitated flow network.
High Storage Overhead Redundancy of nodes across time-frames Additional edges across time frames. Limitations of Related Work • Time Expanded Graph • Computationally expensive Algorithms • Increased Network size. • Inadequate support for modeling non-flow parameters and uncertainty on edges. • Lack of physical independence of data.
Time Aggregated Graph (TAG) • Representation • Case Studies • Routing Algorithms • Shortest Path for a given start time • Shortest Path for the ‘best’ start time • Analytical & Experimental Evaluation • Sensor Data Representation Our Contributions
N2 N2 N2 1 1 1 1 1 2 N4 N5 N4 N1 N5 N4 N1 N5 N1 2 2 2 2 2 2 N3 N3 N3 t=3 t=2 t=1 N.. N2 N2 1 Node: 1 1 1 N.. 2 N4 N5 N4 N1 N5 N1 Edge: Travel time 2 2 2 2 N3 N3 t=4 t=5 Time Aggregated Graph Snapshots of a Network at t=1,2,3,4,5 Time Aggregated Graph • Attributes are aggregated over edges and nodes. N2 Node [,1,1,1,1] [1,1,1,1,1] [2,, , ,2] N4 N5 N1 Edge [m1,…..,(mT] [2,2,2,2,2] [2,2,2,2,2] N3 mi- travel time at t=i
N : Set of nodes E : Set of edges T : Length of time interval nwi: Time dependent attribute on nodes for time instant i. ewi: Time dependent attribute on edges for time instant i. N2 [,1,1,1,1] On edge N4-N5 * [2,∞,∞,∞,2] is a time series of attribute; [1,1,1,1,1] [2,, , ,2] N4 N5 N1 * At t=1, the edge has an attribute value of 2. [2,2,2,2,2] [2,2,2,2,2] * At t=2, the ‘∞’ can indicate the absence of connectivity between the nodes at t=2. N3 Time Aggregated Graph [ew1,..,ewT ] | TAG = (N,E,T, [nw1…nwT ], nwi : N RT, ewi : E RT
N2 N2 N2 1 1 1 1 1 2 N4 N5 N4 N1 N5 N4 N1 N5 N1 2 2 2 2 2 2 N3 N3 N3 t=3 t=2 t=1 N2 N2 1 1 1 1 2 N4 N5 N4 N1 N5 N1 2 2 2 2 N3 N3 Node: t=4 N.. t=5 Edge: Travel time Case Study -Routing Algorithms Finding the shortest path from N1 to N5.. Start at t=3: Start at t=1: Shortest Path is N1-N2-N4-N5; Travel time is 4 units. Shortest Path is N1-N3-N4-N5; Travel time is 6 units. Fixed Start Time Shortest Path Least Travel Time (Best Start Time) Shortest Path is dependent on start time!!
N2 [1,1,1,1,1] [1,1,1,1,1] [2,, , ,2] N4 N5 N1 -N5 N1-N3-N4 [2,2,2,2,2] [2,2,2,2,2] N3 N1-N2-N4 -N5 has non-optimal prefix -N5 N1-N3-N4 (2) N1- N3- N4- N5 t=1 t=7 t=3 t=5 are optimal (6 units). & Shortest Path Algorithm for Given Start Time Challenges (1) Not all shortest paths show optimal substructure. For start time t=1 N1- N2- N4- N5 (1) t=1 t=2 t=7 t=3 wait till t=5 !! Lemma: At least one optimal path satisfies the optimal substructure property. N1-N2-N4-N5 in the example has optimal prefixes.
Proof: • For a given start time, the non-optimal substructure is due to waits at intermediate nodes. • For the path from ‘s’ to ‘d’, let ‘u’ be an intermediate, wait node. • Append the optimal path from ‘s’ to ‘u’ to the path from ‘u’ to ‘d’ allowing wait at ‘u’. • This path is optimal. (by Contradiction) Shortest Path Algorithm for Given Start Time Challenge-1 (1) Not all shortest paths show optimal substructure. Lemma: At least one optimal path satisfies the optimal substructure property. Greedy algorithm can be used to find the shortest path.
1,1,1,1 1,3,1,2 N1 N2 N3 Shortest Path Algorithm for Given Start Time Challenges (2) Correctness : Determining when to traverse an edge. When to traverse the edge N2-N3 for start time t=1 at N1? Traversing N2-N3 as soon as N2 is reached, would give sub optimal solution. AssumeFIFO travel times. (3) Termination of the algorithm : An infinite non-negative cycle over time Finite time windows are assumed.
N1 N4 N5 N2 N3 Shortest Path Algorithm for Given Start Time Algorithm • Every node has a cost ( arrival time at the node). • Greedy strategy: • Select the node with the lowest cost to expand. • Traverse every edge at the earliest available time. Source: N1; Destination: N5; time: t=1; (3) (∞) ∞ ∞ ∞ 1 ∞ N2 [,1,1,1,1] [1,1,1,1,1] ∞ ∞ 3 1 3 [2,, , ,2] N4 N5 (1) N1 ∞ 1 3 4 3 (4) (∞) (∞) (7) [2,2,2,2,2] [2,2,2,2,2] ∞ 1 3 4 3 N3 (∞) (3) 3 4 1 7 3
Shortest Path Algorithm for Given Start Time • Initialize c[s] = 0; v ( s), c[v] = ∞. Insert s in the priority queue Q. • while Q is not empty do u = extract_min(Q); close u (C = C {u}) for each node v adjacent to u do { t = min_t((u,v), c[u]); // min_t finds the earliest departure time for (u,v) If t + u,v(t) < c[v] c[v] = t + u,v(t) parent[v] = u insert v in Q if it is not in Q; } • Update Q.
Shortest Path Algorithm for Given Start Time • Correctness of the Algorithm (Optimality of the result) • The SP-TAG is correct under the assumption of FIFO travel times and finite time windows. • Lack of optimal substructure of some shortest paths is due to a potential wait at an intermediate node. • Algorithm picks the path that shows optimal substructure and allows waits. • Lemma:When a node is closed, the cost associated with the node is the shortest path cost. • Based on proof for Dijkstra’s algorithm. • Difference - Earliest availability of edge - Admissible guarantees optimality
Analytical Evaluation • Computational Complexity [n: Number of nodes, m – Number of edges, T – length of the time series] • For every node extracted, • Earliest edge lookup – O(log T) • Priority queue update – O(log n) • Overall Complexity = O(degree(v). (log T + log n)) = O(m( log T+ log n)) • Dijkstra’s Cost Model extended to include the dynamic nature of edge presence. • Each edge traversal Binary search to find the earliest departure O(log T ) • Complexity of shortest path algorithm is O(m( log T+ log n)) * B. C. Dean, Algorithms for Minimum Cost Paths in Time-dependent Networks, Networks 44(1), August 2004.
Analytical Evaluation • Complexity of Shortest Path algorithm based on TAG is O(m( log T+ log n)) • Complexity of Shortest Path Algorithm based on Time Expanded Graph is O(nT log T+mT)(*) • Lemma : Time-aggregated graph performs asymptotically better than time expanded graphs when log (n) < T log (T). * B. C. Dean, Algorithms for Minimum Cost Paths in Time-dependent Networks, Networks 44(1), August 2004.
N2 N2 N2 1 1 1 1 1 2 N4 N5 N4 N1 N5 N4 N1 N5 N1 2 2 2 2 2 2 N3 N3 N3 t=3 t=2 t=1 N2 N2 1 1 1 1 2 N4 N5 N4 N1 N5 N1 2 2 2 2 N3 N3 Node: t=4 N.. t=5 Edge: Travel time Best Start Time Shortest Path Algorithm • Finds a start time and a path such that the time spent in the network is minimized. A Best Start Time!! Path : N1 – N2 – N4 – N5 Start Time: 5 1 2 3 4 Arrival Time: 7 7 7 8 9 Time Spent: 6 5 4 4 4
Use node cost series instead of a scalar node cost. [2,∞, ∞, ∞,2,2] [1,2,2,2,2,2] N1 Use Label-correcting approach instead Greedy methods. N2 N3 Best Start Time Shortest Path Algorithm Challenges (1) Best Start Time shortest paths need not have optimal prefixes. Optimal solution for the shortest path from N1 to N3 is suboptimal for N1 to N2 due to the wait at N2. (2) Correctness: Lack of FIFO property. (3) Termination of the algorithm : An infinite non-negative cycle over time Finite time windows are assumed. Costs assumed constant after T.
Best Start Time Shortest Path • Label Correcting Vs. Label Setting Algorithms (*) Two-Q Algorithm Data Structure used – Pair of queues Q1, Q2 Q1 – Set of nodes scanned (expanded) before (repeated expansion) Q2 – Set of nodes not scanned before (first expansion) Nodes from Q1 are given preference * S. Pallottino, Shortest Path Methods: Complexity, Interrelations and New Propositions, Networks, 14:257-267, 1984.
(, , , , ) Best Start Time Shortest Path Algorithm Algorithm: • Each node has a cost series. • Node to be expanded is selected at random. • Every entry in the cost series of ‘adjacent’ nodes are updated (if there is an improvement in the existing cost). Cu(t) = min(Cu(t), uv(t) + Cv(t+ uv(t)) N2 N5 is selected; [0,0,0,0,0] N4 N5 N1 Iteration 1: t=1: CN4(1) > (N4N5(1) + CN5(1+ N4N5(1))) [4,4,3,3,3] N3 ∞ > (4 + CN1(1+4))
Best Start Time Shortest Path Algorithm • Key Ideas • Label correcting Algorithm for every time instant • Handles non-FIFO travel times • Finds the minimum travel time from all shortest paths
Length of Time Series Real Dataset (without time series) Time Series Generation Road network with travel time series Network Expansion TAG Based Algorithms Shortest Path Algorithms on Time Expanded Graph Run-time Run-time Data Analysis Performance Evaluation: Experiment Design Experimental Setup Time expanded network Goals 1. Compare TAG based algorithms with algorithms based on time expanded graphs (e.g. NETFLO): - Performance: Run-time 2. Test effect of independent parameters on performance: - Number of nodes, Length of time series Experiment Platform: CPU: 1.77GHz, RAM: 1GB, OS: UNIX.
Performance Evaluation: Dataset Minneapolis CBD [1/2, 1, 2, 3 miles radii] • Road data • Mn/DOT basemap for MPLS CBD.
(*) All edge and node parameters might not display time-dependence. (**) D. Sawitski, Implicit Maximization of Flows over Time, Technical Report (R:01276),University of Dortmund, 2004. Comparison of Storage Cost • For a TAG of n nodes, m edges and time interval of length T, • If there are k edge time series in the TAG , storage required for time series is O(kT). (*) • Storage requirement for TAG is O(n+m+kT) • For a Time Expanded Graph, • Storage requirement is O(nT) + O(n+m)T(**) • Experimental Evaluation
Performance Evaluation :Experiment Results 1 Experiment 1: Effect of Number of Nodes Setup: Fixed length of time series = 100 Shortest Path – Best Start Time Shortest Path – Given Start Time • TAG based algorithms are faster than time-expanded graph based algorithms.
Performance Evaluation : Experiment Results 2 Experiment 2: Effect of Length of time series. Setup: fixed number of nodes = 786, number of edges = 2106. Shortest Path – Best Start Time Shortest Path – Given Start Time • TAG based algorithms run faster than time-expanded graph based algorithms.
Comparison of Algorithm Complexity For a network of n nodes and m edges and a time interval of length T (*) B.C. Dean, Algorithms for Minimum Cost Paths in Time-Dependent Networks, Networks, 44(1) pages (41-46), 2004. (**) B. George, S. Kim, S. Shekhar, Spatio-temporal Network Databases and Routing Algorithms: A Summary of Results, Proceedings of International Symposium on Spatial and Temporal Databases (SSTD’07), July 2007.
Conclusion Key Insights • Fixed Start time shortest paths – Greedy strategy gives optimal solutions. • Flexible Start time – Greedy strategy need not give optimal solution. (Label correcting method)
Conclusions • Time Aggregated Graph (TAG) • Time series representation of edge/node properties • Non-redundant representation • Often less storage, less computation time • Evaluation of the Model using Case Studies • Transportation Network Routing Algorithms • Shortest Path for Fixed Start Time • Shortest Path for Fixed Start Time • Sensor Data Representation
Future Work • Algorithms • Performance Tuning of Best Start Time Algorithm • Incorporate capacities on nodes/edges and develop optimal algorithms for Evacuation Planning. • Incorporate time-dependent turn restrictions in shortest path computation. • Develop ‘frequent route discovery’ algorithms based on TAG framework.
Future Work • BEST-TAG Algorithm • Performance Tuning • Current Complexity – O(n2mT) • Real datasets Heuristics • Proof of Optimality (all cases)
Future Work - Algorithms Evacuation Planning • Problem Statement Given: (i) A transportation network, a directed graph G = ( N, E ) (ii) Capacity constraints for each edge and node, (iii) Time-dependent travel time for each edge, (iv) Number of evacuees and source nodes (v) Evacuation destinations. Find : Evacuation plan consisting of a set of origin-destination routes & scheduling of evacuees on each route. Objective: Minimize evacuation egress time, Computational cost. • Optimize evacuation time subject to time-dependent travel times & Capacity constraints.
Future Work - Algorithms Frequent route discovery Algorithm • Motivation: Crime Analysis Effective patrolling • Routes are time-dependent • Time-dependent schedule of Public transportation Route discovery on Spatio-temporal networks (Journey-to-crime)* • Crime data is Spatio-temporal Explore TAG as a model for Spatio-temporal network data Spatio-temporal data mining. * CrimeStat 3.0, Ned Levine & Associates
tc(u,v,w1) w1 v u tc(u,v,w2) w2 w1 w2 u v Travel time series Future Work - Algorithms Shortest Path with time-dependent turn restrictions • Problem Statement Given: (i) A transportation network, a directed graph G = ( N, E ) (ii) Time-dependent travel time for each edge, (iii) Time-dependent turn costs (iv) Source node, Destination node Find : Shortest Path from the source to destination Objective: Minimize Computational cost. For each node v, (degee (u) +1)T costs are maintained.
Persistence • Shared • Interrelated • Conceptual level • Extend Pictogram-enhanced ER model. • Logical level • Formulate a complete set of logical operators • Physical level • Add spatial properties to nodes, edges. • Design indexing methods for time-aggregated graph. • Explore the possibility of infinite time windows. • Formulate new algorithms. Future Work • Spatio-temporal Network Databases • Three-Schema Architecture
References • ESRI, ArcGIS Network Analyst, 2006. • Oracle, Oracle Spatial 10g, August 2005. • M. Erwig, R.H. Guting, Explicit Graphs in a Functional Model for Spatial Databases, IEEE Transactions on Knowledge and Data Engineering, 6(5), 1994. • S. Shekhar, D. Liu, Connectivity Clustered Access Method for Networks and Network Analysis, IEEE Transactions on Knowledge and Data Engineering, January, 1997. • L.R. Ford, D.R. Fulkerson, Constructing maximal dynamic flows from static flows, Operations Research, 6:419-433, 1958. • E. Kohler, K. Langtau and M. Skutella, Time expanded graphs for time-dependent travel times, Proc. 10th Annual European Symposium on Algorithms, 2002. • D.E. Kaufman, R.L. Smith, Fastest Path in Time-dependent Networks for Intelligent Vehicle Highway Systems Applications, IVHS Journal, 1(1), 1993. • K. Mouratidis, M. Yiu, D. Papadias, N. Mamoulis. Continuous Nearest Neighbor Monitoring in Road Networks. Proceedings of the Very Large Data Bases Conference (VLDB), pp. 43-54, Seoul, Korea, Sept. 12 - Sept. 15, 2006. • B.C. Dean, Algorithms for Minimum Cost Paths in Time-Dependent Networks, Networks, 44(1) pages (41-46), 2004.
Thank you. Questions and Comments ?