Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Outline  LP formulation of minimal cost flow problem  useful results from shortest path problem  optimality condition  residual network  potentials.

Similar presentations


Presentation on theme: "1 Outline  LP formulation of minimal cost flow problem  useful results from shortest path problem  optimality condition  residual network  potentials."— Presentation transcript:

1 1 Outline  LP formulation of minimal cost flow problem  useful results from shortest path problem  optimality condition  residual network  potentials of nodes  reduced costs of arcs (with respect to a given set of potentials)  the optimality conditions for networks  network simplex and existence of negative cycle  transportation simplex method  transportation by eliminating negative cycles  determining an initial feasible solution for a minimal flow problem

2 2 Minimum Cost Flow Models  G: (connected) network, i.e., G = (N, A)  N: the collection of nodes in G, i.e., N = {j}  A: the collection of arcs in G, i.e., A = {(i, j)}  c ij : the cost of arc (i, j)  u ij : the capacity of arc (i, j)  b(i): the amount of flow out of node i  b(i) > (resp. <) 0 for out (resp. in) flow Assume direct arcs. How to deal with an undirected arc?

3 3 Minimum Cost Flow Models  N = {1, 2, 3, 4, 5, 6}  A = {(1, 2), (1, 3), (2, 3), (2, 4), (2, 5), (3, 5), (4, 6), (5, 4), (5, 6)}  b(1) = 9, b(6) = -9, and b(i) = 0 for i = 2 to (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij )

