Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mjdah Al Shehri Hamdy A. Taha, Operations Research: An introduction, 8 th Edition Chapter 6: Network Models.

Similar presentations


Presentation on theme: "Mjdah Al Shehri Hamdy A. Taha, Operations Research: An introduction, 8 th Edition Chapter 6: Network Models."— Presentation transcript:

1 Mjdah Al Shehri Hamdy A. Taha, Operations Research: An introduction, 8 th Edition Chapter 6: Network Models

2 Mute ur call

3 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall3 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 4- minimum cost capacitated network algorithms 5- Critical path( CPM) algorithms

4 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall4 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

5 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall5 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

6 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall6 Network Models (CONT.) 5- determination the time schdule (start and completion date) for activities This situation is (CPM) algorithms

7 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall7 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

8 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall8 Network definitions (cont.) Example Flow : the amount sent from node i to node j, over an arc that connects them. 1 3 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)}

9 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall9 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. 9

10 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall10 Network definitions (cont.) 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) 10 1 3 2 5 4

11 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall11 Network definitions (cont.) 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). 1 2 3 1 3 2 5 4 1 2 3 4 5 Tree Spanning Tree

12 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall12 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.

13 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall13 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

14 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall14 Example (cont.) Midwest TV cable company is in the process of providing cable service to five new housing development service areas. 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3

15 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall15 Example (cont.) The algorithms start at node 1 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3

16 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall16 Example (cont.) Iteration 1 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C1 C1 `

17 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall17 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C1 ` C1

18 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall18 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C2

19 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall19 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C2 C2 ` 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3

20 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall20 Example (cont.) iteration2 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C2 C2 `

21 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall21 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C2 C2 `

22 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall22 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C3 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C3 `

23 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall23 Example (cont.) iteration3 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C3 C3 `

24 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall24 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C3 C3 `

25 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall25 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C4 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C4 `

26 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall26 Example (cont.) iteration4 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C4 C4 `

27 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall27 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C4 C4 `

28 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall28 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C5 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C5 `

29 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall29 Example (cont.) iteration5 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C5 C5 ` Alternate links

30 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall30 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3 C5 C5 ` Alternate links

31 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall31 Example (cont.) 3 4 6 5 2 1 1 9 5 7 4 6 3 5 10 8 3

32 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall32 Example (cont.) Summery of solution iterationMinimum distance connecting arc distanceAdd arc to tree?Cumulative tree distance 1(1,2)1yes1 2(2,5)3yes4 3(2,4)4yes8 4(4,6)3yes11 5(4,3)5yes16

33 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall33 Example 2 Apply minimal spanning tree A E C B D F 2 8 7 7 5 9 4 3 8

34 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall34 Solution A E C B D F 2 8 7 7 5 9 4 3 8 A E C B D F 2 8 7 7 5 9 4 3 8

35 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall35 Solution (cont.) A E C B D F 2 8 7 7 5 9 4 3 8 A E C B D F 2 8 7 7 5 9 4 3 8

36 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall36 Solution (cont.) A E C B D F 2 8 7 7 5 9 4 3 8 A E C B D F 2 8 7 7 5 9 4 3 8

37 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall37 Example 3 9 A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

38 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall38 Solution A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

39 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall39 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

40 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall40 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

41 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall41 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

42 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall42 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

43 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall43 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

44 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall44 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

45 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall45 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

46 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall46 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

47 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall47 Solution (cont.) A B C D E F H I J G 6 4 3 9 9 8 18 2 9 8 2 9 9 7 10 5 4 1 3 4

48 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall48 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

49 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall49 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

50 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall50 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 50 10 60

51 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall51 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 15 50 10 60 Nodelabelstatus 1[0,--]permanent 2[0+100, 1]temporary 3[0+30,1]temporary

52 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall52 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 Nodelabelstatus 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 15 50 10 60

53 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall53 Example(cont.) Iteration 3: node 2 and 5 can be reached from node4. the list of labeled is updated as Node 2 is permanent Nodelabelstatus 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 15 50 10 60

