The Simplex Method Maximize Subject to and Z 3x1 5x 2 , x1 4 2x2 12 3x1 2 x2 18 x1 0, x2 0 Software Operation • • • • • • • (1) Select “Linear Programming” and “OK” (2) Select “File” and Click “New” (3) Specify Number of Decision Variables (4) Specify Number of Constraints (5) Specify Objective Type and “OK” (6) Put “Coefficients” (7) Solve Example Embassy Motorcycle (EM) manufactures two lightweight motorcycles designed for easy handling and safety. The EZRider model has a new engine and a low profile that make it easy to balance. The Lady-Sport model is slightly larger, uses a more traditional engine, and is specifically designed to appeal to women riders. Embassy produces the engines for both models at its Des Moines, Iowa, plant. Each EZRider engine requires 6 hours of manufacturing time and each Lady-Sport engine requires 3 hours of manufacturing time. The Des Moines plant has 2100 hours of engine manufacturing time available for the next production period. Embassy’s motorcycle frame supplier can supply as many EZ-Rider frames as needed. However, the Lady-Sport frame is more complex and the supplier can provide only up to 280 Lady-Sport frames for the next production period. Final assembly and testing requires 2 hours for each EZ-Rider model and 2.5 hours for each Lady-Sport model. A maximum of 1000 hours of assembly and testing time are available for the next production period. The company’s accounting department projects a profit contribution of $2400 for each EZ-Rider produced and $1800 for each Lady-Sport produced. Formulate a linear programming model that can be used to determine the number of units of each model that should be produced in order to maximize the total contribution to profit. Find the optimal solution using the graphical solution procedure. Which constraints are binding. Example (a) Let E = number of units of the EZ-Rider produced L = number of units of the Lady-Sport produced Max 2400E + 1800L 6E + 3L s.t. L 2E + 2.5L 2100 Engine time 280 Lady-Sport maximum 1000 Assembly and testing E, L 0 L Example (b) 700 Number of EZ-Rider Produced 600 Engine Manufacturing Time 500 400 Frames for Lady-Sport 300 Optimal Solution E = 250, L = 200 Profit = $960,000 200 100 Assembly and Testing 0 E 100 200 300 400 Number of Lady-Sport Produced 500 Example (c) The binding constraints are the manufacturing time and the assembly and testing time. From a geometric viewpoint x2 x1 0 8 : CPF solutions (Corner-Point Feasible) : Corner-point infeasible solutions 3x1 2 x2 18 ( 4,6) 2 x2 12 6 x1 4 4 Feasible 2 region 0 2 4 x2 0 6 8 10 x1 Optimality test: There is at least one optimal solution. If a CPF solution has no adjacent CPF solutions that are better (as measured by Z) than itself, then it must be an optimal solution. Initialization Optimal Solution? No Iteration Yes Stop x2 Z 30 ( 2,6) (0,6) 1 2 Z 36 ( 4,3) Feasible region 0 (0,0) Z 0 Z 27 Z 12 ( 4,0) x1 The Key Solution Concepts Solution concept 1: The simplex method focuses solely on CPF solutions. For any problem with at least one optimal solution, finding one requires only finding a best CPF solution. Solution concept 2: The simplex method is an iterative algorithm ( a systematic solution procedure that keeps repeating a fixed series of steps, called an iteration). Solution concept 3: The initialization of the simplex method chooses the origin to be the initial CPF solution. Solution concept 4: Given a CPF solution, it is much quicker computationally to gather information about its adjacent CPF solutions than other CPF solutions. Therefore, each time the simplex method performs an iteration to move from the current CPF solution to a better one, it always chooses a CPF solution that is adjacent to the current one. Solution concept 5: After the current CPF solution is identified, the simplex method identifies the rate of improvement in Z that would be obtained by moving along edge. Solution concept 6: The optimality test consists simply of checking whether any of the edges give a positive rate of improvement in Z. If no improvement is identified, then the current CPF solution is optimal. Simplex Method To convert the functional inequality constraints to equivalent equality constraints, we need to incorporate slack variables. Original Form of Model Augmented Form of the Model Slack variables Max Z 3x1 5x 2 , s.t. x1 4 Max Z 3x1 5x 2 , s.t. x x 2x2 x4 2x2 12 3x1 2 x2 18 and x1 0, x2 0 3 1 3x1 2 x2 and 4 12 x5 18 x j 0, for j 1,2,3,4,5. A basic solution is an augmented corner-point solution. A Basic Feasible (BF) solution is an augmented CPF solution. Properties of BF Solution 1. Each variable is designated as either a nonbasic variable or a basic variable. 2. # of nonbasic variables = # of functional constraints. 3. The nonbasic variables are set equal to zero. 4. The values of the basic variables are obtained from the simultaneous equations. 5. If the basic variables satisfy the nonnegativity constraints, the basic solution is a BF solution. Simplex in Tabular Form (a) Algebraic Form (0) Z 3x1 5x2 x1 x3 (1) 2x 2 x4 (2) x5 (3) 3x1 2 x2 (b) Tabular Form Basic Variable Eq. Z (0) 1 Z x3 (1) 0 x4 (2) 0 x5 (3) 0 0 4 12 18 Coefficient of: x1 x2 x3 x4 x5 -3 -5 0 1 0 1 0 2 0 3 2 0 0 0 1 0 0 0 0 1 Right Side 0 4 12 18 The most negative coefficient minimum (b) Tabular Form Coefficient of: BV Eq. Z x1 x2 x3 x4 Z (0) 1 -3 -5 0 0 x3 (1) 0 1 0 1 0 x4 (2) 0 0 2 0 1 x5 (3) 0 3 2 0 0 Right Side 0 12 4 6 2 12 18 18 9 x5 0 0 0 1 2 12 18 12 6 2 18 9 2 minimum The most negative coefficient (b) Tabular Form Coefficient of: Iteration BV Eq. Z (0) x3 (1) 0 x4 (2) x5 (3) Z 1 0 0 0 x1 x2 x3 x4 x5 -3 -5 0 1 0 1 0 2 0 3 2 0 0 0 1 0 0 0 0 1 Right Side 0 4 12 18 4 6 4 4 1 6 2 3 minimum The most negative coefficient (b) Tabular Form Coefficient of: Iteration BV Eq. Z (0) x3 (1) 1 x2 (2) x5 (3) Z 1 0 0 0 x1 x2 x3 x4 x5 -3 1 0 3 5 0 0 0 1 0 0 1 0 0 1 0 0 2 0 1 2 -1 Right Side 30 4 6 6 The optimal solution x1 2, x2 6 None of the coefficient is negative. (b) Tabular Form Coefficient of: Iteration BV Eq. Z Z (0) 1 x3 (1) 0 2 x2 (2) 0 x1 (3) 0 x1 x2 x3 x4 0 0 0 0 0 1 0 1 1 0 3 2 Right x5 Side 1 36 1 1 3 3 0 12 0 0 13 1 3 2 6 2 (a) Optimality Test (b) Minimum Ratio Test: (a) Optimality Test: The current BF solution is optimal if and only if every coefficient in row 0 is nonnegative ( 0) . Pivot Column: A column with the most negative coefficient (b) Minimum Ratio Test: 1. Pick out each coefficient in the pivot column that is strictly positive (>0). 2. Divide each of these coefficients into the right side entry for the same row. 3. Identify the row that has the smallest of these ratios. 4. 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. Breaking in Simplex Method (a) Tie for Entering Basic Variable Several nonbasic variable have largest and same negative coefficients. (b) Degeneracy Multiple Optimal Solution occur if a non BF solution has zero or at its coefficient at row 0. Algebraic Form (0) (1) (2) (3) Z 3x1 2x2 0 4 x3 2x2 x4 12 x5 18 3x1 2 x2 x1 0 0 Right Solution x5 Side Optimal? 0 0 1 0 0 4 0 1 0 12 x5 (3) 0 3 2 0 0 1 18 Coefficient of: 0 BV Eq. Z x1 x2 Z (0) 1 -3 -2 x3 (1) 0 1 0 x4 (2) 0 0 2 x3 x4 No 3 0 Right Solution x5 Side Optimal? 0 12 1 0 0 4 0 1 0 12 x5 (3) 0 0 2 -3 0 1 6 Coefficient of: 1 BV Eq. Z x1 x2 Z (0) 1 0 -2 x1 (1) 0 1 0 x4 (2) 0 0 2 x3 x4 No 0 Right Solution x5 Side Optimal? 1 18 0 0 4 1 -1 6 1 3 Coefficient of: 2 BV Eq. Z x1 x2 x3 Z (0) 1 0 0 0 x1 (1) 0 1 0 1 x4 (2) 0 0 0 3 x2 (3) 0 0 1 3 x4 0 2 2 Yes Coefficient of: Right Solution x5 Side Optimal? 1 18 BV Eq. Z x1 x2 x3 x4 Z (0) 1 0 0 0 0 x1 (1) 0 1 0 0 13 13 Extra x 3 (2) 0 0 0 1 1 3 13 x2 (3) 0 0 1 0 1 0 2 2 2 6 Yes (c) Unbounded Solution If An entering variable has zero in these coefficients in its pivoting column, then its solution can be increased indefinitely. Basic Coefficient of: Right x2 x3 side Ratio Variable Eq. Z x1 (0) 1 -3 -5 0 0 Z x3 (1) 0 1 0 1 4 None Other Model Forms (a) Big M Method (b) Variables - Allowed to be Negative (a) Big M Method Original Problem Max Z 3x1 5x2 s.t. 4 2x2 12 3x1 2 x2 18 x1 and x1 0, x2 0 Artificial Problem Max Z 3x1 5 x2 Mx5 s.t. x1 x3 2x2 x4 3x1 2 x2 4 12 x5 18 and x j 0, for j 1,2,3,4,5. x3 , x4: Slack Variables (M: a large positive number.) x5 : Artificial Variable Max: s.t. 3x1 5 x2 Mx5 3x1 2 x2 x5 18 (0) (3) Eq (3) can be changed to x5 18 3x1 2 x2 (4) Put (4) into (0), then Max: 3x1 5x2 M (18 3x1 2 x2 ) or Max: (3M 3) x1 (2M 5) x2 18M or Max: Z (3M 3) x1 (2M 5) x2 18M Max s.t. Z (3M 3) x1 (2M 5) x2 18M x1 x3 2x2 3x1 2 x2 4 x4 12 x5 18 Coefficient of: x2 x3 x4 x1 BV Eq. Z Z (0) 1 -3M-3 -2M-5 0 0 x3 (1) 0 1 0 1 0 0 x4 (2) 0 3 2 0 1 x5 (3) 0 3 2 0 0 (1) (2) (3) Right x5 Side 0 -18M 0 4 0 12 1 18 Coefficient of: 1 x2 x3 x4 x1 BV Eq. Z Z (0) 1 -2M-5 3M+3 0 0 x1 (1) 0 1 0 1 0 x4 (2) 0 0 2 0 1 x5 (3) 0 3 2 0 0 Right x5 Side 0 -6M+12 0 4 0 12 1 18 2 BV Eq. Z Z (0) 1 x1 (1) 0 x4 (2) 0 x2 (3) 0 Right x3 x4 x5 Side M 5 9 0 2 27 2 0 1 0 4 Coefficient of: x1 x2 0 0 1 0 0 0 3 1 -1 6 1 3 0 1 3 0 2 2 BV Eq. Z Z (0) 1 x1 (1) 0 Extra x3 (2) 0 x2 (3) 0 x1 x2 0 0 1 0 Right x3 x4 x5 Side 0 3 2 M 1 27 0 13 1 3 4 0 0 1 1 0 1 0 1 Coefficient of: 3 2 1 0 3 6 3 (b) Variables with a Negative Value j j j j x j x x , x 0, x 0 Min s.t. x1 3x1 5x2 4 2x2 12 3x1 2 x2 18 x1 : URS , x2 0 Min s.t. 1 1 3x 3x 5 x2 1 1 x x 4 2x2 12 1 1 3x 3x 2 x2 18 1 1 x 0, x ,0 x2 0 Homework (1) P. 78 : Prob. 2-31 (2) P. 79 : Prob. 2-38 (3) P. 132 : Prob. 3-7 (4) P. 134 : Prob. 3-10 Due day: September 8 (M)