Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 15.053Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network.

Similar presentations


Presentation on theme: "1 15.053Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network."— Presentation transcript:

1 1 15.053Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network simplex algorithm, even if it is the same as the simplex algorithm

2 2 The Minimum Cost Flow Problem Directed Graph G = ( N, A ). –Node set N, arc set A ; –Capacities u ij on arc ( i,j ) –Lower bound of 0 on arc ( i,j ) –Cost c ij on arc ( i,j ) –Supply/demand bi for node i. (Positive indicates supply) A network with costs, capacities, supplies, demands Minimize the cost of sending flow s.t. Flow out of i - Flow into i = b i 0 ≤x ij ≤u ij

3 3 Formulation We will consider the LP formulation is given as Minimize

4 4 Pricing Out

5 5 We call y i a node potential for node i Pricing out is like a export reward for flow leaving a node and a import tax for every unit of flow arriving Reduced costs will be a key to the network simplex algorithm

6 6 Reduced Costs of Cycles c ij = c ij - y i + y j for each arc (i,j). The reduced cost of a cycle is the cost of the cycle. Node 2 adds $20 to a unit of flow in (1,2) and subtracts $20 from a unit of flow in (2,3)

7 7 Important Fact: optimizing wrt costs c gives the same optimal solutions as optimizing wrt reduced costs c. Consider impact of potential for node 2. Each unit of flow leaving cost is reduced $20. Each unit of flow arriving cost is increased $20. 8 more leave than arrive. Net impact on cost: 8 x $20 = $160 regardless of the flow

8 8 Taking Advantage of Reduced Costs c ij = c ij - y i + y j for each arc (i,j). Suppose that I want the reduced costs of (1,2) and (2,3) to both be 0. Note: After, the cost of the cycle is the reduced cost of (3,1).

9 9 Some Assumptions 1.The network is directed. 2.∑ i=1 to n b( i ) = 0. (Otherwise, there cannot be a feasible solution) 3.There is a feasible solution (see next slide)

10 10 An Artificial Initial Feasible Solution Add an arc (1, j) for each j with b(j) < 0, with high cost. Add an arc (j, 1) for each j with b(j) > 0, with high cost. Send 2 units of flow from 1 to 4, send 5 units of flow from 1 to 3, and send 3 units of flow from 2 to 1.

11 11 The basic variables are arc flows, and the arcs form a spanning tree There is one node, called the root. There is a unique path (not directed) from the root to each other node (and vice versa). What is the path from node 1 to node 5?

12 12 Review of the simplex algorithm Step 1. Start with a basic feasible solution In our algorithm, we will start with a spanning tree and then determine its flow.

13 13 Calculating A Spanning Tree Flow A tree with supplies and demands. (Assume that all other arcs have a flow of 0) What is the flow in arc (4,3)? HINT: Node 4 has a supply of 2. See the animation.

14 14 What would happen if the flows in non-tree arcs were not 0? Suppose that non- tree arcs had a non-zero flow. How would this change the computations?

15 15 What would happen if the flows in non-tree arcs were not 0? Adjust the supplies/demands to take into account arcs with flow at the upper bound. The compute flows as in the previous method; e.g., what is the flow in (4,3)? The flow in (4,3) is 0.

16 16 Upper bounds In the simplex algorithm, the non-basic variables have a flow of 0. In the simplex algorithm with upper bounds, non-basic variables can have a flow of 0 –or can be at the upper bound. –Non-basic flows at their upper bound lead to changes in the net supply at a node.

17 17 The simplex algorithm Step 1A. Start with a basic feasible solution Step 1B. Compute simplex multipliers so that the reduced costs of the basic variables are all 0. (That is, make sure that the cost coefficients are also in canonical form.)

18 18 Finding the Multipliers To do this, we first need to determine the multipliers yi for i=1,…,n by using the fact that c ij - y i + y j =0 for all basic variables.

19 19 Calculating Simplex Multipliers for a Spanning Tree Here is a spanning tree with arc costs. How can one choose node potentials so that reduced costs of each tree arc is 0? See the animation. Recall: the reduced cost of (i,j) is c ij - π i + π j Suppose that π 1 = 0.

20 20 Optimality Conditions Once we have the multipliers, we check the following optimality conditions for each nonbasic arc.

21 21 Looking at a single arc. Suppose c 12 < 0. Then we want the flow to be as high as possible. If x 12 < u 12, the flow in (1,2) is not optimal. We want to increase its flow. If x 12 = u 12, then it is optimal Suppose c 12 > 0. Then we want the flow to be as low as possible. If x 12 > 0, the flow in (1,2) is not optimal. We want to decrease its flow. If x 12 = 0, then it is optimal

22 22 Checking Reduced Costs First, set the node potentials so that all tree arcs have a reduced cost of 0.

23 23 Checking Reduced Costs upper bound lower bound (6,5) is at its lower bound. It is a violating arc and could enter the basis. (5,4) is at its upper bound. It satisfies the optimality conditions.

24 24 The simplex algorithm Step 1A. Start with a basic feasible solution Step 1B. Compute simplex multipliers so that the reduced costs of the basic variables are all 0. Step 2. Choose an entering variable that violates the optimality condition. In the previous example, we would choose (6,5) and not (5,4)

25 25 Which arc should enter the basis? In the network simplex method with bounded variables, the nonbasic variables are either at their upper or lower bounds. An improved solution can be found by –1. Increasing a variable that has a negative reduced cost and is at its lower bound –2. Decreasing a variable that has a positive reduced cost and is at its upper bound

26 26 If the entering arc is at its lower bound, increase the flow by ∆. Adding a non-basic arc to the spanning tree creates a basic cycle. Adjust flows in the basic cycle so that supply/demand constraints remain satisfied.

27 27 If the entering arc is at its upper bound, decrease the flow by ∆. Suppose that (6,5) was at its upper bound. Adjust flows in the basic cycle so that supply/demand constraints remain satisfied. As ∆ is increased, some tree arc will hit its lower or upper bound. (or the optimal solution is unbounded). That arc leaves the basis.

28 28 Network Simplex Algorithm begin determine an initial feasible tree structure (T, L, U) let x be the initial flow let y be the initial node potentials while some tree arc violates its opt. conditions do begin select an entering arc (k, l) violating opt. conditions add arc (k,l) to the tree and send flow around the basic cycle determine the leaving arc update the node potentials end

29 29 Essential Points A basis corresponds to a spanning tree for the network Introducing a new variable into the basis forms a unique cycle in the spanning tree and the variable that limits the amount of flow sent in this cycle drops from the basis. There is a speedup for calculating the new node potentials, but we will not discuss it here.

30 30 Conclusions. The Network Simplex Method –Technique to solve a minimum cost flow problem –Ideas come from Simplex Method –Basic solutions are Spanning Trees

31 31


Download ppt "1 15.053Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network."

Similar presentations


Ads by Google