Sei sulla pagina 1di 27

Simplex Method

Introduction
For linear programming problems involving two
variables, the graphical solution method is convenient.
However, for problems involving more than two
variables or problems involving a large number of
constraints, it is better to use solution methods that
are adaptable to computers.
One such method is called the simplex method,
developed by George Dantzig in 1946.
It provides a systematic way of examining the vertices
of the feasible region to determine the optimal value
of the objective function.


The Linear Programming Problem
Given to you
Maximize: Z = 7X1 + 8X2 + 10X3
Subject to constraint:
2X1 + 3X2 + 2X3

1000
X1 + X2 + 2X3 800

and the variables types/Sign Restrictions
X1 , X2 , X3 0
Slack Variables
The first step in setting up the simplex method is to convert the
functional inequality constraints to equivalent equality constraints.
This conversion is accomplished by introducing slack variables.
Example
2X1 + 3X2 + 2X3

1000
The slack variable for this constraint is defined to be
S1 = 1000 - 2X1 - 3X2 - 2X3


which is the amount of slack in the left-hand side of the inequality.
Thus,
2X1 + 3X2 + 2X3

+ S1 = 1000

Given this equation, 2X1 + 3X2 + 2X3

1000 if and only if
1000 - 2X1 - 3X2 - 2X3

= S1 0. Therefore, the original
constraint 2X1 + 3X2 + 2X3

1000 is entirely equivalent to
the pair of constraints
2X1 + 3X2 + 2X3

+ S1 = 1000 and S1 0
The Initial System
Upon the introduction of slack variables for the other functional constraints, the
original linear programming model for the example (shown below on the left) can
now be replaced by the equivalent model (called the augmented form of the
model)

Maximize: Z = 7X1 + 8X2 + 10X3
Subject to constraint:
2X1 + 3X2 + 2X3

+ S1 = 1000
X1 + X2 + 2X3 + S2 = 800

and the variables types/Sign Restrictions
X1 , X2 , X3 , S1 , S2 0

Although both forms of the model represent exactly the same problem, the new
form is much more convenient for algebraic manipulation and for identification of
CPF solutions (corner-point feasible solutions).
We call this the augmented form of the problem because the original form has
been augmented by some supplementary variables needed to apply the simplex
method.
The Initial Tableau
Tableaus are fancy names for matrices. What
we do now is convert the system of linear
equations into matrices by moving all of the
variables to the left hand side, so the
objective function becomes
-7X1 - 8X2 - 10X3 + Z = 0
We also put the objective function last in the
tableau and put an augmentation line above it
to separate it from the constraints.
Algebraic Form
Maximize: Z - 7X1 - 8X2 - 10X3 = 0
Subject to:
2X1 + 3X2 + 2X3

+ S1 = 1000
X1 + X2 + 2X3 + S2 = 800
where
X1 , X2 , X3 , S1 , S2 0

Tabular Form

X1 X2 X3 S1 S2 Z Right
side
2 3 2 1 0 0 1000
1 1 2 0 1 0 800
-7 -8 -10 0 0 1 0
----(0)
----(1)
----(2)
Basic and Non-Basic Variables
There will be a basic variable for each row of the tableau and the objective
function is always basic in the bottom row.
Each variable corresponds to a column in the tableau. If the column is cleared
out and has only one non-zero element in it, then that variable is a basic
variable. If a column is not cleared out and has more than one non-zero
element in it, that variable is non-basic and the value of that variable is zero.
The values of all non-basic variables (columns with more than one number in
them) are zero. In this tableau, that would be x
1
, x
2
and x
3
.
The values of the basic variables are found by reading the solution from the
matrix that results by deleting out the non-basic columns.

Z S1 S2 Right
side
0 1 0 1000
0 0 1 800
1 0 0 0
S1 = 1000
S2 = 800
Z = 0
basic variables
Finding Maximization
1
st
Iteration Pivet Operation





Finding Pivet Column
Look at the bottom find the most negative number.
The most negative number is -10 and the column will
became pivet column.

X1 X2 X3 S1 S2 Z Right
side
S1 2 3 2 1 0 0 1000
S2 1 1 2 0 1 0 800
-7 -8 -10 0 0 1 0









Finding Pivet Number/Element
Look at the above list and find out which one is the pivet number.
Each row for right side value must be divided with their same row value in pivet column.
Find the most less answer. The row with the smallest answer will be selected
as pivet number in pivet column.
Change S2 to X3

X1 X2 X3 S1 S2 Z Right
side
S1 2 3 2 1 0 0 1000
X3 1 1 2 0 1 0 800
-7 -8 -10 0 0 1 0
Finding Maximization (continue)
1000 / 2 = 500
800 / 2 = 400
The smallest anwser
The
pivet
number/
element






