+ All Categories
Home > Documents > Network Models

Network Models

Date post: 05-Jan-2016
Category:
Upload: madison
View: 70 times
Download: 1 times
Share this document with a friend
Description:
Network Models. Part 1. Network Models. There is a many of operation research situation is modeled and solved as network ( nodes can connected by branches) There are five network models algorithms 1- Minimal spanning tree 2- shortest-route algorithms 3- maximum-flow algorithms - PowerPoint PPT Presentation
111
Network Models Part 1
Transcript
Page 1: Network Models

Network Models

Part 1

Page 2: Network Models

Network Models

• There is a many of operation research situation is modeled and solved as network ( nodes can connected by branches)

• There are five network models algorithms1- Minimal spanning tree2- shortest-route algorithms3- maximum-flow algorithms4- minimum cost capacitated network algorithms5- Critical path( CPM) algorithms

Page 3: Network Models

Network Models (CONT.)

1- Design of an offshore gas pipeline network connecting wellheads in gulf of Mexico to an inshore delivery points.; the objective of the model is minimize the cost constructing the pipeline.

• The situation represented as Minimal spanning tree.

2- Determination of the shortest route between two cities in a network of roads.

• This situation is shortest-route algorithms

Page 4: Network Models

Network Models (CONT.)

3- determination the maximum capacity (in ton per year) of a coal slurry pipeline network

• This situation is maximum flow algorithms

4- determination of the minimum-cost flow schedule from oil field to refineries through a pipeline network.

• This situation is minimum-cost capacitated network algorithms

Page 5: Network Models

Network Models (CONT.)

5- determination the time schdule (start and completion date) for activities

• This situation is (CPM) algorithms

Page 6: Network Models

Network definitions

• A network consist of set of nodes linked by arcs ( or branches)

• The notion for describing a network is (N, A) where:

– N is set of nodes– A set of arc

Page 7: Network Models

Network definitions (cont.)

• Example

• Flow : the amount sent from node i to node j, over an arc that connects them.

13

2

5

4

N ={ 1,2,3,4,5}

A={(1,2), (1,3),(2,3),(2,5),(3,4),(3,5),(4,2),(4,5)}

Page 8: Network Models

Network definitions (cont.)

• Directed/undirected arcs : • when flow is allowed in one direction the arc is

directed; (that means allow positive flow in one direction and zero flow in the opposite direction)• When flow is allowed in two directions, the arc is

undirected.

• Path : sequence of distinct arcs that join two nodes through other nodes regardless of the direction of flow in each arcs• The nodes are said to be connected if there is a path

between them.8

Page 9: Network Models

9

• Cycle : a path starting at a certain node and returning to the same node without using any arc twice. (or connects a node to itself through other nodes)

Example:

– (2,3),(3,5),(5.2) form of loop– Cycle is directed if it consists of directed path (2,3),

(3,4) and( 4,2)

13

2

5

4

Network definitions (cont.)

Page 10: Network Models

• Tree : is connected network that may involve only a subset of all nodes of network without cycle.

• Spanning tree : a tree that connects all the nodes in a network with no cycle( it consists of n -1 arcs).

Network definitions (cont.)

1

2

3

13

2

5

4

1

2

3

4

5Tree Spanning

Tree

Page 11: Network Models

Minimal Spanning tree

• It deals with linking the nodes of network, directly or indirectly, using shortest length of connecting branches.

• The typical application occurs in construction of paved roads that link several towns.

Page 12: Network Models

Minimal Spanning tree

• The step of procedure are given as follows:– Let N={ 1,2,…n} set of nodes– Ck= set of nodes that have been permanently connected

