You are on page 1of 35

The Simplex Method

Maximize Z  3x1  5x 2 ,
Subject to
x1 4
2 x2  12
3 x1  2 x2  18
and
x1  0, x2  0
From a geometric viewpoint
x2 x1  0 : CPF solutions
(Corner-Point Feasible)
3 x1  2 x2  18 : Corner-point infeasible
8
(4,6) solutions
6 2 x2  12
4 x1  4

2 Feasible
region x2  0
0 2 4 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 Stop
Solution? Yes

No

Iteration
x2 Z  30
( 2,6)
(0,6) 1 2 Z  36

( 4,3)
Z  27
Feasible
region
Z  12
0
(0,0) Z  0 ( 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 Augmented Form
of Model of the Model
Slack variables
Max Z  3x1  5x 2 , Max Z  3x1  5x 2 ,
s.t. x1 s.t. x x 4
4 1 3

2 x2  12 2x2  x4  12
3 x1  2 x2  18 3x1  2 x2  x5  18
and and
x1  0, x2  0 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 basic 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  3 x1  5 x2 0
(1) x1  x3 4
(2) 2 x 2  x4  12
(3) 3 x1  2 x2  x5  18

(b) Tabular Form


Basic Coefficient of: Right
x1 x2 x3 x4 x5
Variable Eq. Z Side
Z (0)
1 -3 -5 0 0 0 0
x3 (1)
0 1 0 1 0 0 4
x4 (2) 0 0 2 0 1 0 12
x5 (3)
The most negative coefficient minimum

(b) Tabular Form


Coefficient of:
x x x x x5 Right
BV Eq. Z 1 2 3 4
Side
Z (0) 1 -3 -5 0 0 0 0
x3 (1) 12
6
0 1 0 1 0 0 4
x4 (2) 2
0 0 2 0 1 0 12 18
x5 (3) 9
0 3 2 0 0 1 18 2
12
12 6 minimum
2
18
18 9
2
The most negative coefficient
(b) Tabular Form
Coefficient of: Right
Iteration BV Eq. Z x1 x2 x3 x4 x5
Side
Z (0) 1 -3 -5 0 0 0 0
x3 (1)
0 0 1 0 1 0 0 4
x4 (2)
0 0 2 0 1 0 12
x5 (3)
0 3 2 0 0 1 18
4
4 4
1
6
6 2 minimum
3
The most negative coefficient
(b) Tabular Form
Coefficient of: Right
Iteration BV Eq. Z x1 x2 x3 x4 x5
Side
Z (0) 1 5
-3 0 0 0
2 30
x3 (1)
1 0 1 0 1 0 0 4
x2 (2) 1
0 0 1 0 2 0 6
x5 (3)
0 3 0 0 -1 1 6
The optimal solution
x1  2, x2  6
None of the coefficient is negative.
(b) Tabular Form
Coefficient of: Right
Iteration BV Eq. Z x1 x2 x3 x4 x5
Side
Z (0) 1 3
0 0 0 2 1 36
x3 (1) 0 1  1
2 0 0 1 3 3 2
x2 (2) 1
0 0 1 0 2 0 6
x1 (3) 0 1 0 0  1 1
2
3 3
(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 Solutions occur if a
nonbasic variable has zero as its coefficient
at row 0 in the final tableau.
Algebraic Form
(0) Z  3 x1  2 x2 0
(1) x1  x3 4
(2) 2x2  x4  12
(3) 3 x1  2 x2  x5  18

Coefficient of: Right Solution


Eq. Z x1 x 2 x3 x4 x5 Side Optimal?
BV
Z (0) 1 -3 -2 0 0 0 0
x3 (1) 0 1 0 1 0 0 4
0 x4 (2) No
0 0 2 0 1 0 12
x5 (3)
0 3 2 0 0 1 18
Coefficient of: Right Solution
BV Eq. Z x1 x2 x3 x4 x5 Side Optimal?
Z (0) 1 0 -2 3 0 0 12
x1 (1) 0 1 0 1 0 0 4
1 x4 (2) No
0 0 2 0 1 0 12
x5 (3)
0 0 2 -3 0 1 6
Coefficient of: Right Solution
BV Eq. Z x1 x2 x3 x4 x5 Side Optimal?
Z (0) 1 0 0 0 0 1 18
x1 (1) 0 1 0 1 0 0 4
2 x4 (2) Yes
0 0 0 3 1 -1 6
x2 (3) 0 0 1  3 0
1
3
2 2
Coefficient of: Right Solution
BV Eq. Z x1 x2 x3 x4 x5 Side Optimal?
Z (0) 1 0 0 0 0 1 18
x1 (1) 0 1 0 0  13 13 2
Extra x 1 1 Yes
3 (2)
0 0 0 1 3 3 2
x2 (3) 0 0 1 0 1 0 6
2
(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


Variable Eq. Z
x1 x 2 x3 side Ratio
Z (0) 1 -3 -5 0 0
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 Artificial Problem
Max Z  3 x1  5 x2 Max Z  3 x1  5 x2  Mx5
s.t. s.t.
x1 4 x1  x3 4
2 x2  12 2x2  x4  12
3 x1  2 x2  18 3 x1  2 x2  x5  18
and and
x1  0, x2  0 x j  0, for j  1,2,3,4,5.
x3 , x4: Slack Variables
(M: a large positive x5 : Artificial Variable
number.)
Max: 3x1  5 x2  Mx5 (0)
s.t. 3x1  2 x2  x5  18 (3)

Eq (3) can be changed to


x5  18  3 x1  2 x2 (4)
Put (4) into (0), then

Max: 3x1  5 x2  M (18  3x1  2 x2 )


or Max: (3M  3) x1  (2M  5) x2  18M
or Max: Z  (3M  3) x1  (2 M  5) x2  18M
Max Z  (3M  3) x1  (2M  5) x2  18M
s.t. x1 x 3
 4 (1)
2x2  x4  12 (2)
3x1  2 x2  x5  18 (3)
Coefficient of: Right
Eq. Z x1 x 2 x3 x 4 x5
BV Side
Z (0) 1 -3M-3 -2M-5 0 0 0 -18M
x3 (1) 0 1
0 0 1 0 0 4
x4 (2)
0 3 2 0 1 0 12
x5 (3)
0 3 2 0 0 1 18
Coefficient of: Right
x1 x2 x3 x4 x5
BV Eq. Z Side
Z (0) 1 0 -2M-5 3M+3 0 0 -6M+12
x1 (1) 0 0 1
1 1 0 0 4
x4 (2) 2 0
0 0 1 0 12
x5 (3) 2 0
0 0 0 1 18
Coefficient of: Right
x1 x2 x3 x4 x5
BV Eq. Z Side
Z (0) 1 9 M  5
0 0 2 0 2 27
x1 (1) 0
2 1 0 1 0 0 4
x4 (2)
0 0 0 3 1 -1 6
x2 (3) 0 3 1
0 1 2 0 2 3
Coefficient of: Right
x1 x2 x3 x4 x5
BV Eq. Z 3 M  1 Side
Z (0) 1 0 0 0 2 27
x1 (1) 0  1 1
Extra x3 (2)
1 0 0
1
3
1
3 4
0 0 0 1  6
3 3
x2 (3) 0 0 1 0
1
2 0 3
(b) Variables with a Negative Value
   
x j  x  x , x  0, x  0
j j j j

 
Min 3 x1  5 x2 Min 3 x  3 x  5 x2
1 1
s.t. s.t.  
x1 4 x x
1 1 4
2 x2  12 2 x2  12
 
3 x1  2 x2  18 3 x  3 x  2 x2  18
1 1
 
x1 : URS , x2  0 x  0, x ,0 x2  0
1 1