Row Operation making pivet number change to 1
Using Mathematical operation change Pivet Number/Element into 1 in
Row 2 (R2)
R2 -> R2
Change also all value in the same row pivet element using the same
mathematical operation.
X1 in R2 = (1) X2 in R2 = (1) X3 in R2 = (2) S1 in R2 = (0)
S2 in R2 = (1) Z in R2 = (0) Right side in R2 = (800)
X1 X2 X3 S1 S2 Z Right
side
S1 2 3 2 1 0 0 1000
X3 1 1 2 0 1 0 800
-7 -8 -10 0 0 1 0
Finding Maximization (continue)
The
pivet
number/
element
X1 X2 X3 S1 S2 Z Right side
S1 2 3 2 1 0 0 1000
X3 1/2 1/2 1 0 1/2 0 400
-7 -8 -10 0 0 1 0






Row Operation making everything above and below than pivet
number/element into 0
Using Mathematical operation change value Row 1 (R1) and Row 3 (R3) in
Pivet Column into 0
-2 R2 + R1 -> R1
10 R2 + R3 -> R3
Change also all value in the same using the same mathematical operation.
X1 X2 X3 S1 S2 Z Right
side
S1 2 3 2 1 0 0 1000
X3 1/2 1/2 1 0 1/2 0 400
-7 -8 -10 0 0 1 0
Finding Maximization (continue)
The
pivet
number/
element
X1 X2 X3 S1 S2 Z Right side
S1 1 2 0 1 -1 0 200
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000




Look at the bottom if there are any negative
number left then had to perform pivet
operation again for next iteration.
X1 X2 X3 S1 S2 Z Right
side
S1 1 2 0 1 -1 0 200
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000
Finding Maximization (continue)
Finding Maximization
2
nd
Iteration Pivet Operation





Finding Pivet Column
Look at the bottom find the most negative number.
The most negative number is -3 and the column will
became pivet column.

X1 X2 X3 S1 S2 Z Right
side
S1 1 2 0 1 -1 0 200
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000









Finding Pivet Number/Element
Look at the above list and find out which one is the pivet number.
Each row for right side value must be divided with their same row value in pivet column.
Find the most less answer. The row with the smallest answer will be selected
as pivet number in pivet column.
Change S1 to X2

X1 X2 X3 S1 S2 Z Right
side
X2 1 2 0 1 -1 0 200
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000
Finding Maximization (continue)
200 / 2 = 100
400 /(1/2)= 800
The smallest anwser
The
pivet
number/
element






Row Operation making pivet number change to 1
Using Mathematical operation change Pivet Number/Element into 1 in
Row 1 (R1)
R1 -> R1
Change also all value in the same row pivet element using the same
mathematical operation.
X1 in R1 = (1) X2 in R1 = (2) X3 in R1 = (0) S1 in R1 = (-1)
S2 in R1 = (0) Z in R1 = (0) Right side in R1 = (200)
X1 X2 X3 S1 S2 Z Right
side
X2 1 2 0 1 -1 0 200
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000
Finding Maximization (continue)
The
pivet
number/
element
X1 X2 X3 S1 S2 Z Right side
X2 1/2 1 0 1/2 -1/2 0 100
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000






Row Operation making everything above and below than pivet
number/element into 0
Using Mathematical operation change value Row 2 (R2) and Row 3 (R3) in
Pivet Column into 0
-1/2 R1 + R2 -> R2
3 R1 + R3 -> R3
Change also all value in the same using the same mathematical operation.
X1 X2 X3 S1 S2 Z Right
side
X2 1/2 1 0 1/2 -1/2 0 100
X3 1/2 1/2 1 0 1/2 0 400
-2 -3 0 0 5 1 4000
Finding Maximization (continue)
The
pivet
number/
element
X1 X2 X3 S1 S2 Z Right side
X2 1/2 1 0 1/2 -1/2 0 100
X3 1/4 0 1 -1/4 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300




Look at the bottom if there are any negative
number left then had to perform pivet
operation again for next iteration.
X1 X2 X3 S1 S2 Z Right
side
X2 1/2 1 0 1/2 -1/2 0 100
X3 1/4 0 1 -1/2 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300
Finding Maximization (continue)
Finding Maximization
3
rd
Iteration Pivet Operation





Finding Pivet Column
Look at the bottom find the most negative number.
The most negative number is -1/2 and the column will
became pivet column.

X1 X2 X3 S1 S2 Z Right
side
X2 1/2 1 0 1/2 -1/2 0 100
X3 1/4 0 1 -1/2 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300









