You are on page 1of 6

Simplex Method

In this example you will be solving a linear programming problem using the simplex method. After working through this example, try to work some of the exercises from the book.

The example is found on Sheet 2. You can get there by clicking on the tab labeled "sheet 2" at the bottom left of the Excel screen.

functions necessary for this exercise: none

. After working through this " at the bottom left of the Excel .

160x2 + z = 0 or. The constraints are 1) 6x + 5y < 40 2) 200x + 100y < 1000 3) x > 0 4) y > 0 The objective is z = 240x + 160y We now rewrite the constraints and objective using new variables. using all the variables -240x1 . s2 = 1000 and z = 0. 0)) from the graph.3. x2) = (0.2 that is then completed in 8. x1 6 200 -240 x2 5 100 -160 s1 1 0 0 s2 0 1 0 z 0 0 1 solution 40 1000 0 As explained in the book. we have a solution if x1 = x2 = 0. Obviously. this does not give a maximum profit. we don't bother adjusting 3) or 4). . we can use it to solve linear programming problems. But we have found the corner point.160x2 + 0s1 + 0s2 + z = 0 We now have three equations.. s1 = 40. however.Since we can use Excel to solve systems of equations and evaluate formulas. 1) 6x1 + 5x2 + s1 = 40 2) 200x1 + 100x2 + s2 = 1000 3) x1 > 0 As noted in the book.160x2 + 0s1 + 0s2 + z = 0 Set it up in a matrix. 4) x2 > 0 Rewrite the objective with all variables on the left side. Let's work through the beginning example from Section 8. P1 (where (x1. The constraints are 1) 6x1 + 5x2 < 40 2) 200x1 + 100x2 < 1000 3) x1 > 0 4) x2 > 0 The objective is z = 240x1 + 160x2 Convert the constraint inequalities to equations. -240x1 . 1) 6x1 + 5x2 + s1 = 40 2) 200x1 + 100x2 + s2 = 1000 3) -240x1 .

we have a solution if s1 = s2 = 0. The choices are z = 0. we will do row reduction (pivot) on the second row first. 6 1 -240 0 1 0 5 0.3.5 1400 elimination Again.25 20 -0. s1 = 10 and z = 1200.015 0. as noted in the book.2 0 0 1 0 0 1 40 5 simplify by multiplying by 1/200 0 10 elimination 5 1200 elimination Again. x1 = 5. x2) = (5. 1200 or 1400.3.03 0.5. We have found another corner point.6 0 0 1 0 0 1 5 simplify by multiplying by 1/2 5 1200 5 elimination 2. 5)) from the graph.005 1.5. x2 = 5 and z = 1400.0125 0.5 -40 1 0 0 1 0 0 0 0.2 -0. Obviously the answer is 1400 so x1 = 2. 0)) from the graph. No further pivoting possible means one of the points we found must give the maximum.5 -160 2 0.5 0 0 0. x2) = (2. 0 1 0 0 1 0 1 0. x1 = 2. We have found another corner point.5 -40 1 0 0 0.As described in 8.5 and x2 = 5. P4 (where (x1. we have a solution if s2 = x2 = 0.005 0 -0.015 0.5 -0. P3 (where (x1.005 1. . As described in 8. as noted in the book. we will now pivot on the first row.

and z = 0. P1 (where (x1. Obviously. oint. x2) .

The choices . We have aximum. We have simplify by multiplying by 1/2 and z = 1400.simplify by multiplying by 1/200 nd z = 1200.