1 / 34

Lecture 9 The Revised Simplex Algorithm

Lecture 9 The Revised Simplex Algorithm. Problem Statement: Min cx Subject to Ax = b x > 0 Alg 5C Page 236 0. Initialization Select any starting basic feasible solution. Partition the variables into basic and nonbasic variables (BASIC, NONBASIC). Simplex Algorithm.

inge
Télécharger la présentation

Lecture 9 The Revised Simplex Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 9 The Revised Simplex Algorithm • Problem Statement: • Min cx • Subject to Ax = b • x > 0 • Alg 5C Page 236 • 0. Initialization • Select any starting basic feasible solution. Partition the variables into basic and nonbasic variables (BASIC, NONBASIC).

  2. Simplex Algorithm • Then Ax = b is partitioned into • BxB + NxN = b. • Let xB = B-1b and xN = 0. • This is the starting solution. • Pricing • Solve vB = cB. That is v = cBB-1. The vector cB has elements of the cost coefficients corresponding to the basic variables. This is original data. • Calculate the reduced costs (actually directional derivatives)

  3. Simplex Algorithm • cbarj = cj – vaj for each xj NONBASIC where aj is column j of the matrix A. • Note that cj and aj are original data. • 2. Check Optimality • If cbarj> 0 for all xj  NONBASIC, then stop, xB is optimal. Otherwise, let the entering variable • xp  NONBASIC be any one with cbarj < 0.

  4. Simplex Alg • 3. Simplex Direction • Solve By = ap (ap is the pth col of A) • That is, y = B-1ap • Aside: Suppose BASIC = {x2, x3,x5} and • NONBASIC = {x1,x4,x6,x7} and p is 4. Hence, x4 is going to move from NONBASIC to BASIC. Suppose y = [1, -2, 0.5]. What is the direction of improvement? Answer d = [0, -1, 2, 1, -0.5, 0, 0]. • All nonbasics are 0 except p which is 1. All basics have –yj.

  5. Simplex Alg • Why does this work? BxB + NxN = b holds. • New Point = [XB,XN] = [xB, xN] + d • = [xB- y, xN+ ep] • where ep is a vector of all 0s except a 1 in position p • BXB + NXN = B[xB - y] + N[xN+ ep] • = BxB - By + NxN+ Nep

  6. Simplex Alg • = b - By + NxN + Nep • = b –B(B-1ap) + 0 + ap = b - ap + ap = b • That is, the new point satisfies Ax = b. • We need to worry about the new point satisfying • x > 0. • End Of Aside

  7. Simplex Alg • 4. Step Size • XB = xB - y > 0 • y < xB • < xBi / yi for all yi > 0 If yi< 0 for all i, then the solution is unbounded.

  8. Simplex Alg • 5. New Point • [XB,XN] = [xB - , xN + ep] • Reset BASIC and NONBASIC and return to step 1.

  9. Example #1 • Minimize –2x1 – x2 • Subject to x1 + x2< 6 • x1< 5 • x2< 5 • x1> 0, x2> 0

  10. Standard Form • Minimize -2x1 – x2 • Subject to x1 +x2 +x3 = 6 • x1 +x4 = 5 • x2 +x5 = 5 • All variables > 0 A = b =

  11. 0. Initialization • BASIC = {x3, x4, x5} NONBASIC = {x1, x2} B = B-1 =

  12. 0. Initialization Continued • xB = B-1b = = = xN = =

  13. 0. Initialization Continued • Where are we? • What space are we working in? R? x2 x4 x5 x3 x1

  14. 1. Pricing • v = cBB-1 = = cbar1 = c1 – va1 = -2 - = -2

  15. 1. Pricing Continued • cbar2 = c2 – v a2 = -1 - = -1 NOTE: We are minimizing and we found one directional derivative of –2 and another of –1. This is good!

  16. 2. Check Optimality • Not all cbar > 0, therefore not optimal. • Let p = 1. • (Could we let p = 2 at this stage in the algorithm?)

  17. 3. Simplex Direction • y = B-1a1 = = Direction of movement in R5 is d = [1, 0, -1, -1, 0] Corresponding to [x1, x2, x3, x4, x5]

  18. 3. Simplex Direction Continued • Note: Ax = b for the current x. If we let X = x + d to get a new point, then AX = b also. • Try it for  = 4. • X = = + 4

  19. Simplex Direction Continued • Let us substitute X = [4,0,2,1,5] into AX = b = Checks

  20. 4. Step Size • y = xB =  Is the minimum of [6/1, 5/1] = 5

  21. 5. New Point • BASIC = {x3,x4,x5} NONBASIC = {x1,x2} • [XB | XN] = [xB - y | xN + ep] • = [6,5,5] – 5[1,1,0] | [0,0] + 5[1,0] = [1,0,5] | [5,0] Or x1 = 5, x2 = 0, x3 = 1, x4 = 0, x5 = 5

  22. 5. New Point Continued • Check AX = b Checks

  23. 5. New Point Continued • Where are we now? • x1 = 5, x2 = 0 BASIC = {x1, x3, x5}, NONBASIC = {x2, x4}

  24. 1. Pricing B = B-1 = Checks B-1b = =

  25. 1. Pricing Continued • v = cBB-1 = = cbar2 = c2 - = -1=0 = -1 x2 prices favorably

  26. 1. Pricing Continued • cbar4 = c4 - = 0 + 2 = 2 x4 prices unfavorably!!!!!!!!!!!!!

  27. 2. Check Optimality • Not Optimal – let p = 2 • That is nonbasic variable x2 at the current value of 0 will be allowed to increase.

  28. 3. Simplex Direction • y = B-1a2 = = Basic var Can you give the direction vector d for this step? d = [ _, _, _, _, _]

  29. 4. Step Size • y < xB  <  = min [1/1, 5/1] = 1

  30. 5. New Point • [XB | XN] = [xB - y | xN + e2] • xB - y = [5, 1, 5] – 1[0, 1, 1] = [5, 0, 4] for [x1, x3, x5] • x2 =  = 1, and x4 remains at 0 • New Solution: Checks

  31. 5. New Point Continued • Where are we now? BASIC = {x1=5, x2=1,x5=4} NONBASIC = {x3=0, x4=0}

  32. 1. Pricing • B = B-1 = v = cBB-1 = =

  33. 1. Pricing Continued • cbar3 = c3 – va3 = 0 – • cbar4 = c4 – va4 = 0 - = 1 = 1

  34. 2. Check Optimality • O P T I M A L ! ! ! ! !

More Related