Finding Pivet Number/Element
Look at the above list and find out which one is the pivet number.
Each row for right side value must be divided with their same row value in pivet column.
Find the most less answer. The row with the smallest answer will be selected
as pivet number in pivet column.
Change X2 to X1

X1 X2 X3 S1 S2 Z Right
side
X1 1/2 1 0 1/2 -1/2 0 100
X3 1/4 0 1 -1/2 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300
Finding Maximization (continue)
100 / (1/2) = 500
350 /(1/4)= 1400
The smallest anwser
The
pivet
number/
element






Row Operation making pivet number change to 1
Using Mathematical operation change Pivet Number/Element into 1 in Row
1 (R1)
2 R1 -> R1
Change also all value in the same row pivet element using the same
mathematical operation.
X1 in R1 = 2 (1/2) X2 in R1 = 2 (1) X3 in R1 = 2 (0) S1 in R1 = 2 (1/2)
S2 in R1 = 2 (-1/2) Z in R1 = 2 (0) Right side in R1 = 2 (100)
X1 X2 X3 S1 S2 Z Right
side
X1 1/2 1 0 1/2 -1/2 0 100
X3 1/4 0 1 -1/2 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300
Finding Maximization (continue)
The
pivet
number/
element
X1 X2 X3 S1 S2 Z Right side
X1 1 2 0 1 -1 0 200
X3 1/4 0 1 -1/2 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300






Row Operation making everything above and below than pivet
number/element into 0
Using Mathematical operation change value Row 2 (R2) and Row 3 (R3) in
Pivet Column into 0
-1/4 R1 + R2 -> R2
1/2 R1 + R3 -> R3
Change also all value in the same using the same mathematical operation.
X1 X2 X3 S1 S2 Z Right
side
X1 1 2 0 1 -1 0 200
X3 1/4 0 1 -1/4 3/4 0 350
-1/2 0 0 3/2 7/2 1 4300
Finding Maximization (continue)
The
pivet
number/
element
X1 X2 X3 S1 S2 Z Right side
X1 1 2 0 1 -1 0 200
X3 0 -1/2 1 -1/2 1 0 300
0 1 0 2 3 1 4400




Look at the bottom if there are any negative
number left then had to perform pivet
operation again for next iteration.
The result shown there no negative number at
the bottom stop iteration.
Interpreting the result.
X1 X2 X3 S1 S2 Z Right
side
X1 1 2 0 1 -1 0 200
X3 0 -1/2 1 -1/2 1 0 300
0 1 0 2 3 1 4400
Finding Maximization (continue)
RESULT
Maximize: Z = 7X1 + 8X2 + 10X3
Subject to constraint:
Fabrication 2X1 + 3X2 + 2X3

+ S1 = 1000
Assembly X1 + X2 + 2X3 + S2 = 800

and the variables types/Sign Restrictions
X1 , X2 , X3 , S1 , S2 0









Will get Maximum Profit when X1 achieve 200 and X3 achieve 300
Max Profit is at the corner bottom value 4400
Set other variable X2 , S1 and S2 to 0
X1 X2 X3 S1 S2 Z Right
side
X1 1 2 0 1 -1 0 200
X3 0 -1/2 1 -1/2 1 0 300
0 1 0 2 3 1 4400
Finding Maximization (continue)
RESULT
Maximize: Z = 7X1 + 8X2 + 10X3
Subject to constraint:
Fabrication 2X1 + 3X2 + 2X3

+ S1 = 1000
Assembly X1 + X2 + 2X3 + S2 = 800

and the variables types/Sign Restrictions
X1 , X2 , X3 , S1 , S2 0








Solution: Maximum when X1 = 200 , X3 = 300, X2 = 0, S1 = 0 and S2 = 0
Max Profit of $ 4400
where
zero hours of slack time for Fabrication and Assembly meaning that you
use all available hours for Fabrication and Assembly .

X1 X2 X3 S1 S2 Z Right
side
X1 1 2 0 1 -1 0 200
X3 0 -1/2 1 -1/2 1 0 300
0 1 0 2 3 1 4400
Finding Maximization (continue)
The simplex method is an iterative algorithm (a systematic solution
procedure that keeps repeating a fixed series of steps, called an iteration,
until a desired result has been obtained) with the following structure.
Initialization:
Set up to start iterations, including finding an initial CPF
solution.
Optimality test:
Is the current CPF solution optimal?
If no If yes Stop.

Iteration:
Perform an iteration to find a better CPF solution.

When the example was solved, note how this flow diagram was followed
through two iterations until an optimal solution was found.
Exercise

Potrebbero piacerti anche