Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Simplex Method (created by George Dantzig in late 1940s) A systematic way of searching for an optimal LP solution BMGT 434, Spring 2002 Instructor: Chien-Yu.

Similar presentations


Presentation on theme: "1 Simplex Method (created by George Dantzig in late 1940s) A systematic way of searching for an optimal LP solution BMGT 434, Spring 2002 Instructor: Chien-Yu."— Presentation transcript:

1 1 Simplex Method (created by George Dantzig in late 1940s) A systematic way of searching for an optimal LP solution BMGT 434, Spring 2002 Instructor: Chien-Yu Chen

2 2 Introduction 06121824303642485460667278849096102108114120 0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 Y X 1): 1 X + 2 Y = 120 2): 1 X + 1 Y = 90 3): 1 X + 0 Y = 70 4): 0 X + 1 Y = 50 Payoff: 20 X + 10 Y = 1600 Optimal Decisions(X,Y): ( 70, 20)

3 3 Two-Phase Procedure Phase I -- Initial Solution: –Find an initial basic feasible solution by setting non-basic variables to zero. Phase II -- Optimal Solution: –Search for the optimal solution by pivoting from an extreme point to its adjacent extreme point.

4 4 Standard Equality Constraint Form Astro/Cosmo LP Model: Max20A+10C st A+ 2C<=120 A+ C<= 90 A <= 70 C<= 50 A, C >= 0 Standard Equality Constraint Form: Max20A+10C st A+ 2C+S1 =120 A+ C +S2 = 90 A +S3 = 70 C +S4= 50 A, C, S1, S2, S3, S4 >= 0 Note: S1, S2, S3 and S4 are slack variables.

5 5 Definitions of Solutions Solution -- A set of values for the variables that satisfy all the “major” constraints (ignoring the nonnegativity constraints). –e.g. (70, 50, -50, -30, 0, 0). Feasible Solution -- Any solution that are nonnegative as well (i.e. satisfying all the major and nonnegativity constraints). –e.g. (70, 0, 50, 20, 0, 50). Basic Solution -- A solution that consists of (n - m) zero- value non-basic variables and m basic variables from solving the remaining m-by-m subsystem, for an m-equality-constraint n-variable linear system. –e.g. (0, 0, 120, 90, 70, 50) and (70, 50, -50, -30, 0, 0).

6 6 Definitions of Solutions (cont.) Basic Feasible Solution -- A basic solution that is also feasible (i.e. satisfying all the major and nonnegativity constraints). –e.g. (0, 0, 120, 90, 70, 50) and (70, 0, 50, 20, 0, 50). –A basic feasible solution (an algebraic concept) actually represents an extreme/corner point of the feasible region (a geometric concept). –On the other hand, an extreme/corner point may associate with more than one basic feasible solution, because of degeneracy.

7 7 Example 13 Basic Solutions –C(6,2) = 6!/(4!*2!) = 15. –A=0 S3=0 (impossible). –C=0 S4=0 (impossible). 6 Basic Feasible Solutions I: (0, 0, 120, 90, 70, 50), II: (0, 50, 20, 40, 20, 0), III: (20, 50, 0, 20, 50, 0), IV: (60, 30, 0, 0, 10, 20), V: (70, 20, 10, 0, 0, 30), and VI: (70, 0, 50, 20, 0, 50). 0 70 90120 0 50 60 Y X 1): 1 X + 2 Y = 120 2): 1 X + 1 Y = 90 3): 1 X + 0 Y = 70 4): 0 X + 1 Y = 50 I II III IV V VI

8 8 Degenerate v.s. Nondegenerate (with respect to a basic feasible solution) (Assuming an m×n linear equation system) Degenerate -- Some basic variables have zero values; i.e., the number of positive variables is less than m. Nondegenerate -- All basic variables are positive; i.e., the number of positive variables is exactly m.

9 9 Example STX+Y<=10 X <= 5 Y<= 5 X, Y >= 0 Nonbasic VariablesBasic VariablesExtreme Point X=0 & Y=0S1=10, S2=5 & S3=5 C Y=0 & S2=0X=5, S1=5 & S3=5 B S1=0 & S2=0X=5, Y=5 & S3=0 A S1=0 & S3=0X=5, Y=5 & S2=0 A S2=0 & S3=0X=5, Y=5 & S1=0 A X=0 & S3=0Y=5, S2=5 & S1=5 D 012345678910 0 1 2 3 4 5 Y X 1): X + Y = 10 (i.e. S1 = 0) 2): X = 5 (i.e. S2=0) 3): Y = 5 (i.e. S3 = 0) C D A B

