Você está na página 1de 27

CVEN 4402

Network Representation
Dr. Lauren Gardner
Main Texts
(B) Bell, M.G.H., and Iida, Y. Transportation Network Analysis Wiley,
1997

(A) Ahuja, R.K., Magnanti, T.L., and Orlin, J.B., Network Flows: Theory,
Algorithms, and Applications, Prentice Hall, N.J. 1993.

(S) Sheffi, Yosef. Urban Transportation Network: Equilibrium


Analysis with Mathematical Programming Methods, 1992.
Note: Free online download available at

http://web.mit.edu/sheffi/www/urbanTransportation.html
Network Notation, Formulation & Network Representation
(S) Chapter 1, (A) 2.1-2.2

Implementation Rep. (Forward Star, others)


(A) 2.3

Complexity
(A) 3.3
Terminology Preview

Node Node
Link

Node Junction of two or more links (set N)


Link/Arc Conduit of flow between two nodes (set A)
Degree Number of arcs connected to a node (indegree/outdegree)
Centroid Source/Sink node
Connector Link between a centroid and an internal node
Path Sequence of nodes connected by links (directed/undirected)
Cycle A path with the same node at either end (directed)
Tree A network where each node can be visited only once
(directed out, directed in)
Network Definitions
Nodes are often associated with some aspect of travel demand
Travellers want to move from some origin node to another destination
node

Links are often associated with measurements of congestion


The more travellers on a particular link, the higher the congestion
So congestion might be represented with a function (of the # of
travellers)
Simple Network
3
B D
4 5

A
1 G
3 3 E

C
2 6
F
Less Simple Network
Example Network Representation
Example Network Representation
Topic: Network Representation
Incidence Matrix table of variables stating the presence or
absence of a relationship between network elements.

It describes the network topology


We need to store the topology and data (cost,
capacities, demands, etc)
There are multiple ways to store a network.
Need to consider why we want to use the information
For a given implementations it matters how we store
and access the network, some more efficient

10
Node-Link Incidence Matrix
Node-Link Incidence Matrix (n x m):
One row per node,
One column per arc.
A column representing arc (i,j) has -1 in the row for node i and +1
in the row for node j
Node-Link Incidence Matrix
(cij ,uij)
i j

(15,40)
(25,30)
2 4
(15,30)

1 (45,10)
(35,50) (45,60)
(35,50)
3 5
(25,20)
(1,2) (1,3) (2,4) (3,2) (4,3) (4,5) (5,3) (5,4)
1
2
3
4
5
Node-Link Incidence Matrix
(cij ,uij)
i j
1.How much space is required in the worst-case?
(15,40)
2.How many non-zeros will exist?
2 4 3.How many steps are required to find all outgoing
(25,30)
(15,30) arcs, that is the set A(i), from node i ?
4.How would we store the data (e.g. link
1 (45,10)
(35,50) (45,60) cost/capacity)?
(35,50)
3 5
(25,20)
(1,2) (1,3) (2,4) (3,2) (4,3) (4,5) (5,3) (5,4)
1 -1 -1 0 0 0 0 0 0
2 1 0 -1 1 0 0 0 0
3 0 1 0 -1 1 0 1 0
4 0 0 1 0 -1 -1 0 1
5 0 0 0 0 0 1 -1 -1
Node-Node Adjacency Matrix
Node-Node Adjacency Matrix (n x n):
Row (i) and col (j) for each node
Matrix entry, eij = 1, if (i,j) A, 0 otherwise.

14
Node-Node Incidence Matrix
(cij ,uij)
i j

(15,40)
(25,30)
2 4
(15,30)

1 (45,10)
(35,50) (45,60)
(35,50)
3 5
(25,20) 1 2 3 4 5
1
2
3
4
5
Node-Node Incidence Matrix
(cij ,uij)
i j
1.How much space is required in the worst case?
(15,40) 2.How many non-zeros will exist?
(25,30)
2 4 3.How many steps are required to find all outgoing
(15,30) arcs, that is the set A(i), from node i ?
1 (45,10)
(35,50) (45,60)
(35,50)
3 5
(25,20) 1 2 3 4 5
1 0 1 1 0 0
2 0 0 0 1 0
3 0 1 0 0 0
4 0 0 1 0 1
5 0 0 1 1 0
Adjacency List
Arc Adjacency List:
Defined as the set of arcs emanating from node i,
A(i) ={(i,j) A: jN}
|A(i)| = out-degree of node i
sum |A(i)| over all i= ?

