Title: Time-Aggregated Graphs- Modeling Spatio-temporal Networks
1Time-Aggregated Graphs-Modeling Spatio-temporal
Networks
Prof. Shashi Shekhar
Department of Computer Science and Engineering
University of Minnesota
August 29, 2008
2Selected 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,
Proceedings of 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, Volume XI, Special issue of
Selected papers from ER 2006, December 2007. - B. George, J. Kang, S. Shekhar, STSG A Data
Model for Representation and Knowledge Discovery
in Sensor Data, Accepted for publication in
Journal of Intelligent Data Analysis. - B. George, S. Shekhar, Routing Algorithms in
Non-stationary Transportation Network,
Proceedings of International Workshop on
Computational Transportation Science, Dublin,
Ireland, July, 2008. - B. George, S. Shekhar, S. Kim, Routing Algorithms
in Spatio-temporal Databases, Transactions on
Data and Knowledge Engineering (In submission).
- 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, Proceedings of
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.
3Outline
- Introduction
- Motivation
- Problem Statement
- Related Work
- Conclusion and Future Work
4Motivation
1) Transportation network Routing
- Delays at signals, turns, Varying Congestion
Levels ? travel time changes.
2) Crime Analysis
- Identification of frequent routes (i.e.) Journey
to Crime
5Motivation
Non-FIFO Travel times
- Arrivals at destination are not ordered by the
start times.
- Can occur due to delays at left turns, multiple
lane traffic..
Different congestion levels in different lanes
can lead to non-FIFO travel times.
Signal delays at left turns can cause non-FIFO
travel times.
Pictures Courtesy http//safety.transportation.or
g
6Problem 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) Predictable future
- (ii) Changes occur at discrete instants of
time, - (iii) Logical Physical independence,
-
7Problem Definition (contd.)
- Predictable Future
- Values of edge attributes largely predictable
- Assumption not unreasonable in planning scenarios
- Operational scenarios reasonable in the absence
of random events (ex., public transportation
scheduling)
8Challenges in Representation
- New and alternative semantics for common graph
operations.
- Ex., Shortest Paths are time dependent.
9Related Work in Representation
(1) Snapshot Model
Guting04
(2) Time Expanded Graph (TEG)
Kohler02, Ford65
10Limitations of Related Work
- High Storage Overhead
- Redundancy of nodes across time-frames
- Additional edges across time frames in TEG.
- Computationally expensive Algorithms
- Increased Network size due to redundancy.
- Inadequate support for modeling non-flow
parameters on edges in TEG.
- Lack of physical independence of data in TEG.
11Outline
- Introduction
- Motivation
- Problem Statement
- Related Work
- Time Aggregated Graph (TAG)
- Conclusion and Future Work
12Proposed Approach
Snapshots of a Network at t1,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 ti
13Time Aggregated Graph
ew1,..,ewT
TAG (N,E,T,
nw1nwT ,
nwi N? RT,
ewi E? RT
14Performance Evaluation Dataset
Minneapolis CBD 1/2, 1, 2, 3 miles radii
Dataset Nodes Edges
1. (MPLS -1/2) 111 287
2. (MPLS -1 mi) 277 674
3. (MPLS - 2 mi) 562 1443
4. (MPLS - 3 mi) 786 2106
Road data Mn/DOT basemap for MPLS CBD.
15TAG Storage Cost Comparison
- For a TAG of n nodes, m edges and time interval
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(nmkT)
- For a Time Expanded Graph,
- Storage requirement is O(nT) O(nm)T ()
- Storage cost of TAG is less than that of TEG if k
ltlt m.
- TAG can benefit from time series compression.
16Outline
- Introduction
- Motivation
- Problem Statement
- Related Work
- Time Aggregated Graph (TAG)
- Conclusion and Future Work
17Routing Algorithms- Challenges
- Violation of optimal prefix property
- Not all optimal paths show optimal prefix
property.
- New and Alternate semantics
- Termination of the algorithm an infinite
non-negative cycle over time
18Routing Algorithms- Challenges
Find the shortest path travel time from N1 to N5
for start time t 1.
N1
N2
N5
N3
N4
Solution Reaches N5 at t8. Total
time 7
1
8
1
8
8
8
Optimal path Reach N4 at t3
Wait for t4
Reach N5 at t6 Total
time 5
2
1
8
3
2
8
3
3
3
2
1
8
4
3
2
3
1
8
5
3
3
1
2
8
19Routing Algorithms Related Work
SP-TAG, SP-TAG,CapeCod
Limitations
Label correcting algorithm over long time periods
and large networks is computationally expensive.
LP algorithms are costly.
20Shortest 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.
21Shortest 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
t1 at N1? Traversing N2-N3 as soon as N2 is
reached, would give sub optimal solution.
FIFO travel times ? Greedy algorithms, A search
Non-FIFO travel times ? ATST transformation ?
Greedy Algorithm
(3) Termination of the algorithm An infinite
non-negative cycle over time
Finite time windows are assumed.
22SP-TAG Algorithm for Given Start Time
Greedy Algorithm (SP-TAG) for FIFO
- Every node has a cost (? arrival time at the
node).
- Select the node with the lowest cost to expand.
- Traverse every edge at the earliest available
time.
Source N1 Destination N5 time t1
(3)
(8)
8
1
8
8
8
N2
?,1,1,1,1
1,1,1,1,1
8
8
1
3
3
2,?, ?, ?,2
N4
N5
(1)
N1
8
1
3
4
3
(8)
(4)
(8)
(7)
2,2,2,2,2
2,2,2,2,2
8
1
3
4
3
N3
(8)
(3)
1
3
3
4
7
23SP-TAG Algorithm for Given Start Time
- Initialize
- cs 0 ?v (? s), cv 8.
- 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), cu)
- // min_t finds the
earliest departure time for (u,v) - If t ?u,v(t) lt cv
- cv t ?u,v(t)
- parentv u
- insert v in Q if it
is not in Q -
- Update Q.
-
24SP-TAG Algorithm for a 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 Dijkstras algorithm.
- Difference - Earliest availability of edge
- - Admissible guarantees optimality
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))
25Analytical Evaluation
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))
- 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.
26Analytical 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 TmT) ()
- Lemma Time-aggregated graph performs
asymptotically better than time expanded graphs
when log (n) lt T log (T).
B. C. Dean, Algorithms for Minimum Cost Paths
in Time-dependent Networks, Networks 44(1),
August 2004.
27SP-TAG (A based Algorithm) for FIFO
Cost function f(n) g(n) h(n)
g(n) Actual cost from the source node to node n
h(n) Estimated cost node n to the destination
node n
Actual Cost g(n) Arrival time at node n
Heuristic function h(n)
Lemma 1 Heuristic function h(n) is admissible.
? A search will result in an optimal solution.
Lemma 2 Heuristic function h(n) is monotone.
? Search is optimal ? Closed nodes are not
reopened.
28SP-TAG
Lemma Heuristic function h(n) is admissible.
Proof
S_TAG Static network derived from TAG with
minimum travel time on each edge. Let P be the
shortest path from node i to the destination
d. Shortest path travel time SP min ? dpq
min
pq ? P
Let P(t) be the shortest path in TAG that starts
at i at time t.
P(t) is a feasible path in S_TAG.
29SP-TAG
Lemma Heuristic function h(n) is monotone.
Proof
A heuristic is monotone if h(i) ? dij h(j),
?ij ? E
min
min
Since dij ? dij (t),
30SP-TAG
min
SPi-d for every node i ? d
- Preprocess to find the
- Initialize
- As tstart ?u (? s), Au
8, fu 8. - fs SPs C ? S s .
- while u ? d do
- u extract_min(Q) close u (C C
? u) S S u - for each node v adjacent to u do
- if fv gt Au duv(Au)
SPvd(Au) - Av Ai
du,v(Au) - fv Au
duv(Au) SPvd(Au) - S S ? v if it is
not in Q -
-
31SP-TAG Execution Trace
To find the shortest path from N1 to N5 for start
time t 1
Heuristic h SPminN1,N2,N3,N4 4,3,4,2
f(N1) g(N1) h(N1) 1 4 5 f 8
32Our Contributions
Time Aggregated Graph (TAG)
- Shortest Path for a given start time
in general (FIFO non-FIFO) Networks
- Analytical Experimental Evaluation
33Related Work Label Correcting Approach()
- Selection of node to expand is random.
- Algorithm terminates when no node gets updated.
N1
N2
N3
N4
N5
t8
t3
t4
t6
t7
t1
t2
t5
- Implementation used the Two-Q version O(n2T
3(nm)
() Cherkassky 93,Zhan01, Ziliaskopoulos97
34Proposed Approach Key Idea
When start time is fixed, earliest arrival ?
least travel time
(Shortest path)
Arrival Time Series Transformation (ATST) the
network
travel times ? arrival times at end node ? Min.
arrival time series
Result is a Stationary TAG.
Greedy strategy (on cost of node, earliest
arrival) works!!
35 SP Algorithm in Non-FIFO Networks (NF-SP-TAG)
Greedy strategy on transformed TAG
Cost of a node Arrival time at the node
Expand the node with least cost.
Update costs of adjacent nodes.
Trace of NF-SP-TAG Algorithm
N1
N2
N5
N3
N4
1
8
8
1
8
8
2
1
8
3
2
8
3
3
3
1
2
8
4
3
3
2
1
8
5
3
2
3
1
6
36NF-SP-TAG Algorithm- Pseudocode
- Pre-process the network.
- Initialize
- cs t_start ?v (? s), cv
8. - 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_arrival((u,v), cu)
- if t ?u,v(t) lt cv
- cv t ?u,v(t)
- parentv u
- insert v in Q if it
is not in Q -
- Update Q.
-
37NF-SP-TAG Algorithm - Correctness
NF-SP-TAG Algorithm is correct.
- Earliest arrival for a given start time ?
Shortest path
If it is not, it contradicts the earliest
arrival.
- Algorithm picks the node with the least cost
Ensures admissibility.
- Algorithm updates the nodes based on the minimum
arrival time.
Maintains admissibility since
38NF-SP-TAG Analytical Evaluation
n Number of nodes, m Number of edges, T
length of the time series
- For every node extracted,
- Earliest arrival lookup O(T)
- Priority queue update O(log n)
- Overall Complexity ? O(degree(v). (T log n))
- O(m( T
log n))
- Complexity of shortest path algorithm is O(m(T
log n))
- Complexity of label correcting algorithm is
O(n2T3(nm)
39Performance Evaluation Experiment Design
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,
average node degree. Experiment Platform CPU
1.77GHz, RAM 1GB, OS UNIX.
Experimental Setup
Time expanded network
40Performance Evaluation - Results
Experiment 1 Effect of Number of Nodes (Fixed
Start Time) Setup Fixed length of time series
100
Experiment 2 Effect of Length of time
series. Setup fixed number of nodes 786,
number of edges 2106.
Experiment 1
Experiment 2
- TAG based algorithms are faster than
time-expanded graph based algorithms.
41Performance Evaluation - Results
Experiment 3 Effect of Average Degree of
Network. Setup Length of time series 240.
- TAG based algorithms run faster than
time-expanded graph based algorithms.
42Conclusions
- Time Aggregated Graph (TAG)
- Time series representation of edge/node
properties - Non-redundant representation
- Often less storage, less computation time
- Faster shortest path for fixed start time in
general (FIFO non-FIFO networks.
43Routing Algorithms Alternate Semantics
Finding the shortest path from N1 to N5..
Start at t3
Start at t1
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!!
44Contributions (Broader Picture)
- Time Aggregated Graph (TAG)
FIFO Non-FIFO
Fixed Start Time (1) Greedy (SP-TAG) (2) A search (SP-TAG) (4) NF-SP-TAG
Best Start Time (3) Iterative A search (TI-SP-TAG) (5) Label Correcting (BEST) (6) Iterative NF-SP-TAG
45Best 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.
46CP-NF-BEST (Best Start Time)
- Key Ideas
- NF-SP-TAG for each start time
- Handles non-FIFO travel times
- Maintains copies of nodes ? logical concurrency
- Terminates when a copy of destination is expanded.
- Algorithm is correct
- NF-SP-TAG correctly computes shortest path for
every instant. - Shortest path is a function of start time and
network parameters. - Since the algorithm computes the SP for every
start time, - it finds the least travel time.
47Best 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
48Best Start Time Shortest Path Algorithm
Time Iterated SP-TAG Algorithm for FIFO Networks
(TI-SP-TAG)
- Key Ideas
- SP-TAG (A based) iterated for every start time.
- Handles FIFO travel times
- Finds the minimum travel time from all shortest
paths - Performance optimization Re-use heuristic costs
from previous iterations.
49Future Work
- Formulate new algorithms.
- Incorporate time-dependent turn restrictions in
shortest path computation. - Develop frequent route discovery algorithms
based on TAG framework.
50Thank you.