4 4 A Minimum Cost Flow LP Model (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9

5 5 Useful Results from Shortest-Path Algorithms

6 6  optimality condition for shortest distances  residual network  potentials of nodes  reduced costs of arcs with respect to a given set of potentials

7 7 Optimality Condition for Shortest Distances  Theorem. Let G = (N, A) be a directed graph; d(  ) be a function defined on N. Then d(  ) is the shortest distance of node (  ) from node 1 iff  d(1) = 0;  d(i) is the length of a path from node 1 to node i; and  d(j)  d(i) + c ij for all (i, j)  A.

8 8 Optimality Condition for Shortest Distances  LHS figure: {d(i)} = {0, 2, 3, 7}  for all i, d(i) being shortest distance of node i from node 1  satisfying the three conditions  RHS figure: {d(i)} = {0, 2, 3, 8}  d(4) = the distance of a path from node 1 to node 4  d(3) + c 34 < d(4), i.e., this set cannot be the collection of shortest distances from nodes d(1) = 0 d(2) = 2 d(3) = 3 d(4) = d(1) = 0 d(2) = 2 d(3) = 3 d(4) = 8

9 (-8,3) (-2, 3) (6, 4) (8, 2) (2, 4) 9 Residual Network (6,4) (8,5) s t 1 (2,7) Figure 1. Costs and Capacities of Arcs Figure 3. The Residual Network Corresponding to Figure 1 t (6, 4) (8, 5) s 1 (2, 7) Figure 2. Flows on arcs 0 s t 1 Figure 4. The Residual Network Corresponding to Figure 2 s t 1

10 (6, 1) (8, 5) (2, 7) (-6, 3)  actual meaning of sending flow in cycle s-t-1-s (Figure 4)  a different way to send flow from s to t  flow along t-1-s  reduction of flow in s-1-t 10 A Cycle in a Residual Network (-8,3) (-2, 3) (6, 4) (8, 2) (2, 4) Figure 4. The Residual Network Corresponding to Figure 2 s t 1 Figure 5. The New Residual Network After Adding a Flow of 3 units in cycle s-t-1-s s t 1 s t 1 Figure 6. Flows on arcs

11 11 Potentials of Nodes and the Corresponding Reduced Costs of Arcs  first the idea  call any arbitrary set of numbers {  i }, one for a each node, a set of potentials of nodes  define the reduced cost with respect to this set of potentials {  i } by  interesting properties for this set of reduced costs

12 12 Potentials of Nodes and the Corresponding Reduced Costs of Arcs  C(P) be the total cost of path P  C  (P) be the total reduced cost of path P   i = potential of node i  P = a path from node s to node t  then C  (P) = C(P)   s +  t

13 13 Potentials of Nodes and the Corresponding Reduced Costs of Arcs  C(P) be the total cost of path P  C  (P) be the total reduced cost of path P   i = potential of node i  P = a path from node s to node t, then  C  (P) = C(P)   s +  t  a shortest path from s to t for C(  ) is also a shortest path from s to t for C  (  )  1 = 3  2 = -5  3 = 2  4 = 6  5 = -3  6 = C(P)C(P) C(P)C(P)

14 Potentials of Nodes and the Corresponding Reduced Costs of Arcs  C(P) be the total cost of path P  C  (P) be the total reduced cost of path P   i = potential of node i  P = a path from node s to node t, then  if  j = -d(j), then for all (i, j)  A  arcs with forming a tree  1 = 3  2 = -5  3 = 2  4 = 6  5 = -3  6 = 5  j = -d(j)  1 = 0  2 = -8  3 = -3  4 = -10  5 = -6  6 =

15 15 Spanning Tree and BFS  in a minimal cost flow network problem, a BFS  a spanning tree of the network  # of constraints = # of nodes  # of basic variables = # of nodes - 1

16 16 The optimality Conditions for Networks

17 17 The Optimality Conditions for Networks  Theorem 1. (Theorem 9.1, Negative Cycle Optimality Conditions) A feasible solution x * is optimal iff there is no negative cost (direct) cycle in the corresponding residual network G(x * ).  Theorem 2. (Theorem 9.3, Reduced Cost Optimality Conditions) A feasible solution x * is optimal iff there exists dual variable  such that for every arc (i, j) in the residual network G(x * ).  Theorem 3. (Theorem 9.4, Complementary Slackness Optimality Conditions) A feasible solution x * is optimal iff there exists dual variables  such that  if then = 0;  if 0 < < u ij, then  if then = u ij.

18 18 Ideas for Theorem 1  a cycle in a residual network: a different way to send flow across a network  existing of a negative cycle  existence of another flow pattern with lower cost  no negative cycle  no other flow pattern with lower cost

19 19 Ideas for Theorem 3  Theorem 3. (Theorem 9.4, Complementary Slackness Optimality Conditions) A feasible solution x * is optimal iff there exists dual variables  such that  optimality conditions of simplex method for bounded variables

20 20 Ideas for Theorem 2  contradictory statements of Theorem 2 & Theorem 3?  Theorem 2: all reduced costs non-negative (for minimization)  Theorem 3: some reduced costs positive, some negative  Theorem 2: on reduced costs for (variables representing) arcs of a residual network  Theorem 3: on reduced costs of all variables

21 21 Ideas for Theorem 2  Theorem 2. (Theorem 9.3, Reduced Cost Optimality Conditions) A feasible solution x * is optimal iff there exists dual variable  such that for every arc (i, j) in the residual network G(x * ).  Theorem 2  minimum  for any potential  and cycle: C  (P) = C(P)  for every arc in G(x)  no negative cycle in G  minimal

22 22 Ideas for Theorem 2  Theorem 2. (Theorem 9.3, Reduced Cost Optimality Conditions) A feasible solution x * is optimal iff there exists dual variable  such that for every arc (i, j) in the residual network G(x * ).  minimum  Theorem 2  conditions of Theorem 3 satisfied by a minimum solution  a forward arc (i, j) with by Theorem 3  no reversed arc in G(x * )  a forward arc (i, j) with = u ij, in the original network  no such forward arc in G(x * )  for the reversed arc in G(x * ):  a forward arc (i, j) with in the original network  for the forward arc in G(x * ):  for the reversed arc in G(x * ):

23 23 Equivalence Between Network Simplex and Negative Cost Cycle

24 24 Equivalence Between Network Simplex Method and Existence of a Negative Cost Cycle  at a certain point, an extended basic feasible solution is shown below, where the dotted lines show arcs at upper bounds (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij ) Flow

25 25 An Iteration of the Network Simplex  to find the entering variable  x 46 entering  reduction of flow  from upper bound Flow dual variables  1 = 0  2 =  1 – c 12 = -3  4 =-8  3 =-2  5 =-6  6 =-10 beneficial to reduce flow in (4, 6 ) How about (2, 3), (2, 5), (5, 4)?

26 26 An Iteration of the Network Simplex  to find the leaving variable  reduction of flow  from x 46  leaving variable, x 13 or x 35, for  = (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij ) Change of Flow Current Flow Pattern 0  2+   3 0  7   8 0  5   7 0  5   5 0  2+   3 0  4+   6

27 27 An Iteration of the Network Simplex   = 1  arbitrarily making x 35 leaving (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij )  7   Change of Flow 0  5   7 0  5   5 0  2+   3 0  4+   New Flow Pattern

28 (c ij, x ij ) 28 An Iteration of the Negative Cycle Algorithm  negative cycle  cost = -1  maximum allowable flow = 1 unit (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij ) Current Flow Pattern Residual Network

29 29 An Iteration of the Negative Cycle Algorithm  negative cycle  cost = -1  maximum allowable flow = 1 unit (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij ) (c ij, x ij )

30 30 Same Result from Network Simplex Method and Negative Cost Cycle (3, 8) (2, 3) (2, 2) (2, 3) (5, 7) (4, 3) (5, 4) (3, 5) (4, 6) 9 -9 (c ij, u ij ) New Flow Pattern residual network (c ij, x ij )

31 31 Transportation Simplex Method

32 32 Transportation Simplex Method  balanced transportation problem  2 sources, 3 destinations  5 constraints, with one degree of redundancy  4 basic variables in a BFS

33 33 Transportation Simplex Method  four basic variables in a BFS

34 34 Transportation Simplex Method reduced cost (i, j) = c ij – u i – v j

35 35 Transportation Simplex Method

36 36 Transportation Problem by Eliminating Negative Cycles

37 37 Transportation Problem by the Negative Cycle Approach

38 38 Transportation Problem by the Negative Cycle Approach

39 39 Transportation Problem by the Negative Cycle Approach

40 40 Transportation Problem by the Negative Cycle Approach  no more negative cycle  optimal flow: x 13 = 100, x 14 = 500, x 15 = 200, x 23 = 300, x 24 = 0, x 25 = 0,  minimum cost = 7600

41 41 To Determine an Initial Feasible Solution

42 42 To Find an Initial Feasible Solution  to solve a maximal flow problem

43 43 To Find an Initial Feasible Solution  to solve a minimum cost flow problem  with x 1t = 800, x 2t = 300, x ts = 1100, x s3 = 400, x s4 = 500, x s5 = 200 as the initial solution of the minimal cost flow problem


Download ppt "1 Outline  LP formulation of minimal cost flow problem  useful results from shortest path problem  optimality condition  residual network  potentials."

Similar presentations


Ads by Google