54 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall54 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 Nodelabelstatus 1[0,--]permanent 2[55,4]permanent 3[30,1]Permanent 4[40,3]Permanent 5[90,3] or [40+50,4]temporary

55 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall55 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 1  3  4  2 with total length 55 miles Nodelabelstatus 1[0,--]permanent 2[55,4]permanent 3[30,1]Permanent 4[40,3]Permanent 5[90,3] or [40+50,4]Permanent

56 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall56 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.

57 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall57 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.

58 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall58 Example 1 2 3 4 5 3 10 5 6 15 4 D0s0

59 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall59 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.

60 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall60 Example (cont.) When (-) is involved we leave the item. D0S0

61 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall61 Example (cont.) 10+3=13 is less than ∞ So change D0S0

62 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall62 Example (cont.) 10+3=13 is less than ∞ So change D0S0

63 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall63 Example (cont.) When ∞is involved we leave the item. D0S0

64 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall64 Example (cont.) When ∞is involved we leave the item. D0S0

65 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall65 Example (cont.) 3+10=13 less than ∞, So change D0S0

66 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall66 Example (cont.) When (-) is involved we leave the item. D0S0

67 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall67 Example (cont.) When ∞is involved we leave the item. D0S0

68 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall68 Example (cont.) When ∞is involved we leave the item. D0S0

69 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall69 Example (cont.) When ∞is involved we leave the item. D0S0

70 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall70 Example (cont.) When ∞is involved we leave the item. D0S0

71 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall71 Example (cont.) When (-) is involved we leave the item. D0S0

72 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall72 Example (cont.) When ∞is involved we leave the item. D0S0

73 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall73 Example (cont.) When ∞is involved we leave the item. D0S0

74 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall74 Example (cont.) When ∞is involved we leave the item. D0S0

75 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall75 Example (cont.) When ∞is involved we leave the item. D0S0

76 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall76 Example (cont.) When ∞is involved we leave the item. D0S0

77 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall77 Example (cont.)

78 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall78 Example (cont.) We have now completed one iteration. We rename the new matrices: D1S1

79 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall79 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.

80 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall80 Example (cont.) When (-) is involved we leave the item. D1S1

81 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall81 Example (cont.) 3+13=16 Not Less than 10 D1S1

82 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall82 Example (cont.) 3+5=8 less than ∞ So change D1S1

83 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall83 Example (cont.) 3+5=8 less than ∞ So change D1S1

84 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall84 Example (cont.) When ∞is involved we leave the item. D1S1

85 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall85 Example (cont.) 3+13=16 Not less than 10 D1S1

86 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall86 Example (cont.) When (-) is involved we leave the item. D1S1

87 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall87 Example (cont.) 5+13=18 Not less than 6 D1S1

88 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall88 Example (cont.) When ∞is involved we leave the item. D1S1

89 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall89 Example (cont.) 3+5=8 less than ∞ So change D1S1

90 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall90 Example (cont.) 3+5=8 less than ∞ So change D1S1

91 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall91 Example (cont.) 13+5=18 Not less than 6 D1S1

92 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall92 Example (cont.) When (-) is involved we leave the item. D1S1

93 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall93 Example (cont.) When ∞is involved we leave the item. D1S1

94 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall94 Example (cont.) When ∞is involved we leave the item. D1S1

95 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall95 Example (cont.) When ∞is involved we leave the item. D1S1

96 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall96 Example (cont.) When ∞is involved we leave the item. D1S1

97 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall97 Example (cont.) When ∞is involved we leave the item. D1S1

98 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall98 Example (cont.) D1S1

99 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall99 Example (cont.) We have now completed two iteration. We rename the new matrices: D2 S2

100 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall100 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.

101 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall101 Example (cont.) D2S2

102 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall102 Example (cont.) D2S2

103 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall103 Example (cont.) D2S2

104 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall104 Example (cont.) We have now completed third iteration. We rename the new matrices: D3 S3

105 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall105 Example (cont.) Set k=4 We highlight the fourth column and fourth 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.

106 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall106 Example (cont.) D3S3

107 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall107 Example (cont.) D3S3

