04 Simplex 2
04 Simplex 2
04 Simplex 2
>0 :
ij
ij
i
a
a
b
is least.
Let b
i
be the RHS of the ith row. Let a
ij
be
the coefficient of the entering variable x
j
in
the ith row. The following minimum ratio
test decides the leaving variable:
Choose x
k
as the leaving variable where k is
given as that row index i for which the ratio
(Break the ties arbitrarily.)
The entering variable column is called the
pivot column. The leaving variable row is
called the pivot row. The coefficient in the
intersection of the two is referred to as the
pivot element. Now we apply elementary row
operations to modify the simplex tableau so
that the pivot column has 1 at the pivot
element and zero in all other places.
We say one iteration is over and the new
basic feasible solution and the new objective
function value can be read from the new
tableau. We illustrate by an example.
The elementary Row operations are as
follows:
+ We shall also change the legend of the new
pivot row only as the entering variable.
+ New pivot row = old pivot row pivot element
+ New z row = old z row (coefficient of the
entering variable in old z row * New pivot
row)
+ Any other new row = corresponding old row
(old coefficient of the entering variable in
that row * New pivot row)
Simplex tableau (Starting tableau)
Basic z x
1
x
2
s
1
s
2
s
3
Solution
z 1 -8 -9 0 0 0 0
s
1
0 2 3 1 0 0 50
s
2
0 2 6 0 1 0 80
s
3
0 3 3 0 0 1 70
+Enters
Leaves
Pivot element
Performing the elementary Row operations,
we get the new Simplex tableau below
Basic z x
1
x
2
s
1
s
2
s
3
Solution
z 1 -5 0 0 3/2 0 120
s
1
0 1 0 1 -1/2 0 10
x
2
0 1/3 1 0 1/6 0 40/3
s
3
0 2 0 0 -1/2 1 30
+ Enters
Leaves
Pivot element
Performing the elementary Row operations,
we get the new Simplex tableau below
Basic z x
1
x
2
s
1
s
2
s
3
Solution
z 1 0 0 5 -1 0 170
x
1
0 1 0 1 -1/2 0 10
x
2
0 0 1 -1/3 1/3 0 10
s
3
0 0 0 -2 1/2 1 10
+ Enters
Leaves
Pivot element
Performing the elementary Row operations,
we get the new Simplex tableau below.
Basic z x
1
x
2
s
1
s
2
s
3
Solution
z 1 0 0 5 0 0 190
x
1
0 1 0 -1 0 0 20
x
2
0 0 1 1 0 0 10/3
s
2
0 0 0 -4 1 2 20
This is optimal as all entries in z row are > 0.
Optimum value = 190 at x
1
=20, x
2
=10/3
(0,40/3)
(10,10)
(70/3,0)
(20,10/3)
Optimal at
Graphical Solution of the problem
(0,0)
Direction of
increasing z
Problem 2(a) Problem set 3.3B Page 89
Maximize
Subject to the constraints
0 , , ,
10 2 4
8 2 2
40 4 2 2
4 3 2 1
4 3 2 1
4 3 2 1
4 3 2 1
>
s +
s + +
s + +
x x x x
x x x x
x x x x
x x x x
Example Consider the LPP
1 2 3 4
2 3 5 z x x x x = + +
Introducing slack variables, the LPP becomes
Maximize
Subject to the constraints
0 , , , , , ,
10 2 4
8 2 2
40 4 2 2
3 2 1 4 3 2 1
3 4 3 2 1
2 4 3 2 1
1 4 3 2 1
>
= + +
= + + +
= + + +
s s s x x x x
s x x x x
s x x x x
s x x x x
1 2 3 4 1 2 3
2 3 5 0 0 0 z x x x x s s s = + + + + +
Basic z x1 x2 x3 x4 s1 s2 s3 Sol.
z 1 -2 -1 3 -5 0 0 0 0
s1 0 1 2 -2 4 1 0 0 40
s2 0 2 -1 1 2 0 1 0 8
s3 0 4 -2 1 -1 0 0 1 10
2
x4 0 1 -1/2 1/2 1 0 1/2 0 4
z 1 3 -7/2 11/2 0 0 5/2 0 20
s1 0 -3 4 -4 0 1 -2 0 24
s3 0 5 -5/2 3/2 0 0 1/2 1 14
4
x2 0 -3/4 1 -1 0 1/4 -1/2 0 6
z 1 3/8 0 2 0 7/8 3/4 0 41
x4 0 5/8 0 0 1 1/8 1/4 0 7
s3 0 25/8 0 -1 0 5/8 -3/4 1 29
The last tableau is the optimal tableau as all
entries in the objective function row are 0
and the LPP is a maximization problem.
Optimal Solution is
x
1
= 0, x
2
= 6, x
3
= 0, x
4
= 7
And the Optimal z (= Maximum z)
= 41
Solve the following LPP:
Maximize
3 2 1
4 2 x x x z + + =
Subject to the constraints
0 , ,
7 2 2
8 4
10 5 3
3 2 1
3 1
3 2 1
3 2 1
>
s +
s + +
s + +
x x x
x x
x x x
x x x
Introducing slack variables, the LPP becomes
Maximize
Subject to the constraints
1 2 3 1
1 2 3 2
1 3 3
1 2 3 1 2 3
3 5 10
4 8
2 2 7
, , , , , 0
x x x s
x x x s
x x s
x x x s s s
+ + + =
+ + + =
+ + =
>
1 2 3 1 2 3
2 4 0 0 0 z x x x s s s = + + + + +
Basic z x1 x2 x3 s1 s2 s3 Sol.
z 1 -1 -2 -4 0 0 0 0
s1 0 3 1 5 1 0 0 10
s2 0 1 4 1 0 1 0 8
s3 0 2 0 2 0 0 1 7
s2 0 2/5 19/5 0 -1/5 1 0 6
z 1 7/5 -6/5 0 4/5 0 0 8
x3 0 3/5 1/5 1 1/5 0 0 2
s3 0 4/5 -2/5 0 -2/5 0 1 3
x3 0 11/19 0 1 4/19 -1/19 0 32/19
z 1 29/19 0 0 14/19 6/19 0 188/19
x2 0 2/19 1 0 -1/19 5/19 0 30/19
s3 0 16/19 0 0 -8/19 2/19 1 69/19
The last tableau is the optimal tableau as all
entries in the objective function row are 0
and the LPP is a maximization problem.
Optimal Solution is
x
1
= 0, x
2
= 30/19, x
3
= 32/19
And the Optimal z (= Maximum z)
= 188/19
Exceptional cases Identified from the
Simplex tableau
* Tie for leaving variable - Degeneracy
If in a Simplex iteration, there is a tie for
leaving variable, then the resulting BFS will
be degenerate, in the sense that one of the
basic variables will also be zero. This may
result in getting a new BFS without
improving z. And in some cases this may
lead to cycling.
* Multiple (Alternative) Optimal Solutions
Suppose in the optimal tableau, some
nonbasic variable has zero coefficient in the
objective function row. Then that variable
can become basic and we would get another
BFS. Since the coefficient of the entering
variable in the objective function row. The
objective function does not improve. Hence
the new BFS we get is an alternative
Optimal Solution. Usually you are
supposed to give all Optimal Solutions.
* No leaving variable unbounded Solution
Suppose in a Simplex iteration, some
variable can enter but no variable can leave.
This will happen when all the entries in the
entering variable column are either zero or
negative, This means the entering variable
(which is right now having the zero value)
can be increased indefinitely without
violating any of the constraints and thus z
can be increased indefinitely or the problem
has unbounded solution.
Problem 5 Problem Set 2.5A Page 61
Shale Oil, located on the island of Aruba, has a
capacity of 600,000 barrels of crude oil per day.
The final products from the refinery include two
types of unleaded gasoline: regular and premium.
The refining process encompasses three stages: (1)
a distillation tower that produces feedstock, (2) a
cracker unit that produces gasoline stock by using
a portion of the feedstock produced from the
distillation tower, and (3) a blender unit that
blends the gasoline stock from the cracker unit and
the feedstock from the distillation tower. Both
Both regular and premium gasoline can be
blended from either the the feedstock or the
gasoline stock at different production costs. The
company estimates that the net profit per barrel of
regular gasoline is $7.70 and $5.20, depending on
whether it is blended from feedstock or from
gasoline stock. The corresponding profit values
for the premium grade are $10.40 and $12.30.
Design specifications require 5 barrels of crude oil
to produce 1 barrel of feedstock. The capacity of the
cracker unit is 40,000 barrels of feedstock a day. All
remaining feedstock is directly used in the blender
unit to produce end-product gasoline. The demand
The demand limits for regular and premium
gasoline are 80,000 and 50,000 barrels per day.
Develop a model for determining the optimum
production schedule for the refinery.
Distillation
Tower
Cracker
Unit
Blender Unit
Let x
1
units from feedstock be used to blend
(=make) regular gasoline
Let x
2
units from feedstock be used to blend
(=make) premium gasoline
Let x
3
units from gasoline stock be used to
blend (=make) regular gasoline
Let x
4
units from gasoline stock be used to
blend (=make) premium gasoline
Thus we have to maximize the profit
1 2 3 4
7.70 10.40 5.20 12.30 z x x x x = + + +
Subject to the constraints
1 2 3 4
120, 000 x x x x + + + s
3 4
40, 000 x x + s
1 3
80, 000 x x + s
2 4
50, 000 x x + s
1 2 3 4
, , , 0 x x x x >
Optimum Solution
1
2
3
4
70, 000
10, 000
0
40, 000
x
x
x
x
=
=
=
=
Maximum z = 1135000