The Network Simplex Method

Post on 05-Jan-2016

48 views 1 download

description

The Network Simplex Method. Reduced Costs and Node Potentials. 4. 2. (0,4,5). (0,10,2). -3. 1. 3. 5. (0,10,4). (0,5,8). -7. 10. (0,5,10). 4. (0,5,5). (0,4,7). -4. MCNFP Example. (l, u, c). An initial BFS (Solution 1). Basic arcs (variables) B = {(1,3), (2,5), (3,5), (4,5)} - PowerPoint PPT Presentation

transcript

Network Simplex: Part 2 Page 1

The Network Simplex Method

Reduced Costs and Node Potentials

Network Simplex: Part 2 Page 2

MCNFP Example

51

4

2

3

(0,4,5) (0,10,2)

(0,5,5)(0,4,7)

(0,10,4) (0,5,8)

(0,5,10)10

4

-4

-3

-7

(l, u, c)

Network Simplex: Part 2 Page 3

An initial BFS (Solution 1)

• Basic arcs (variables)B = {(1,3), (2,5), (3,5), (4,5)}

• Non-basic arcs at their lower boundsL = {(1,2), (1,4)}

• Non-basic arcs at their upper bounds.U = {(3,4)}

Network Simplex: Part 2 Page 4

Solving for the Basic Arcs

51

4

2

3

L = {(1,2),(1,4)}

10

4

-4

-3

-7

0

05

U = {(3,4)}

10 2

1

4

Cost = 119

Network Simplex: Part 2 Page 5

Flow on B and U

51

4

2

3

L = {(1,2),(1,4)}

10

4

-4

-3

-7

5

U = {(3,4)}

10 2

1

4

Cost = 119

Network Simplex: Part 2 Page 6

Increasing the flow on (1,2)

51

4

2

310

4

-4

-3

-7

0+

5

10- 2-

1

4+

Network Simplex: Part 2 Page 7

Increasing flow on (1,2)

• Consider increasing the flow on (1,2) by

• Cost = 119+(c12 + c25 – c13 – c35) =119 + (5+2-4-8) = 119 + (-5)

• Maximum possible increase is = 2.– Flow on arc (3,5) will go to zero.

Network Simplex: Part 2 Page 8

New BFS (Solution 2)

• Basic arcs (variables)B = {(1,2), (1,3), (2,5), (4,5)}

• Non-basic arcs at their lower boundsL = {(1,4), (3,5)}

• Non-basic arcs at their upper bounds.U = {(3,4)}

Network Simplex: Part 2 Page 9

Increasing the flow on (1,2) by 2

51

4

2

310

4

-4

-3

-7

0+2

5

10-2 2-2

1

4+2

Network Simplex: Part 2 Page 10

New Solution

51

4

2

310

4

-4

-3

-7

2

5

8

1

6

Cost = 109

L = {(1,4),(3,5)} U = {(3,4)}

Network Simplex: Part 2 Page 11

Increasing the flow on (1,4)

51

4

2

310

4

-4

-3

-7

2-

0+5

8

1+

6-

Network Simplex: Part 2 Page 12

Increasing the flow on (1,4)

• Consider increasing the flow on (1,4) by

• Cost = 109+(c14 + c45 – c12 – c25) =109 + (7+5-5-2) = 109 + 5

• Increasing the flow on (1,4) will make the solution worse.

Network Simplex: Part 2 Page 13

Decreasing the flow on (3,4)

51

4

2

310

4

-4

-3

-7

2+

5-

8-

1-

6+

Network Simplex: Part 2 Page 14

Decreasing the flow on (3,4)

• Consider decreasing the flow on (d,4) by

• Cost = 109 + (-c13 -c34 - c45 + c12 + c25) =109 + (-4-10-5+5+2) = 109 - 12

• Maximum decrease is = 1.Flow on (4,5) goes to 0.

Network Simplex: Part 2 Page 15

Reduced Costs: Generic Simplex Method

• The row 0 coefficients of the Simplex Tableau are known as reduced costs.

• The reduced cost of a basic variable is zero.