10 10 Adjacent Extreme Points Two extreme points are adjacent if their bases (i.e. sets of basic variables) are different by one variable only. Example: CornerN.B.Basic Variables IA, CS1, S2, S3, S4 IIA, S4S1, S2, S3, C IIIS1, S4A, S2, S3, C IVS1, S2A, S4, S3, C VS3, S2A, S4, S1, C VIS3, CA, S4, S1, S2 0 70 90120 0 50 60 Y X 1): 1 X + 2 Y = 120 2): 1 X + 1 Y = 90 3): 1 X + 0 Y = 70 4): 0 X + 1 Y = 50 I II III IV V VI

11 11 Transformed Equations (Gauss-Jordan Elimination) Each basic variable appears in one and only one equation, and, in that equation, its coefficient is +1. Only constant terms are on the right hand side of the equations, and these constant terms are nonnegative. Each set of transformed equations represents a basic feasible solution (extreme point). Example: (Corner I)(Corner II) A+2C+S1 = 120A +S1 -2S4 = 20 A+ C +S2 = 90A +S2 - S4 = 40 A +S3 = 70A +S3 = 70 C +S4 = 50 C + S4 = 50

12 12 Phase I: Obtaining an Initial Solution Any set of transformed equations is directly related to an extreme corner point (i.e. a basic feasible solution); therefore, it can be used as an initial solution. Thus, Phase I is designed to find a set of transformed equations corresponding to any initial corner of the constraint set.

13 13 Example [1] X1+ X2+ X3 = 5 [2] X1+3X2+5X3 = 9 [3] = -1*[1]+[2] 2X2+4X3 = 4 [4] = [3]/2 1X2+2X3 = 2 [5] = -1*[4]+[1]1X1 - X3 = 3 Transformed Equations: [5] X1 - X3 = 3 [4] X2+2X3 = 2 Initial Solution: Basic: X1=3, X2=2Nonbasic: X3=0

14 14 Phase II: Improving the Solution We could improve the solution by moving (pivoting) from current extreme point (basic feasible solution) to an adjacent extreme point (basic feasible solution) with better O.F. value. The basic feasible solution of an adjacent extreme point can be obtained by introducing a nonbasic variable (enter variable) into current basis to replace a basic variables (exit variable).

15 15 Phase II: Improving the Solution (cont.) Example -- Rewrite the Transformed Equations as A+2C+S1 = 120  S1 = 120 - A - 2C A+ C +S2 = 90  S2 = 90 - A - C A +S3 = 70  S3 = 70 - A C +S4 = 50  S4 = 50 - C Iterate the pivoting process until there is no adjacent extreme point whose O.F. value is better current extreme point’s; so, the current basic feasible solution is optimal.

16 16 Effects on O.F. Value (regarding to 1 unit increase of a non-basic variable) Indirect Effect (Potential Loss) –Caused by the induced changes in the current basic variables. Direct Effect (Potential Gain) –Caused by the change in the current nonbasic variables. Opportunity Cost (Net Potential Gain) –The opportunity cost of NOT having the 1-unit increase of the nonbasic variable.

17 17 Effects on O.F. Value (cont.) Current Extreme Point –(A, C, S1, S2, S3, S4) = (0, 0, 120, 90, 70, 50) –Basic variables: S1, S2, S3, and S4 –O.F. = 20A + 10C + 0S1 + 0S2 + 0S3 + 0S4 –Basic coefficients = (0, 0, 0, 0) –Nonbasic columns: »A column = (1, 1, 1, 0) T »C column = (2, 1, 0, 1) T Transformed Equations A+2C+S1 = 120  S1 = 120 - A - 2C A+ C +S2 = 90  S2 = 90 - A - C A +S3 = 70  S3 = 70 - A C +S4 = 50  S4 = 50 - C

18 18 Indirect Effect (Potential Loss) Caused by the induced changes in the current basic variables (due to the 1-unit increase of the non-basic variable). Zj = Indirect decrease in O.F. value = [Basic coefficients] [A column] = “Contribution” due only to basic variable change. (e.g.) = (0, 0, 0, 0) (1, 1, 1, 0) T = 0·(1) + 0·(1) + 0·(1) + 0·(0) = 0. (for nonbasic variable A)

19 19 Direct Effect (Potential Gain) Caused by the change in the current nonbasic variables. Cj = Direct increase in O.F. value = Contribution due to the 1-unit increase of the nonbasic variable = Cost coefficient of the nonbasic variable (e.g.) = 20 (for nonbasic variable A)

20 20 Opportunity Cost (Net Potential Gain) The opportunity cost of NOT having the 1-unit increase of the nonbasic variable. Cj - Zj = Opportunity cost = Potential gain - Potential loss = Direct effect - Indirect effect (e.g.) = 20 - 0 = 20 (for nonbasic variable A)