at iteration K– Ck`= set of nodes as yet to be connected permanently.

• Step 0: set C0= 0, C0`=N• Step 1: start with any node I; set C1={i}, C1`=N-{i}• General step: selected node j in unconnected set

Ck-1` that yield in shortest arcs to a node in the connected set . Link j permanently to Ck-1 and remove it from Ck-1`

- If the set of unconnected nodes is empty stop. Otherwise set k=K+1 and repeat the step

Page 13: Network Models

Example (cont.)

• Midwest TV cable company is in the process of providing cable service to five new housing development service areas.

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

Page 14: Network Models

Example (cont.)

• The algorithms start at node 1

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

Page 15: Network Models

Example (cont.)

• Iteration 1

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C1

C1 `

Page 16: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C1 `

C1

Page 17: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C2

Page 18: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C2

C2 `

3

4

6

52

1

1957

4 63

5

10

83

Page 19: Network Models

Example (cont.)

• iteration2

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C2

C2 `

Page 20: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C2

C2 `

Page 21: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C3

3

4

6

52

1

1957

4 63

5

10

83

C3 `

Page 22: Network Models

Example (cont.)

• iteration3

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C3

C3 `

Page 23: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C3

C3 `

Page 24: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C4

3

4

6

52

1

1957

4 63

5

10

83

C4 `

Page 25: Network Models

Example (cont.)

• iteration4

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C4

C4 `

Page 26: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C4

C4 `

Page 27: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C5

3

4

6

52

1

1957

4 63

5

10

83

C5 `

Page 28: Network Models

Example (cont.)

• iteration5

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C5

C5 `

Alternate links

Page 29: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

C5