• Non-basic variables with negative reduced cost are eligible to enter the basis.– If all the reduced costs are non-negative,

then the Simplex method terminates.

Network Simplex: Part 2 Page 16

Formula to Compute Reduced Costs

• Let B be the set of basic variables.

• Let AB be the submatrix of A comprised of the columns corresponding to the basic variables.

• Let c’ be the vector of reduced costs (i.e. row 0 of the tableau).

• c’ = c – A where = cB(AB)-1. are referred to as the dual multipliers.

Network Simplex: Part 2 Page 17

Formula in the Network Context

11010001010100011001000010010000111

54321

45353425141312

A

ccccccccAcc

Network Simplex: Part 2 Page 18

Formula in the Network Context

544531132112

54321

45353425141312

,,,'

11010001010100011001000010010000111

cccc

A

ccccccccAcc

Network Simplex: Part 2 Page 19

Reduced Costs: Network Simplex

• Let c’ij be the reduced cost of arc (i,j) and i be the potential at node i.

• c’ij = cij - i + j where1. 1 = 02. c’ij = 0 for all basic arcs

• Eligible non-basic arcs– Arcs in L are eligible if c’ij < 0 – Arcs in U are eligible if c’ij > 0

Network Simplex: Part 2 Page 20

c'12 = c12 - 1 + 2 c'12 = 5 - 0 + 2

0 = 5 + 2

Calculating Node Potentials

51

4

2

31=0

5

4

5

2

2 = -5

5 = -7

4 = -2

3 = -4

(cij)i j

Network Simplex: Part 2 Page 21

Calculating Reduced Costs

51

4

2

31=0

0

0

0

0

2 = -5

5 = -7

4 = -2

3 = -4

c'34=10+4-2

12

c'14=7+0-2

5

c'35=8+4-7

5

(c’ij)i j

Network Simplex: Part 2 Page 22

New Solution (BFS 3)

51

4

2

310

4

-4

-3

-7

3

4

7

7

Cost = 97

L = {(1,4), (3,5),(4,5)}(xij)i j

Network Simplex: Part 2 Page 23

Recalculate Node Potentials

51

4

2

31=0

5

4

2

2 = -5

5 = -7

4 = -14

3 = -4

10

(cij)i j

Network Simplex: Part 2 Page 24

Recalculate Reduced Costs

51

4

2

31=0

0

0

0

2 = -5

5 = -7

4 = -14

3 = -4

0

c'14=7-14

-7

c'35=5+4-7

2

c'45=5+14-7

12(1,4) becomes basic.It is in L and c' < 0.

(c’ij)i j

Network Simplex: Part 2 Page 25

Increasing the Flow on (1,4)

51

4

2

310

4

-4

-3

-7

3

0+4-

7-

7

Cost = 97

(xij)i j

Network Simplex: Part 2 Page 26

New Solution (BFS 4)

51

4

2

310

4

-4

-3

-7

3

4

3

7

Cost = 69

L = {(3,4), (3,5),(4,5)} (xij)i j

Network Simplex: Part 2 Page 27

Recalculate Node Potentials

51

4

2

31=0

5

4

2

2 = -5

5 = -7

4 = -7

3 = -4

7

( cij)i j

Network Simplex: Part 2 Page 28

Recalculate Reduced Costs

51

4

2

31=0

0

0

0

2 = -5

5 = -7

4 = -7

3 = -4

0

c'34 =10+4-7=7 c'35 = 8+4-7=5 c'45 = 5+7-7=5

( c’ij)i j

Network Simplex: Part 2 Page 29

Outline of Network Simplex

1. Determine a starting BFS. The n-1 basic variables correspond to a spanning tree.

2. Compute the node potentials.3. Compute the reduced costs for the non-basic

arcs.– The current solution is optimal if all arcs in L

have non-negative reduced cost and all arcs in U have non-positive reduced cost.

4. Select a non-basic arc (i,j) to enter the basis.5. Identify the cycle created by adding (i,j) to the

tree. Use flow conservation to determine the new flows on the arcs in the cycle. The arc that first hits its lower or upper limit leaves the basis.