09.09.2014 Views

algorithms

algorithms

algorithms

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 7.13 Simplex in action.<br />

Initial LP:<br />

max 2x 1 + 5x 2<br />

2x 1 − x 2 ≤ 4 1○<br />

x 1 + 2x 2 ≤ 9 2○<br />

−x 1 + x 2 ≤ 3 3○<br />

x 1 ≥ 0 4○<br />

x 2 ≥ 0 5○<br />

Current vertex: { 4○, 5○} (origin).<br />

Objective value: 0.<br />

Move: increase x 2 .<br />

5○ is released, 3○ becomes tight. Stop at x 2 = 3.<br />

New vertex { 4○, 3○} has local coordinates (y 1 , y 2 ):<br />

y 1 = x 1 , y 2 = 3 + x 1 − x 2<br />

Rewritten LP:<br />

max 15 + 7y 1 − 5y 2<br />

y 1 + y 2 ≤ 7 1○<br />

3y 1 − 2y 2 ≤ 3 2○<br />

y 2 ≥ 0 3○<br />

y 1 ≥ 0 4○<br />

−y 1 + y 2 ≤ 3 5○<br />

Current vertex: { 4○, 3○}.<br />

Objective value: 15.<br />

Move: increase y 1 .<br />

4○ is released, 2○ becomes tight. Stop at y 1 = 1.<br />

New vertex { 2○, 3○} has local coordinates (z 1 , z 2 ):<br />

z 1 = 3 − 3y 1 + 2y 2 , z 2 = y 2<br />

Rewritten LP:<br />

max 22 − 7 3 z 1 − 1 3 z 2<br />

− 1 3 z 1 + 5 3 z 2 ≤ 6 1○<br />

z 1 ≥ 0 2○<br />

z 2 ≥ 0 3○<br />

1<br />

3 z 1 − 2 3 z 2 ≤ 1 4○<br />

1<br />

3 z 1 + 1 3 z 2 ≤ 4 5○<br />

Current vertex: { 2○, 3○}.<br />

Objective value: 22.<br />

Optimal: all c i < 0.<br />

Solve 2○, 3○ (in original LP) to get optimal solution<br />

(x 1 , x 2 ) = (1, 4).<br />

Increase<br />

y 1<br />

{ 3○, 4○}<br />

Increase<br />

x 2<br />

{ 2○, 3○}<br />

{ 1○, 2○}<br />

{ 4○, 5○}<br />

{ 1○, 5○}<br />

217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!