21 21 Enter and Exit Rules Enter Rule -- Set the nonbasic variable with the most positive opportunity cost Cj-Zj to be the enter variable to the current basis (assuming maximization problems). Exit Rule -- Set the basic variable that strictly confines the increase of the enter variable to be the exit variable from the current basis. (Note: The purpose is to keep the new basic solution feasible.)

22 22 Example Enter Rule –(Cj-Zj) A =20 & (Cj-Zj) C =10. –A is the enter variable. Exit Rule -- assuming C is the enter variable for demo –S1 = 120 -A -2C >= 0(i.e. C <= 120/2 = 60) S2 = 90 -A - C >= 0(i.e. C <= 90/1 = 90) S3 = 70 -A >= 0(i.e. C <= 70/0 =  ) S4 = 50 - C >= 0(i.e. C <= 50/1 = 50) Min –C <= 50 (corresponding to S4). –S4 is the exit variable.

23 23 Simplex Tableau A simplex tableau is a table-style representation of the corresponding transformed equations. There is a simplex tableau corresponding to each basic feasible solution (extreme point). A simplex tableau also contains the opportunity cost calculations. A simplex-tableau transformation brings us to another simplex tableau that represents an adjacent extreme point (basic feasible solution).

24 24 Simplex Tableau -- Setup Max20A + 10C st A + 2C + S1 = 120 A + C + S2 = 90 A + S3 = 70 C + S4 = 50 A, C, S1, S2, S3, S4 >= 0

25 25 Simplex Tableau -- Setup (cont.) Zj = [Basic Coefficient]  [j th Column] Cj - Zj = (j th Cost Coefficient) - Zj O.V. = [Basic Coefficient]  [b Column] Ratio = [b Column] / [Enter-Variable Column] (ratio of corresponding elements!)

26 26 Simplex Tableau -- Transformation

27 27 Simplex Tableau -- Transformation

28 28 Optimality Condition For a maximization problem, if all opportunity costs are nonpositive (i.e. Cj-Zj<=0 for all j’s), an optimal extreme point (basic feasible solution) has been reached.

29 29 Artificial Variables Motivation -- No straight-forward initial solution after adding slacks/surpluses. Example 3X1 + 4X2 >= 6  3X1 + 4X2 - S1 = 6 2X1 - 6X2 <= 4  2X1 - 6X2 + S2 = 4 Nonbasic variables: X1=X2=0 Basic variables: S1 = -6, S2 = 4 (infeasible!!) Artificial Variable -- with very negative cost coefficient  MAX ………………… -m  A1 (Note: m is a very large number)  ST 3X1 + 4X2 - S1 + A1 = 6  2X1 - 6X2 + S2 = 4

30 30 Example Max 12X1 + 20 X2 + 8X3  12X1 + 20 X2 + 8X3  s.t. 3X1 - 2X3 >= -2  3X1 - 2X3 - S1 = -2  -4X1 - X2 + 12X3 >= 4  -4X1 - X2 + 12X3 - S2 = 4  - X1 + 3X3 <= -6  - X1 + 3X3 + S3 = -6  3X1 + 4X2 - 6X3 = -12  3X1 + 4X2 - 6X3 = -12  X2 + 9X3 = 31  X2 + 9X3 = 31  X1>=0 X2>=0 X3>=0 12X1 + 20 X2 + 8X3  12X1 + 20 X2 + 8X3 -mA1-mA2-mA3-mA4 -3X1 + 2X3 + S1 = 2  -3X1 + 2X3 + S1 = 2 -4X1 - X2 + 12X3 - S2 = 4  -4X1 - X2 + 12X3 - S2 +A1 = 4 X1 - 3X3 - S3 = 6  X1 - 3X3 - S3 +A2 = 6 -3X1 - 4X2 + 6X3 = 12  -3X1 - 4X2 + 6X3 +A3 = 12 X2 + 9X3 = 31  X2 + 9X3 +A4 = 31

31 31 Possible Outcomes Optimal -- All opportunity costs are nonpositive. Infeasible -- One or more artificial variables remain in the solution when optimality conditions hold. Unbounded -- There exists a column with a positive opportunity cost, whose entries in that column are all nonpositive. Alternative Optima -- One of the nonbasic column has opportunity cost Cj-Zj=0 in the optimal tableau. (Assuming the optimal solution is nondegenerate.)

32 32 Treatments for Minimization Change O.F. from Min f(x) to Max -f(x). or Switch to the following rules: –Use +M for artificial coefficients. –Set the nonbasic variable with the most negative opportunity cost to be the enter variable. –Optimality conditions = all opportunity costs are nonnegative.


Download ppt "1 Simplex Method (created by George Dantzig in late 1940s) A systematic way of searching for an optimal LP solution BMGT 434, Spring 2002 Instructor: Chien-Yu."

Similar presentations


Ads by Google