Node Adjacency List:


Defined as the set of nodes adjacent to node i,
A(i) ={jN: (i,j) A}
sum |A(i)| over all i= ?

Store as linked list (collection of cells containing one or more fields each)
Adjacency List
(cij ,uij)
i j

(15,40)
(25,30)
2 4 i j cij uij
(15,30)

1 (45,10)
(35,50) (45,60) 1 2 25 30 3 35 50 0
(35,50)
3 5 2 4 15 40 0
(25,20)

3 2 45 10 0

4 3 15 30 5 45 60 0

5 3 25 20 4 35 50 0
Forward Star Representation
A type of Adjacency List (list of outgoing arcs for node i ) defined by two arrays
(can use linked-lists if preferred)

1. Define a unique number to each arc and order them accordingly

2. Order arcs emanating from the same node by their terminating node
1. Start list with links emanating from node 1, then those from node 2, etc
2. In this ordered list, add arc information such as cost, capacity, etc.

3. Now, we must create pointers into this list


1. Denote for each node i, point(i) which indicates the first arc in the arc
list that emanates from node i
2. If node i has no outgoing arcs point(i) then point(i)=point(i+1)

19
Forward Star
(cij ,uij)
i j

(15,40)
(25,30)
2 4
1 1
(15,30)
2 2
1 (45,10)
(35,50) (45,60)
3 3
(35,50)
3 5 4 4
(25,20)
5 5

6 6

8
Forward Star
(cij ,uij)
i j

(15,40)
(25,30)
2 4
1 1 1 1 2 25 30
(15,30)
2 3 2 1 3 35 50
1 (45,10)
(35,50) (45,60)
3 4 3 2 4 15 40
(35,50)
3 5 4 5 4 3 2 45 10
(25,20)
5 7 5 4 3 15 30

6 6 4 5 45 60

7 5 3 25 20

8 5 4 35 50

Efficient storage for determining set of OUTGOING arcs from any given node.
Reverse Star Representation
A type of Adjacency List (list of outgoing arcs for node i ) defined by two arrays
(can use linked-lists if preferred)

1. Define a unique number to each arc and order them accordingly

2. Order arcs terminating to the same node by their emanating node


1. Start list with links terminating at node 1, then those to node 2, etc
2. In this ordered list, add arc information such as cost, capacity, etc.

3. Now, we must create pointers into this list


1. Denote for each node i, point(i) which indicates the first arc in the
arc list that terminates to node i
2. If node i has no incoming arcs point(i) then point(i)=point(i+1)

22
Reverse Star
(cij ,uij)
i j
45 10 3 2 1 1 1
(15,40)
(25,30)
2 4 25 30 1 2 2 1 2

(15,30) 35 50 1 3 3 3 3
1 (45,10)
(35,50) (45,60) 15 30 4 3 4 6 4

(35,50) 25 20 5 3 5 8 5
3 5
(25,20) 35 50 5 4 6 9 6

15 40 2 4 7

45 60 4 5 8

Efficient storage for determining set of INCOMING arcs from any given node.
Forward/Backward Star cont.
1. How much space is needed?

2. How many steps are required to find all outgoing arcs?


1. That is the set A(i), from node i ?

3. How do we get this information?

24
Forward Star
(cij ,uij)
i j

(15,40)
(25,30)
2 4
1 1 1 1 2 25 30
(15,30)
2 3 2 1 3 35 50
1 (45,10)
(35,50) (45,60)
3 4 3 2 4 15 40
(35,50)
3 5 4 5 4 3 2 45 10
(25,20)
5 7 5 4 3 15 30

6 6 4 5 45 60

7 5 3 25 20

8 5 4 35 50

Efficient storage for determining set of OUTGOING arcs from any given node.
Now, Back to Network modelling

Lets use this notation to analyse networks:

Search
Connectivity
Routing
Path travel times
Shortest Path Algorithms
Thank you!

Você também pode gostar