C5 `

Alternate links

Page 30: Network Models

Example (cont.)

3

4

6

52

1

1

9

5

7

4 6

3

5

10

8

3

Page 31: Network Models

Example (cont.)

• Summery of solution

iteration Minimum distance connecting arc

distance Add arc to tree? Cumulative tree distance

1 (1,2) 1 yes 1

2 (2,5) 3 yes 4

3 (2,4) 4 yes 8

4 (4,6) 3 yes 11

5 (4,3) 5 yes 16

Page 32: Network Models

Example 2

• Apply minimal spanning tree

A

E

C

BD

F2

8

7

7

59

4

38

Page 33: Network Models

Solution

A

E

C

BD

F2

8

7

7

59

4

38

A

E

C

BD

F2

8

7

7

59

4

38

Page 34: Network Models

Solution (cont.)

A

E

C

BD

F2

8

7

7

59

4

38

A

E

C

BD

F2

8

7

7

59

4

38

Page 35: Network Models

Solution (cont.)

A

E

C

BD

F2

8

7

7

59

4

38

A

E

C

BD

F2

8

7

7

59

4

38

Page 36: Network Models

Example 3

9

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 37: Network Models

Solution

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 38: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 39: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 40: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 41: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 42: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 43: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 44: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 45: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 46: Network Models

Solution (cont.)

A

B

C

D

E

FH

I

J

G

6 4

3

99

818

29

8

2

9

97

10

5

4

13

4

Page 47: Network Models

Shortest- Route problem

• The shortest route problem determines the shortest route between a source and destination.

• There are two algorithms to solve shortest-route problems:

• 1- Dijkstra’s algorithm that design to determine the shortest routes between the source node every other node in the network

• 2- Floyd’s algorithms is general because it allow the determination of the shortest route between any two node in network

Page 48: Network Models

Dijkstra’a algorithm

Step0: label the source node(node1) with the permanent label [0,--]. Set i=1

Stepi= (a) compute the temporary labels[ui+dij,i] for each node j that can be reached through node i. provided j is not permanently label. If node j is already label with [uj,k] through another node k and if ui+dij< uj, replace [uj,k] with [ ui+ dij, i]

(b) if all node have premanent label stop. Otherwise select the label [Ur,s] having the shortest distance (=ui) among all temporary label. Set i=r and repeat step i

Page 49: Network Models

Example

• The figure give the route and their length in miles between city 1 and four other cities. Determine the shortest route between city 1 and each of the remaining four cities.

1

2

3

4

5

100

30

20

15

5010

60

Page 50: Network Models

Example(cont.)

• Iteration 0: assign permanent label [0,--] to node 1• Iteration 1: node 2 and 3 can be reached from (the last

permanent labeled) node 1 thus the list labeled node (temporary and permanent) becomes

• For both two temporary label[100,1] and [30,1] node 3 is smallest distance so, status of node 3 is changed to permanent

1

2

3

4

5

100

30

20

1550

1060

Node label status

1 [0,--] permanent

2 [0+100, 1] temporary

3 [0+30,1] temporary

Page 51: Network Models

Example(cont.)

• Iteration2: node 4, and 5 can be reached from node 3 and the list labeled node becomes:

• node 4 is smallest distance so from the temporaries list. so, status of node 4 is changed to permanent

Node label status

1 [0,--] permanent

2 [100, 1] temporary

3 [30,1] Permanent

4 [30+10,3]=[40,3] temporary

5 [30+60,3]=[90,3] temporary

1

2

3

4

5

100

30

20

1550

1060

Page 52: Network Models

Example(cont.)

• Iteration 3: node 2 and 5 can be reached from node4. the list of labeled is updated as

• Node 2 is permanent

Node label status

1 [0,--] permanent

2 [40+12,4]=[55,4] temporary

3 [30,1] Permanent

4 [40,3] Permanent

5 [90,3] or [40+50,4] temporary

1

2

3

4

5

100

30

20

1550

1060

Page 53: Network Models

Example(cont.)

• Iteration 4: only node 3 can be reached from node 2, the node 3 is permanent , so the new list remain the same

• Because node 5 is not lead to other node, it is status will convert to permanent

Node label status

1 [0,--] permanent

2 [55,4] permanent

3 [30,1] Permanent

4 [40,3] Permanent

5 [90,3] or [40+50,4] temporary

Page 54: Network Models

Example(cont.)

• The process ends

• The shortest route between node1 and node2 is:• (2) [55,4](4) [40,3](3) [30,1](1)• So the disired route is 1342 with total length 55

miles

Node label status

1 [0,--] permanent

2 [55,4] permanent

3 [30,1] Permanent

4 [40,3] Permanent

5 [90,3] or [40+50,4] Permanent

Page 55: Network Models

Floyd’s algorithm

• Step0: define starting distance matrix D0 and node sequence matrix S0. the diagonal elements are marked with(-). Set k=1

• General step k: define row k and column as pivot row and pivot column. Apply the triple operation to each element dij in Dk-1. if the condition:

Dik+dkj<dij Is satisfied, make the following changes:• (a) creat Dk by replacing dij in Dk-1 with dik+dkj• (b) create Sk by repacing sij in sk-1 with k. set k=k+1 and

repeat step k.

Page 56: Network Models

Floyd’s algorithm (cont.)

• Step k : if the sum elements on the pivot row and povot coumn is smaller thanassociated intersection elements, the it is optimal to replace the intersection distance by the sum of pivot distance.

• After n step, it can determine the shortest route by using the following rules:

• 1- from D dij gives the shortest distance

• 2- from S determine the intermediate node.

Page 57: Network Models

Example

1

2

3

4

5

3

10

5

6

15

4

D0 s0

Page 58: Network Models

Example (cont.)

• K=1

• We highlight the first column and first row of the Distance matrix and compare all other items with the sum of the items highlighted in the same row and column.

• If the sum is less than the item then it should be replaced with the sum.

Page 59: Network Models

Example (cont.)

• When (-) is involved we leave the item.

D0 S0

Page 60: Network Models

Example (cont.)

• 10+3=13 is less than ∞

So change

D0 S0

Page 61: Network Models

Example (cont.)

• 10+3=13 is less than ∞

So change

D0 S0

Page 62: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 63: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 64: Network Models

Example (cont.)

• 3+10=13 less than ∞,

So change

D0 S0

Page 65: Network Models

Example (cont.)

• When (-) is involved we leave the item.

D0 S0

Page 66: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 67: Network Models

Example (cont.)

When ∞is involved we leave the item.

D0 S0

Page 68: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 69: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 70: Network Models

Example (cont.)

• When (-) is involved we leave the item.

D0 S0

Page 71: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 72: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 73: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 74: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 75: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D0 S0

Page 76: Network Models

Example (cont.)

Page 77: Network Models

Example (cont.)

• We have now completed one iteration. We rename the new matrices:

D1 S1

Page 78: Network Models

Example (cont.)

• Set k=2

• We highlight the second column and second row of the Distance matrix and compare all other items with the sum of the items highlighted in the same row and column.

• If the sum is less than the item then it should be replaced with the sum.

Page 79: Network Models

Example (cont.)

• When (-) is involved we leave the item.

D1 S1

Page 80: Network Models

Example (cont.)

• 3+13=16 Not Less than 10

D1 S1

Page 81: Network Models

Example (cont.)

• 3+5=8 less than ∞

So change

D1 S1

Page 82: Network Models

Example (cont.)

• 3+5=8 less than ∞

So change

D1 S1

Page 83: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 84: Network Models

Example (cont.)

• 3+13=16 Not less than 10

D1 S1

Page 85: Network Models

Example (cont.)

• When (-) is involved we leave the item.

D1 S1

Page 86: Network Models

Example (cont.)

• 5+13=18 Not less than 6

D1 S1

Page 87: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 88: Network Models

Example (cont.)

• 3+5=8 less than ∞

So change

D1 S1

Page 89: Network Models

Example (cont.)

• 3+5=8 less than ∞

So change

D1 S1

Page 90: Network Models

Example (cont.)

• 13+5=18 Not less than 6

D1 S1

Page 91: Network Models

Example (cont.)

• When (-) is involved we leave the item.

D1 S1

Page 92: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 93: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 94: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 95: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 96: Network Models

Example (cont.)

• When ∞is involved we leave the item.

D1 S1

Page 97: Network Models

Example (cont.)D1 S1

Page 98: Network Models

Example (cont.)

• We have now completed two iteration. We rename the new matrices:

D2S2

Page 99: Network Models

Example (cont.)

• Set k=3

• We highlight the third column and third row of the Distance matrix and compare all other items with the sum of the items highlighted in the same row and column.

• If the sum is less than the item then it should be replaced with the sum.

Page 100: Network Models

Example (cont.)D2 S2

Page 101: Network Models

Example (cont.)D2 S2

Page 102: Network Models

Example (cont.)D2 S2

Page 103: Network Models

Example (cont.)

• We have now completed third iteration. We rename the new matrices:

D3 S3

Page 104: Network Models

Example (cont.)

• Set k=4

• We highlight the fourth column and fourthrow of the Distance matrix and compare all other items with the sum of the items highlighted in the same row and column.

• If the sum is less than the item then it should be replaced with the sum.

Page 105: Network Models

Example (cont.)

D3 S3

Page 106: Network Models

Example (cont.)

D3 S3

Page 107: Network Models

Example (cont.)

• We have now completed fourth iteration. We rename the new matrices:

D4 S4

Page 108: Network Models

Example (cont.)

• Set k=5

• We highlight the fifth column and fifth row of the Distance matrix and compare all other items with the sum of the items highlighted in the same row and column.

• If the sum is less than the item then it should be replaced with the sum.

Page 109: Network Models

Example (cont.)

• No further improvement are possible in this iteration, D5,S5 are the same D4 and S4

D4 S4

Page 110: Network Models

Example (cont.)

• Shortest distance is d15 =12

• Associated route: recall segment(I,j) if Sij=J is direct link otherwise they link through intermediate node.

D4 S4

Page 111: Network Models

Example (cont.)

• S15= 4 ≠ 5 so. The initial link is 145

• Now, s14=2. is not direct link and 14 must replaced with 124, so the road from 1 to 5 will be change to 1245.

• Now s12=2, s24=4,s45=5. the route 1245 need no further dissecting and the process end


Recommended