You are on page 1of 28

THE SIMPLEX METHOD

Learning Objectives
After completing this chapter, you should be able to:
1. Explain the ways in which the simplex method is superior to the graphical method for solving linear programming problems. 2. Solve small maximization problems manually using the simplex method & interpret the solutions. 3. Solve maximization problems that have mixed constraints and interpret those solutions.
1

Learning Objectives (contd)

4. Solve minimization problems and interpret those solutions. 5. Discuss unbound solutions and multiple optimal solutions in terms of the simplex method and recognize infeasibility in a simplex solution.

Overview of the Simplex Method


Advantages and Characteristics

More realistic approach as it is not limited to problems with two decision variables Systematically examines basic feasible solutions for an optimal solution. Based on the solutions of linear equations (equalities) using slack variables to achieve equality.

1.

2.

Convert the LP to0standard form. Min problem: Row all nonpositive Obtain a bfs (if possible) from the standard form. Determine whether the current bfs is optimal.
If yes, then stop. If not, determine which NBV should become BV and which BV should become a NBV to find a new bfs with a better objective value. Use eros to find the new bfs with the better objective function value. Go back to step 3
4

Any basic solution to LP in which all variables are Max problem: Row 0 all nonnegative nonnegative

Basic Feasible Solution The Simplex Algorithm

3.

How to Convert an LP to Standard Form

LP can have both equality and inequality constraints. Before the simplex algorithm can be used, LP must be converted into an equivalent problem in which all constraints are equations and all variables are non-negative.

Slack and Surplus Variables

A linear program in which all the variables are nonnegative and all the constraints are equalities is said to be in standard form. Standard form is attained by adding slack variables to "less than or equal to" constraints, and by subtracting surplus variables from "greater than or equal to" constraints. Slack and surplus variables represent the difference between the left and right sides of the constraints. Slack and surplus variables have objective function coefficients equal to 0.

Dakota LP Model LP Model for Dakota Problem


max z = 60x1+ 30x2 + 20x3 s.t. 8x1 + 6x2 + x3 48 4x1 + 2x2 + 1.5x3 20 2x1+ 1.5x2 + 0.5x3 8
x2 5 x1, x2 , x3, 0

Convert the LP to standard form.

max z = 60x1+ 30x2 + 20x3 s.t. 8x1 + 6x2 + x3 + s1 4x1 + 2x2 + 1.5x3 + s2 2x1+ 1.5x2 + 0.5x3 +s3
x2

= 48

= 20
=8 + s4 = 5

x1, x2 , x3 , s1, s2, s3, s4 0


8

Simplex Tableau
Initial Tableau
BV Row

x1

x2

x3

s1

s2

s3

s4

RHS ratio

z s1 s2 s3 s4

0 1 2 3 4

1 -60 0 8 0 4 0 2 0 0

-30 6 2 1.5 1

-20 1 1.5 0.5 0

0 1 0 0 0

0 0 1 0 0

0 0 0 1 0

0 0 0 0 1

0 48 20 8 5

6 5 4 -

Optimal when Row 0 all non-negative Most -ve

Smallest Ratio
9

Simplex Tableau
Tableau 1
BV Row
z x1 x3 + 60R3 s1 s2 s3 R0 R1 8R3 15 -5 0 0 30 0R2 -14R3 1 0 -4 x2 s4

RHS ratio

z s1

s2
x1 s4

0 1 2 3 4

1 0 0 0 0

0 0

0 0

-1 0.5 R3 2

0
0 0

1 -2

1 0.75 0.25 0 1 0
Most -ve

0 0.5 0 0 0 1

240 16 4 8 4 16 5

Smallest Ratio

10

Simplex Tableau
Tableau 2
BV Row z x1 x2 x3

z s1

x3
x1 s4

0 1 2 3 4

1 0 0 0 0

0 0

5 -2

0 0

-2

R0 s2 + 5R2 s3 s4 R1 + R2 0 10 10 0 R2 1 2 2 -8 0 0R32 1/4 -4R2 0


s1

RHS ratio

280 24

8
2 5

1 1.25 0 0 1 0

0 -0.5 1.5 0 0 0

0 1

Row 0 all non-negative Current solution is optimal

11

Dakota LP Modelfor Dakota Problem Optimal Solution


x1 = 2 x2 = 0

x3 = 8
s1 = 24
s2 = s3, = 0

s 4, = 5 z = 280
12

Dakota LP Model Multiple Optimal Solutions


max z = 60x1+ 35x2 + 20x3 s.t. 8x1 + 6x2 + x3 48 4x1 + 2x2 + 1.5x3 20 2x1+ 1.5x2 + 0.5x3 8
x2 5 x1, x2 , x3, 0

13

Simplex Tableau
Initial Tableau
BV Row

x1

x2

x3

s1

s2

s3

s4

RHS ratio

z s1 s2 s3 s4

0 1 2 3 4

