Sie sind auf Seite 1von 25

Network Analysis

in GIS

Hari Shankar

Scientist SD
Geoinformatics Department
Indian Institute of Remote Sensin
Dehradun

Also called linear complex, 1D complex

Network: A definition
Any system of interconnected features through which the resources flow/ communication
achieved. Representing some geographic phenomenon.

A graph is a defined as G= (V, E)


V(G) = {V1, V2, , Vn}, E(G) = {(Vi, Vj)} or E(G) = {E1, E2, ., Em}

Features: Only point & Line


No polygon Feature
Resource: Anything which is
moving through these features

5
7
9

8
9
6
4
7

Connected, Un-weighted
Planar, Undirected

Disconnected, Un-weighted
Planar, Undirected

Connected vs. Disconnected Graphs


Directed vs. Undirected Graphs
Planar vs. Non-planar Graphs

Connected, Un-weighted
Planar, Directed

Similarity with GIS:


In GIS point and line
features can be created
very easily and analysis
can be performed

7
8

Connected, Weighted
Planar, Directed

Weight Function or Cost Function


Cost Factor or Impedance Factor
Type: Unidirectional/Bidirectional
Positive/Negative ,
From-To & To-From

Network Analysis & Real World Examples


Solving
problems
involving networks
Goal is efficiency
Saving time and money
It can be performed on
Raster or Vector data
layers.

Network analysis mostly


eals with physical lines.
rtual lines do not often
fect the mobility or
ructure of the network.

Transportation Networks
Utility Networks
Network analysis is the example
of Spatial analysis in GIS
Elements of Network

Links (line)
Nodes (Junctions)
Turns
Impedance
Resource Demand
Angle
Blocks
Facility points
Stops

Network Related Problems/Applications

1. Shortest Path Problem (Driving Time


Analysis, Optimal Routing, Closest
facility analysis, Driving Directions)
2. Supply-Demand Problem (TSP/VRP)
3. Minimum Spanning Tree Problem
4. Chinese Postman Problem
5. Maximum Flow Problem

1. Shortest Path Problem


Path: A path in a graph G is a sequence of nodes x1, x2, ,xk, such that there is an edge from each node
the next one in the sequence.
Shortest Path: A path of minimum impedance (minimum cost).

Dijkstras Algorithm
Example
S=<> Q=<s,t,x,z,y>
t

10
4

Q=<y,t,x,z>

10

9
2

10
s

S=<s>

5
y

5
y

S = <s,y>
t

s 0
2

5
y

S = <s,y,z,t>

x
14

10
3
4

10
3
4

9
6

Q = <z,t,x>

Q = <x>

s 0

x
t

13
9
8

s 0

7
z

Successive Paths?
2

8
13
14

10
9

5
y

5
y

S = <s,y,z,t,x>

S = <s,y,z>
1

10
3

7
z

Q=<t,x>
x

9
4
6

7
z

Q=<>

4) From any Origin (O) to any Destination (D) ..Floyds Algorithm

3) From any Origin (O) to a given Destination (D)

s 0
1

2) From a given Origin (O) to any Destination (D)

t
8
10

1) From a given (fixed) Origin (O) to a given Destination (D)

Example (cont.)
x

m
Ai B
j
A i j1 B j

2. Supply-Demand Problem

j1

Supply

Demand

A1

B1

A2
.
.
.
.
.
.
An

B2
.
.
.
.
.
.
Bm

Methods of Solution
1. Basic Feasible Solution
North-West (NW) Corner Rule
Minimum Cost Method
Penalty Cost Method
(Vogels Approximation Method)
2. Optimal Solution
Stepping Stone Method
Modified distribution Method (MODI
or u-v method

Best Examples are Vehicle


Routing Problem and
Travelling Salesman Problem

Example: Vehicle Routing Problem


Store-10,
,
,
,

,
,


Store-3,
, ,
,
,
,

ore-11,
,
,
,

,
,

Store-12,
,
,
,

Store-13,
,
,
,

,
,

,
,

Store-4,
, ,
,
,
,

Depot

Store-6,
, ,
,
,
,

Store-8,
, ,
,
,
,

Store-2,
, ,
,
,
,

], Q

Store-7,
, ,
,
,
,

Name, Type
of Material,
Type & No. of
Vehicles

Store-9,
, ,
,
,
,

Store-5,
, ,
,
,
,

Store-1,
, ,
,
,
,

= Violation Time at store i


= Demand at store i
, = Time Window of store i
= Service Time at store i
= Type of delivered material
Q = Set of Vehicle Capacities at each

3. Minimum Spanning Tree Problem

Tree: A connected graph consisting of n nodes and n-1 arcs without circuits (loops

Graph

Minimum Spanning Tree

Spanning Tree: A sub-graph of a graph which is a tree and spans all nodes of the
graph.
Minimum Spanning Tree: A spanning tree of graph with minimum weight.

Forest: A graph that contains no cycle is a forest.

Solution of MST

Prims Algorithm: Span out from one vertex

Kruskals Algorithm: Edge by edge

MST by Prims Algorithm


0

28
1

10

16

14
6

24

25
0

22

18 12

10

10
6

25

10
2

25
4

4
3

22

28
1

10

16

14
6

24

25

18 12

22

10

0
1

10

10
16

25

12

22

25

12

22

16

14
6

25

12

22

MST by Kruskals Algorithm


0

10

12

14

28

16

10
14

3 18 6
3 22 4
4 24 6
4 25 5
28

10

16
2

24

25

18 12

22

4
3

10

12

14

16

3 18 6
3 22 4
4 24 6
4 25 5
0

28

Property of a Tree should be maintained

0
1

10

10

10

14
6

12

4
3

12

14

12

4
3

+ 3

0 10 5
2

12

Property of a Tree should be maintained

1 14 6
0

1 16 2

10

3 18 6
3 22 4
4 24 6
4 25 5
0

28

14
6

14

16

12

16
2

25

12
22

10

22

cycle
cost = 10 +25+22+12+16+14

4. Chinese Postman Problem


B

E
1

14

12

C
9

8
3

Eulerian trail starting and ending at A not possible. Why not?

E
1

14

12

C
9

8
3

Solution?

E
1

14

12

C
9

8
3
3

Best Solution?

E
1

14

12

C
2
9

8
3
3

E
1

14

12

C
2
9

8
3
3

Still not the best solution

E
1

2
2

14

12

C
2
9

8
3
3

Best solution!

E
1

2
2

14

12

C
2
9

8
3
3

Now find an Eulerian trail, starting and ending at A.

Chinese Postman Algorithm


Aim: To find the least-weight closed trail containing every arc

Step 1: Find all the nodes of odd order.


Step 2: For each pair of odd nodes find the connecting path of
minimum weight.
Step 3: Pair up all the odd nodes so that the sum of the weights of
the connecting paths from Step 2 is minimised.
Step 4: In the original graph, duplicate the minimum weight paths
found in Step 3.
Step 5: Find a trail containing every arc for the new (Eulerian)
Graph.

5. Maximum Flow Problem

n a capacitated network, we wish to send as much flow as possible between two


special nodes, a source node s and a sink node t, without exceeding the capacity o
any arc

Capacitated Network

Augmented Path cum Residual Network

Practical examples
- liquids flowing through pipes
- current through electrical network

- traffic flow through roads


- information through communication network

Das könnte Ihnen auch gefallen