Sie sind auf Seite 1von 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

Since we can use Excel to solve systems of equations and evaluate


formulas, we can use it to solve linear programming problems. Let's
work through the beginning example from Section 8.2 that is then
completed in 8.3..
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.
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.
1) 6x1 + 5x2 + s1 = 40
2) 200x1 + 100x2 + s2 = 1000
3) x1 > 0
As noted in the book, we don't bother adjusting 3) or 4).
4) x2 > 0
Rewrite the objective with all variables on the left side.
-240x1 - 160x2 + z = 0
or, using all the variables
-240x1 - 160x2 + 0s1 + 0s2 + z = 0
We now have three equations.
1) 6x1 + 5x2 + s1 = 40
2) 200x1 + 100x2 + s2 = 1000
3) -240x1 - 160x2 + 0s1 + 0s2 + z = 0
Set it up in a matrix.
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, s1 = 40, s2 = 1000 and z = 0. Obviously,


however, this does not give a maximum profit. But we have found the corner point, P1 (where (x1, x2) =
(0, 0)) from the graph.

As described in 8.3, we will do row reduction (pivot) on the second row first.
6
1
-240

5
0.5
-160

1
0
0

0
0.005
0

0
0
1

0
1
0

2
0.5
-40

1
0
0

-0.03
0.005
1.2

0
0
1

40
5 simplify by multiplying by 1/200
0
10 elimination
5
1200 elimination

Again, as noted in the book, we have a solution if s2 = x2 = 0, x1 = 5, s1 = 10 and z = 1200. We have


found another corner point, P4 (where (x1, x2) = (5, 0)) from the graph.
As described in 8.3, we will now pivot on the first row.
0
1
0

1
0.5
-40

0.5
0
0

-0.015
0.005
1.2

0
0
1

5 simplify by multiplying by 1/2


5
1200

0
1
0

1
0
0

0.5
-0.25
20

-0.015
0.0125
0.6

0
0
1

5 elimination
2.5
1400 elimination

Again, as noted in the book, we have a solution if s1 = s2 = 0, x1 = 2.5, x2 = 5 and z = 1400. We have
found another corner point, P3 (where (x1, x2) = (2.5, 5)) from the graph.
No further pivoting possible means one of the points we found must give the maximum. The choices are z
= 0, 1200 or 1400. Obviously the answer is 1400 so x1 = 2.5 and x2 = 5.

z = 0. Obviously,
P1 (where (x1, x2) =

simplify by multiplying by 1/200

= 1200. We have

simplify by multiplying by 1/2

z = 1400. We have

um. The choices are z

Das könnte Ihnen auch gefallen