1 / 47

Linear Programming: The Simplex Method

Linear Programming: The Simplex Method. Introduction. Graphical methods are fine for 2 variables. But most LP problems are too complex for simple graphical procedures. The Simplex Method: examines corner points, like in graphing;

haru
Télécharger la présentation

Linear Programming: The Simplex Method

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. Linear Programming: The Simplex Method

  2. Introduction • Graphical methods are fine for 2 variables. • But most LP problems are too complex for simple graphical procedures. • The Simplex Method: • examines corner points, like in graphing; • systematically examines corner points, using algebra, until an optimal solution is found; • does its searching iteratively.

  3. Introduction Why study the Simplex Method? • The Simplex Method: • Provides the optimal solution to the Xi variables and the maximum profit (or minimum cost). • Provides important economic information. • Understanding how the Simplex Method works is important because • it allows for understanding how to interpret LP computer printouts.

  4. Setting UP the Simplex Method • The algebraic procedure is based on solving systems of equations. • The first step in setting up the simplex method is to convert the functional inequality constraints to equivalent equality constraints. This conversion is accomplished by introducing slack variables. • To illustrate, consider this constraint: X14 The slack variable for this constraint is defined to be S1=4 - X1 which is the amount of slack in the left-hand side of the inequality. Thus X1+S1=4

  5. Example • Objective Function Max. Z=3X1+5X2 • Subject to: X14  X1+S1=4 2X2 12  2X2+S2=12 3X1+2X2 18  3X1+2X2+S3=18 X1,X2 0

  6. The Standard Form of the Model Z-3X1-5X2=0 ..………(0) X1+S1=4 ...……...(1) 2X2+S2=12 ..………(2) 3X1+2X2+X5=18 ………...(3)

  7. The Simplex Method in Tabular Form

  8. Summary of the Simplex Method • Initialization: Introduce slack variables, then constructing the initial simplex tableau. • Optimality Test: The current basic feasible solution is optimal if and only if everycoefficient in row (0) is nonegative (0). If it is, stop; otherwise, go to an iteration to obtain the next basic feasible solution. • Iteration: Step1 Determine the entering basic variable by selecting the variable with negative coefficient having the largest absolute value (i,e., the “most negative” coefficient) in Eq. (0). Put a box around the column below this coefficient, and call this the pivot column.

  9. Summary of the Simplex Method/ continued Step 2 Determine the leaving basic variable by applying the minimum ratio test. Minimum Ratio Test • Pick out each coefficient in the pivot column that is strictly positive (>0). • Divide each of these coefficients into the right side entry for the same row. • Identify the row that has the smallest of these ratios. • The basic variable for that row is the leaving basic variable, so replace that variable by the entering basic variable in the basic variable column of the next simplex tableau. Put a box around this row and call it the pivot row. Also call the number that is in both boxes the pivot number.

  10. Summary of the Simplex Method/ continued Step 3 Solve for the new basic feasible solution by using elementary row operations (by applying Gauss-jordan method), The method effects a change in basis by using two types of computations: 1. Type 1 (pivot equation): new pivot Eq.=old pivot Eq. ÷ pivot number 2. Type 2 (all other eqautions, including Z): new Eq. = old Eq. – (its entering column coefficient) X (new pivot Eq.)

  11. Example • Solve this model using the simplex method: • Objective Function Max. Z=3X1+5X2 • Subject to: X14 2X2 12 3X1+2X2 18 X1,X2 0

  12. Solution • First, the Standard Form of the model: • Z-3X1-5X2=0 ..……….(0) • X1+S1=4 ...……....(1) • 2X2+S2=12 ..…….…(2) • 3X1+2X2+X5=18 ………...(3)

  13. The Simplex Method in Tabular Form

  14. # (0) Iteration

  15. # (1) Iteration

  16. # (2) Iteration

  17. Going to the optimality test, we find that this solution is optimal because none of the coefficients in row (0) is negative, so the algorithm is finished. • Consequently, the optimal solution for this problem is X1=2, X2=6.

  18. Artificial Starting Solution (The M-Technique) • In our presentation of the simplex method we have used the slack variable as starting basic solutions. However, If the original constraint is an equation or of the type (), we no longer have a ready starting basic feasible solution. • The idea of using artificial variables is quite simple. • The added variable will play the same role as that of a slack variable, in providing a starting basic variable. • However, since such artificial variables have no physical meaning from the standpoint of the original problem (hence the name “artificial”), the procedure will be valid only if we force these variables to be zero when the optimum is reached.

  19. In other words, we use them only to start the solution and must subsequently force them to be zero in the final solution; otherwise, the resulting solution will be infeasible. • Let us consider the next example:

  20. Example • Objective Function Min. Z=4X1+X2 • ST 3X1+X2=3 4X1+3X26 X1+2X2 4 X1,X2 0 The standard form is obtained by augmenting a surplus (A1) and adding a slack (S1) to the left sides of constraints 2 and 3.Thus, we have:

  21. Example\continued • The standard form: Min. Z=4X1+X2 ST 3X1+X2 =3 4X1+3X2 –A1 =6 X1+2X2 +S1= 4 X1,X2,A,S1 0 The first and second equations do not have variables that play the role of a slack. Hence we augment the two artificial variables R1 and R2 in these two equations as follows:

  22. Example\continued 3X1+ X2+R1=3 4X1+3X2-A1+R2=6 We can penalize R1 and R2 in the objective function by assigning them very large positive coefficients in the objective function. Let M>0 be a very large constant; then the LP with its artificial variables becomes: Min. Z=4X1+X2+MR1+MR2 ST 3X1+ X2 +R1 =3 4X1+3X2-A1 +R2 =6 X1+2X2 +S1=4 X1, X2, S1, A1, R1, R20

  23. Example\continued • How does the M-technique change if we are maximizing instead of minimizing? Using the same logic of penalizing the artificial variable, we must assign them the coefficient (-M) in the objective function (M>0), thus making it unattractive to maintain the artificial variable at a positive level in the optimum solution. • Having constructed a starting feasible solution, we must “condition” the problem so that when we put it in tabular form, the right-side column will render the starting solution directly. This is done by using the constraint equations to substitute out R1 and R2 in the objective function. Thus R1=3-3X1-X2 R2=6-4X1-3X2+A1

  24. Example\continued • The objective function thus becomes Z=4X1+X2+M(3-3X1-X2)+M(6-4X1-3X2+A1) =(4-7M)X1+(1-4M)X2+MA1+9M • The sequence of tableaus leading to the optimum solution is shown in the next slides. • Observe that this is a minimization problem so that the entering variable must have the most positive coefficient in the Z-equation. The optimum is reached when all the nonbasic variables have nonpositive z-coefficients. (remember that M is a very large positive constant).

  25. Example\continued • The final standard form: Z-(4-7M)X1-(1-4M)X2-MA1=9M -------(0) ST 3X1+ X2 +R1 =3 --------(1) 4X1+3X2-A1 +R2 =6 --------(2) X1+2X2 +S1=4 --------(3) X1, X2, S1, A1, R1, R20

  26. Example\continued(The tabular form)

  27. Example\continued(Iteration #1)

  28. Example\continued(Iteration #2)

  29. Example\continued(Iteration #3 optimum)

  30. Example\continued • The optimum solution is X1=2/5, X2=9/5, Z=17/5. • Since it contains no artificial variables at positive level, the solution is feasible with respect to the original problem before the artificials are added. (If the problem has no feasible solution, at least one artificial variable will be positive in the optimum solution).

  31. Example #1 • Consider the following linear program problem: Min. Z=3X1+8X2+X3 ST 6X1 +2X2+6X3 6 6X1 +4X2 =12 2X1 -2X2  2 X1,X2, X30 • Construct the starting feasible solution (Set Up The Initial Simplex Tableau). • Determine the entering column and the leaving row.

  32. Example #2 • Consider the following linear program problem: Max. Z=3X1+5X2 ST X14 2X2 12 3X1+2X2=18 X1,X2 0 • Construct the starting feasible solution (Set Up The Initial Simplex Tableau). • Determine the entering column and the leaving row.

  33. Special Cases in Simplex Method Application • We will consider special cases that can arise in the application of the simplex method, which include: • Degeneracy. • Alternative optima (more than one optimum solution). • Unbounded solutions. • Nonexisting (or infeasible) solutions.

  34. Degeneracy • In the application of the feasibility condition, a tie for the minimum ratio may be broken for the purpose of determining the leaving variable. When this happens, however, one or more of the basic variables will necessarily equal zero in the next iteration. • In this case, we say that the new solution is degenerate. (In all LP examples we have solved so far, the basic variables always assumed strictly positive values). • The degeneracy has two implications: The first deals with the phenomenon of cycling or circling (If you look at iterations 1 and 2 in the next example you will find that the objective value has not improved (Z=18)), in general, the simplex procedure would repeat the same sequence of iterations, never improving the objective value and never terminating the computations.

  35. Degeneracy • The second theoretical point arises in the examination of iterations 1 and 2. Both iterations, although differing in classifying the variables as basic and nonbasic, yield identical values of all variables and objective. • An argument thus arises as to the possibility of stopping the computations at iteration 1 (when degeneracy first appears), even though it is not optimum. This argument is not valid because, in general, a solution may be temporarily degenerate.

  36. Degeneracy/example Max. Z=3X1+9X2 ST X1+4X2 8 X1+2X2 4 X1,X2 0

  37. Degeneracy/example

  38. Alternative Optima • When the objective function is parallel to a binding constraint, the objective function will assume the same optimal value at more than one solution point. For this reason they are called alternative optima. • Algebraically, after the simplex method finds one optimal basic feasible (BF) solution, you can detect if there any others and, if so, find them as follows: Whenever a problem has more than one optimal BF solution, at least one of the nonbasic variables has a coefficient of zero in the final row (0), so increasing any such variable will not change the value of Z. Therefore, these other optimal BF solutions can be identified (if desired) by performing additional iterations of the simplex method, each time choosing a nonbasic variable with a zero coefficient as the entering basic variable.

  39. Alternative Optima/example Max. Z=2X1+4X2 ST X1+2X2 5 X1+ X2 4 X1,X2 0

  40. Alternative Optima/example

  41. (2, 6) Every point on this darker line segment is optimal, each with z = 18. (4, 3) As in this case, any problem having multiple optimal solutionswill have an infinite number of them, each with the same optimal value of the objective function.

  42. Unbounded Solution • In some LP models, the values of the variables may be increased indefinitely without violating any of the constraints, meaning that the solution space is unbounded in at least one direction. • Unboundedness in a model can point to one thing only. The model is poor constructed. • The general rule for recognizing unboundedness is as follows: If at any iteration the constraint coefficients of a nonbasic variable are nonpositive, then the solution space is unbounded in that direction.

  43. Unbounded Solution/example Max. Z=2X1+X2 ST X1-X2 10 2X1  40 X1,X2 0

  44. Unbounded Solution/example

  45. Infeasible Solution • If the constraints cannot be satisfied, the model is said to have no feasible solution. This situation can never occur if all the constraints are of the type  (assuming nonegative right-side constants), since the slack variable always provides a feasible solution. • However, when we employ the other types of constraints, we resort to the use of artificial variables which may do not provide a feasible solution to the original model. • Although provisions are made to force the artificial variables to zero at the optimum, this can occur only if the model has a feasible space. If it does not, at least one artificial variable will be positive in the optimum iteration. • See the next example, the artificial variable R is positive (=4) in the optimal solution.

  46. Infeasible Solution/example Max. Z=3X1+2X2 ST 2X1+X2 2 3X1 +4X2  12 X1,X2 0

  47. Infeasible Solution/example

More Related