Time-Aggregated Graphs-Modeling Spatio-temporal

Networks

Prof. Shashi Shekhar

Department of Computer Science and Engineering

University of Minnesota

August 29, 2008

Selected 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.

Outline

- Introduction
- Motivation
- Problem Statement
- Related Work

- Contributions

- Representation

- Routing Algorithms

- Conclusion and Future Work

Motivation

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

Motivation

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

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) Predictable future
- (ii) Changes occur at discrete instants of

time, - (iii) Logical Physical independence,

Problem 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)

Challenges in Representation

- Conflicting Requirements

- Expressive Power

- Storage Efficiency

- New and alternative semantics for common graph

operations.

- Ex., Shortest Paths are time dependent.

Related Work in Representation

(1) Snapshot Model

Guting04

(2) Time Expanded Graph (TEG)

Kohler02, Ford65

Limitations 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.

Outline

- Introduction
- Motivation
- Problem Statement
- Related Work

- Contributions

- Representation

- Time Aggregated Graph (TAG)

- Case Studies

- Routing Algorithms

- Conclusion and Future Work

Proposed 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

Time Aggregated Graph

ew1,..,ewT

TAG (N,E,T,

nw1nwT ,

nwi N? RT,

ewi E? RT

Performance 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.

TAG 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 ()

- Experimental Evaluation

- Storage cost of TAG is less than that of TEG if k

ltlt m.

- TAG can benefit from time series compression.

Outline

- Introduction
- Motivation
- Problem Statement
- Related Work

- Contributions

- Representation

- Time Aggregated Graph (TAG)

- Routing Algorithms

- Conclusion and Future Work

Routing 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

Routing 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

Routing 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.

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.

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

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.

SP-TAG Algorithm for Given Start Time

Greedy Algorithm (SP-TAG) for FIFO

- 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 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

SP-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.

SP-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

- 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))

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))

- 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 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.

SP-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.

SP-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.

SP-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),

SP-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

SP-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

Our Contributions

Time Aggregated Graph (TAG)

- Representation

- Routing Algorithms

- Shortest Path for a given start time

in general (FIFO non-FIFO) Networks

- Analytical Experimental Evaluation

Related 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

Proposed 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!!

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

NF-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.

NF-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

NF-SP-TAG Analytical Evaluation

- Computational Complexity

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)

Performance 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

Performance 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.

Performance 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.

Conclusions

- Time Aggregated Graph (TAG)
- Time series representation of edge/node

properties - Non-redundant representation
- Often less storage, less computation time

- Routing Algorithms

- Faster shortest path for fixed start time in

general (FIFO non-FIFO networks.

Routing 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!!

Contributions (Broader Picture)

- Time Aggregated Graph (TAG)

- Routing Algorithms

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

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.

CP-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.

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

Best 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.

Future Work

- Formulate new algorithms.

- Incorporate time-dependent turn restrictions in

shortest path computation. - Develop frequent route discovery algorithms

based on TAG framework.

Thank you.