108 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall108 Example (cont.) We have now completed fourth iteration. We rename the new matrices: D4S4

109 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall109 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.

110 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall110 Example (cont.) No further improvement are possible in this iteration, D5,S5 are the same D4 and S4 D4S4

111 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall111 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. D4S4

112 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall112 Example (cont.) S15= 4 ≠ 5 so. The initial link is 1  4  5 Now, s14=2. is not direct link and 1  4 must replaced with 1  2  4, so the road from 1 to 5 will be change to 1  2  4  5. Now s12=2, s24=4,s45=5. the route 1  2  4  5 need no further dissecting and the process end

113 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall113 Maximal flow algorithm In a maximal flow problem, we seek to find the maximum volume of flow from a source node to terminal sink node in a capacitated network. Maximum flow algorithm is straightforward. 113

114 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall114 How it works In maximum flow algorithm, we determine if there is any path from source to sink that can carry flow. If there is, the flow is augmented as much as possible along this path; and residual capacities of the arc used on the path are reduced accordingly. 114

115 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall115 Steps of maximum flow algorithm Step1 : find path from the source to the sink that has positive residual capacities. If no path have positive, STOP ; the maximum flow have been found Step2 : Find the minimum residual capacity of the arc on the path ( call it K) and augment the flow on each involved arc by K Step3: Adjust the residual capacities of arcs on the path by decreasing the residual capacities in direction of flow by K ; and increasing the residual capacities in the direction opposite the flow by K; GO TO STEP 1 115

116 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall116 Example Determine the maximum flow in the network. 116 1 2 4 5 3 10 30 20 30 0 400 20 0 0 5 10 0 20 0 0

117 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall117 Example (cont.) Iteration1: Select Path: 1  4  5 117 1 2 4 5 3 10 30 20 30 0 400 20 0 0 5 10 0 20 0 0 Residual capacities 1-410 2-520 Augment flow by 10 Reduce forward capacities by 10 Increase backward capacities by 10 1 2 4 5 3 0 30 20 30 0 400 20 0 0 5 10 0

118 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall118 Example (cont.) Iteration 2: No additional possible flow along arc(1,4); thus find new path; Select path 1  3  4  5 118 Residual capacities 1-330 3-410 4-510 1 2 4 5 3 0 30 20 30 0 400 20 0 0 5 10 0 Augment flow by 10 Reduce forward capacities by 10 Increase backward capacities by 10 1 2 4 5 3 0 20 30 0 400 20 0 10 15 0 100 20 0 10

119 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall119 Example (cont.) Iteration 3: No additional possible flow along arc(3,4) and (4,5); thus find new path; Select path 1  3  5 119 1 2 4 5 3 0 20 30 0 400 20 0 10 15 0 100 20 0 10 20 10 Residual capacities 1-320 3-520 Augment flow by 20 Reduce forward capacities by 20 Increase backward capacities by 20 1 2 4 5 3 0 0 20 30 0 400 0 20 30 15 0 100 20 0 10 20 10 20

120 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall120 Example (cont.) Iteration 4: No additional possible flow along arc(1,3) and (3,5); thus find new path; Select path 1  2  5 120 1 2 4 5 3 0 0 20 30 0 400 0 20 30 15 0 100 20 0 10 30 20 10 20 Residual capacities 1-220 2-530 Augment flow by 20 Reduce forward capacities by 20 Increase backward capacities by 20 1 2 4 5 3 0 0 0 10 20 400 0 20 30 15 0 100 20 10 30 20 10 20

121 Hamdy A. Taha, Operations Research: An introduction, Prentice Hall121 Example (cont.) Iteration 4: No more flow is possible flow because there is no residual capacity left on the cut consisting (1,2),(1,3), and (1,4); so maximum flow is 20+30+10=60. 121 1 2 4 5 3 0 0 0 10 20 400 0 20 30 15 0 100 20 10 30 20 10 20 FromToFlow 1220 1330 1410 2520 3410 3520 45


Download ppt "Mjdah Al Shehri Hamdy A. Taha, Operations Research: An introduction, 8 th Edition Chapter 6: Network Models."

Similar presentations


Ads by Google