1 / 26

Computational Methods for Management and Economics Carla Gomes

Computational Methods for Management and Economics Carla Gomes. Module 6b Simplex Pitfalls (Textbook – Hillier and Lieberman). Synopsis of simplex method Pitfalls: Tie for the entering variable Degeneracy Unboundedness Multiple optimal solutions Initialization: Adapting to other forms.

alexandria
Télécharger la présentation

Computational Methods for Management and Economics Carla Gomes

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. Computational Methods forManagement and EconomicsCarla Gomes Module 6b Simplex Pitfalls (Textbook – Hillier and Lieberman)

  2. Synopsis of simplex method • Pitfalls: • Tie for the entering variable • Degeneracy • Unboundedness • Multiple optimal solutions • Initialization: Adapting to other forms

  3. Simplex Method in Tabular Form • Assumption: Standard form max; only <= functional constraints; all vars have non-negativity constraints; rhs are positive • Initialization • Introduce slack variables • Decision variables non-basic variables (set to 0) • Slack variables  basic variables (set to corresponding rhs) • Transform the objective function and the constraints into equality constraints • Optimality Test • Current solution is optimal iff all the coefficients of objective function are non-negative

  4. Simplex Method in Tabular Form (cont.) • Iteration: Move to a better BFS • Step1 Entering Variable – non-basic variable with the most negative coefficient in the objective function. Mark that column as the pivot column. • Step2 Leaving basic variable – apply the minimum ratio test: • Consider in the pivot column only the coeffcients that are strictly positive • Divide each of theses coefficients into the rhs entry for the same row • Identify the row with the smallest of these ratios • The basic variable for that row is the leaving variable; mark that row as the pivot row; • The number in the intersection of the pivot row with the pivot column is the pivot number

  5. Simplex Method in Tabular Form (cont.) • Iteration: Move to a better BFS • Step3 Solve for the new BFS by using elementary row operations to construct a new simplex tableau in proper form • Divide pivot row by the pivot number • for each row (including objective function) that has a negative coefficient in the pivot column, add to this row the product of the absolute value of this coefficient and the new pivot row. • for each row that has a positive coefficient in the pivot column, add to this row the product the new pivot row.multiplied by the negative of the coefficient.

  6. Tie for the entering variable • Step1 Entering Variable – non-basic variable with the most negative coefficient in the objective function. Mark that column as the pivot column. • What if more two or more variables are tied? Example: Z = 3 x1 + 3 x2 Break ties randomly (it may affect the number of iterations ),

  7. Tie for the leaving variable - Degeneracy • Step2 Leaving basic variable – apply the minimum ratio test: • Identify the row with the smallest of these ratios • What if several rows have the smallest ratio? What does it mean? Does it matter? • Several basic variables will become 0 as the entering variable increases  therefore the variables not chosen to leave the basis will also have a value 0 (i.e., a basic variable with value 0 – called degenerate variable). • If a degenerate variable is chosen as the leaving basic variable, that means that the new variable will also have to be 0 (why?) •  Z will not improve and therefore the simplex method may get into a loop.

  8. Degeneracy BV z x1 x2 x3 x4 z 1 3 -2 0 0 2 = x3 0 -3 3 1 1 0 6 = = x4 0 -4 2 0 1 0 2 0 A bfs is degenerate if bj = 0 for some j. Otherwise, it is non-degenerate. This bfs isdegenerate.

  9. Degeneracy BV z x1 x2 x3 x4 z 1 3 -2 0 0 2 = x3 0 -3 3 1 1 0 6 = = x4 0 -4 2 0 1 3 2 3 A bfs is degenerate if bj = 0 for some j. Otherwise, it is non-degenerate. This bfs isnon-degenerate.

  10. Degeneracy BV z x1 x2 x3 x4 z 1 3 -2 0 0 2 = x1 = 0 x2 = Dx3 = 6 - 3Dx4 = 0 - 2Dz = 2 + 2D x3 0 -3 3 1 1 0 6 = = x4 0 -4 2 0 1 0 2 A bfs is degenerate if bj = 0 for some j. Otherwise, it is non-degenerate. Suppose that variable x2 will enter the basis. Degenerate  the solution may stay the same z stays the same

  11. A degenerate pivot BV -z x1 x2 x3 x4 z 1 1 3 -2 0 0 0 -1 0 2 2 = x1 = 0 x2 = 0x3 = 6 x4 = 0 z = 2 x3 0 3 -3 3 0 1 1 1 -3/2 0 6 6 = = x4 0 -2 -4 1 2 0 0 1/2 1 0 0 The entering variable is x2. The exiting variable is the one in constraint 2. In this case the solution did not change. (But the tableau did.)

  12. Non-degeneracy leads to strict improvement BV z x1 x2 x3 x4 z 1 3 -2 0 0 2 = x1 = 0 x2 = Dx3 = 6 - 3Dx4 = 2 - 2Dz = 2+ 2D x3 0 -3 3 1 1 0 6 = = x4 0 -4 2 0 1 2 If the BFS is non-degenerate, then the entering variable can strictly increase, and the objective value will strictly improve.

  13. Handling Degeneracy Perturb the RHS just a little, in just the right way No basis is degenerate Every bfs to the purturbed problem is also a bfs for the original problem The optimal basis for the perturbed problem is optimal for the original problem

  14. An LP before perturbation BV -z x1 x2 x3 x4 z 1 3 -2 0 0 0 = x3 0 -3 3 1 1 0 6. = = x4 0 -4 2 0 1 2. Goal: modify the problem by changing the RHS just a little Perturb it to avoid degeneracy Perturb it so little that solving the perturbed problem also solves the original problem.

  15. An example of a perturbed initial BFS BV -z x1 x2 x3 x4 z 1 3 -2 0 0 0 = x3 0 -3 3 1 1 0 6.00000000000013 = = x4 0 -4 2 0 1 2.00000000000041 In theory perturbations are even smaller In practice, the simplex method works fine without perturbations, that is, it really obtains the optimum basic feasible solution.

  16. Some Remarks on Degeneracy • It might seem that degeneracy would be rare. After all, why should we expect that the RHS would be 0 for some variable? • In reality, degeneracy is incredibly common. In practice: • LP Simplex based solvers automatically use the perturbation method and special breaking tie rules (e.g., Cplex) • If the problem is very degenerate we may need to use solve the LP using a method different than a simplex based method to solve the problem(e.g., interior point method)

  17. No leaving basic variable Unbounded Z Variable leaving the basis • One of the basic variables will become non-basic; write all the basic variables as a function of the entering variable; the most stringent value (i.e., smallest) will be the value for the new entering variable; What if no variable puts a limit on the value of the entering variable – this happens when all the coefficients of the entering variable are negative or zero. Unbounded Z

  18. -1 2 -3 3 -2 1 Unboundedness Express unboundedness in terms of algebraic notation. z x1 x2 x3 x4 1 1 0 0 1 = x1 = 0x2 = 1 x3 = 3 x4 = 0 z = 2 x1 = Dx2 = 1 + 2Dx3 = 3 + 3D. x4 = 0 z = 2 + D 0 -3 0 1 -1.5 = = 0 -2 1 0 .5 The entering variable is x1. Set x1 = D and x4 = 0. If the coefficients in the entering column are  0, then the solution is unboundedfrom above

  19. Multiple Optima (maximization) z = 8 + 0 x1 + x2 How much can x1 be increased? z x1 x2 x3 x4 1 0 4 0 0 8 = 0 1 3 1 0 6 = = 0 -1 2 0 1 2 This basic feasible solution is optimal! Is there another optimal solution? Suppose that x1 entered the basis. What would leave?

  20. There may be alternative optima ifcj 0 for all j and cj = 0 for some j where xj is non-basic Multiple Optima (maximization) z x1 x2 x3 x4 1 c1 0 c2 4 0 0 8 = 0 1 3 1 0 6 = = 0 -1 2 0 1 2 Use the min ratio rule to determine which variable leaves the basis.

  21. Multiple Optima (maximization) z x1 x2 x3 x4 1 0 0 4 4 0 0 0 0 8 8 = 0 1 1 3 3 1 1 0 0 6 6 = = 0 0 -1 2 5 0 1 1 1 8 2 Let x1 enter the basis. Let the basic variable in constraint 1 leave the basis. Note: the solution is different, but the objective value is the same.

  22. Multiple Optimal Solutions. Maximize P = 3 D + 2 W subject to D ≤ 4 2W ≤ 12 3D + 2W ≤ 18 and D ≥ 0, W ≥ 0. Every point on this line is An optimal solution with P=18

  23. Multiple Optimal Solutions. Two optimal solutions – what are they? Are there others?

  24. Multiple Optimal Solutions. The simplex method stops after the first optimal solution; In practice – good idea to look at other solutions – they may be better from other points of view. How do we see that a problem has multiple optima by looking at the Tableau? • At least one of the non-basic variables has a coefficient 0 in the Z row – so increasing any such a variable will not change the value of Z. Therefore these other BF optimal solutions can be identified • Note: Simplex only identifies BFS (that correspond to CPF solutions). • All other solutions are convex combinations of the BF optimal solutions

  25. Multiple Optimal Solutions. x1 x2 2 6 4 3 Two optimal solutions – what are they? Are there others? Every point on the line segment between (2,6) and (4,3) is optimal all the optimal solutions are a weighted average of these two solutions  Every convex combination of the two optimal BFS’s is optimal: w1,w2 ≥ 0 w1+w2=1 = + w1 w2 Convex Combination What solution do we get if w1=w2=0.5?

  26. Initialization: Adapting to other forms (next module)

More Related