1 -60 0 8 0 4 0 2 0 0

-35 6 2 1.5 1

-20 1 1.5 0.5 0

0 1 0 0 0

0 0 1 0 0

0 0 0 1 0

0 0 0 0 1

0 48 20 8 5

6 5 4 -

14

Simplex Tableau
Tableau 1
BV Row
z x1 x2 x3 s1 s2 s3 s4

RHS ratio

z s1

s2
x1 s4

0 1 2 3 4

1 0 0 0 0

0 0

10 0

-5 -1

0 1

0 30 0 -4

0 0

-1

0.5

0
0 0

1 -2

1 0.75 0.25 0 1 0
Most -ve

0 0.5 0 0 0 1

240 16 4 8 4 16 5

Smallest Ratio

15

Simplex Tableau
Tableau 2
BV Row z x1 x2 x3 s1 s2 s3 s4 RHS ratio

z s1

x3
x1 s4

0 1 2 3 4

1 0 0 0 0

0 0 0

0 -2 -2

0 0 1

0 1 0

10 2 2

10 -8 -4

0 0 0 0 1

280 24 8 2 5

1 1.25 0 0 1 0

0 -0.5 1.5 0 0 0

Row 0 all non-negative Current solution is optimal

x2 is NBV but has a zero coefficient in Row 0. multiple optimal solutions


16

Simplex Tableau
Tableau 3 Another optimal tableau
BV Row z x1 x2 x3 s1 s2 s3 s4 RHS ratio

z s1

x3
x2 s4

0 1 2 3 4

1 0 0 0 0

0 1.6

0 0

0 0

0 1

10 2

10 -8

0 0

280 27.2

1.6

1
0 0

-4

0
0 1

11.2
1.6 3.4

0.8 1 -0.8 0

0 -0.5 1.5 0 0 0

17

Dakota LP Modelfor Dakota Problem Optimal Solution


Optimal point 1 is
Optimal point 2 is For all

18

Dakota LP Unbounded Model LP


max z = 36x1+ 30x2 3x3 4x4 s.t. x1 + x2 x3 5 6x1 + 5x2 x4 10 x1, x2 , x3, x4 0

19

Simplex Tableau
Tableau 2
BV Row
z x1 x2 x3 x4 s1 s2

RHS ratio

z x4

x1

0 1 2

1 0 0

0 0

2 1

-9 -6

0 1

12 6

4 -1

100 20

-1
Most -ve

Ratio test fails to indicate the row in which x3 should enter the basis Unbounded LP

20

DakotaMinimization LP Model Problem


min z = 2x1 5x2
s.t.

3x1 + 8x2 48 2x1 + 3x2 20 x1, x2 0

21

The Big M Method


Use Big M method when bfs is not readily apparent. LP has or = constraint. Description of Big M Method:

Step 1 - Modify constraints Modify the constraints so that the RHS of each constraint is non-negative. Convert each inequality constraint to standard form. If constraint i is a or = constraint, add an artificial variable ai. Also add the sign restriction ai 0.

The Big M Method


Step 2 Modify objective function

If LP is a min problem, add Mai (for each artificial variable) to the objective function. If LP is a max problem, add -Mai to the objective function. M is a very large positive number

Step 3 all artificial variables must be eliminated from row 0 before beginning the simplex.

Step 4 solve the problem by the simplex. We found the optimal solution when all artificial variables are equal to zero.

Dakota LP Model The Big M Method


min z = 2x1 + 3x2
s.t.

2 x1 + x2 16 x1 + 3x2 20 x1 + x2 = 10 x1, x2 0

24

Dakota LP Model The Big M Method


min z = 2x1 + 3x2 + Ma2 + Ma3
s.t.

2 x1 + x2 + s1 = 16 x1 + 3x2 e2 + a2 = 20 x1 + x2 + a3 = 10 x1, x2,s1,e2,a2,a3 0

25

Dakota LP Model The Big M Method Infeasible LP


min z = 2x1 + 3x2
s.t.

x1 + x2 4 x1 + 3x2 36 x1 + x2 = 10 x1, x2 0

26

Simplex Tableau
Tableau 1
BV Row
z x1 x2 s1 e2 a2 a3

RHS

z s1

a2
x2

0 1 2 3

1 1-2M 0 0 -2 1

0 0

0 1

-M 0

0 3-4M 6M+30 0 - 3/2

0
1

0
0

-1
0

1
0

-3
1

6
10

Row 0 all non positive. This is an optimal tableau BUT

a2 =6 in optimal tableau

The LP has no feasible solution (infeasible LP)

27

Dakota LP Model Simplex Method The Two-Phase


Phase 1: Minimize all artificial variables
min w = a2 + a3
s.t.

2 x1 + x2 + s1 = 16 x1 + 3x2 e2 + a2 = 20 x1 + x2 + a3 = 10 x1, x2,s1,e2,a2,a3 0

28

You might also like