Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
222 views

Simplex Algorithm

The simplex method is an algorithm for solving linear programming problems. It examines the corner points of the feasible region in a systematic way to find an optimal solution. The initial simplex tableau sets up the linear programming problem by introducing slack variables to convert inequality constraints to equations. It assumes all slack variables are in the initial basic feasible solution with positive values. The tableau tracks substitution rates and profits to iteratively improve the solution until an optimal corner point is reached.

Uploaded by

Ebsa Ademe
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
222 views

Simplex Algorithm

The simplex method is an algorithm for solving linear programming problems. It examines the corner points of the feasible region in a systematic way to find an optimal solution. The initial simplex tableau sets up the linear programming problem by introducing slack variables to convert inequality constraints to equations. It assumes all slack variables are in the initial basic feasible solution with positive values. The tableau tracks substitution rates and profits to iteratively improve the solution until an optimal corner point is reached.

Uploaded by

Ebsa Ademe
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56

Simplex Algorithm

1
Linear Programming: The Simplex Method

 With only two decision variables it is possible to use


graphical methods to solve LP problems
 But most real life LP problems are too complex for simple
graphical procedures
 We need a more powerful procedure called the simplex
method
 The simplex method examines the corner points in a
systematic fashion using basic algebraic concepts
− It does this in an iterative manner until an optimal
solution is found
 Each iteration moves us closer to the optimal solution

2
How To Set Up The Initial Simplex Solution

 Let’s look at the Firew Furniture Company from the


previous example
 This time we’ll use the simplex method to solve
the problem
 You may recall

X = number of tables produced


Y = number of chairs produced
and
Maximize profit = $70X + $50Y (objective function)
subject to 2X + 1Y ≤ 100 (painting hours constraint)
4X + 3Y ≤ 240 (carpentry hours constraint)
X, Y ≥ 0 (non-negativity constraint)

3
Cont.
 The inequality constraints must be converted into equations
 Less-than-or-equal-to constraints (≤) are converted to
equations by adding a slack variable to each
− Slack variables represent unused resources
 For the Firew Furniture problem, the slacks are:
S1 = slack representing unused hours in the painting department
S2 = slack representing unused hours in the carpentry department
 The constraints may now be written as
2X + 1Y + S1 = 100
4X + 3Y + S2 = 240
 Each slack variable must appear in every constraint equation

4
Cont.
 Slack variables not actually needed for an equation have a
coefficient of 0.
2X + 1Y + 1S1 + 0S2 = 100
4X + 3Y + 0S1 + 1S2 = 240
X, Y, S1, S2 ≥ 0
 As unused hours result in no profit, the slack variables can
be included in the objective function with zero coefficients:
 The objective function becomes:
Maximize profit = $70X + $50Y + $0S1 + $0S2
 The simplex method starts with an initial feasible solution
where all real variables are set to 0.
 Starting from this point, the simplex method will move to the
corner point that yields the most improved profit
− It repeats the process until it can further improve
the solution
5
The First Simplex Tableau
 The first tableau is called a simplex tableau

ix

s
s

le
t

m
ni

le

b
n s i ab
n ru

n on

ns ria

n t
m e

m ti

m n
m a
m r
lu it p

lu l va
l u uc

lu k v

lu sta
co od

co lac
co rof

co on
co ea
Pr

C
R
P

S
Cj SOLUTION $70 $50 $0 $0 Profit per
QUANTITY unit row
MIX X Y S1 S2
$0 S1 2 1 1 0 100 Constraint
equation rows
$0 S2 4 3 0 1 240
Gross
Zj $0 $0 $0 $0 $0 profit row
Cj - Zj $70 $50 $0 $0 $0
Net profit row

6
Cont.
 The numbers in the first row represent the coefficients in the first
constraint and the numbers in the second row the 2nd constraint.
 At the initial solution, X = 0 and Y = 0, so S1 = 100 and S2 = 240
 The initial solution assumes that all available hours are unused.
 The two slack variables are the initial solution mix
− The values are found in the QUANTITY column
 The initial solution is a basic feasible solution
X 0 The slack variables take the
Y 0 largest possible values.
S1 = 100
S2 240
 Variables in the solution mix are called basic variables. Each basic
variables has a column consisting of all 0’s except for a single 1.
 Variables not in the solution mix or basis (value of 0) are called
non-basic variables
7
Cont.
 Substitution rates
− The numbers in the body of the tableau are the coefficients of
the constraint equations.
− These can also be thought of as substitution rates
− Using the variable X as an example, if Firew were to produce 1
table (X = 1), 2 units of S1 and 4 units of S2 would have to be
removed from the solution.
− Similarly, the substitution rates for Y are 1 unit of S1 and 3
units of S2
− Also, for a variable to appear in the solution mix, it must have
a 1 someplace in its column and 0s in every other place in that
column.

8
Cont.
 Adding the objective function
− We add a row to the tableau to reflect the objective function
values for each variable
− These contribution rates are called Cj and appear just above
each respective variable
− In the leftmost column, Cj indicates the unit profit for each
variable currently in the solution mix.
Cj $70 $50 $0 $0
SOLUTION QUANTITY
MIX X Y S1 S2
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240

 The Zj and Cj – Zj rows


− We can complete the initial tableau by adding two final rows
9
Cont.
 These rows provide important economic information including
total profit and whether the current solution is optimal.
 We compute the Zj value by multiplying the contribution value of
each number in a column by each number in that row and the jth
column, and summing.
 The Zj value for the quantity column provides the total
contribution of the given solution.
Zj (gross profit) = (Profit per unit of S1)  (Number of units of S1)
+ (profit per unit of S2)  (Number of units of S2)
= $0  100 units + $0  240 units
= $0 profit

 The Zj values in the other columns represent the gross profit given
up Zj =adding
by (Profitone
per unit
unit of
of this
S1) variable
(Substitution rate
into the in rowsolution.
current 1)
+ (profit per unit of S2)  (Substitution rate in row 2)

10
Cont.
 Thus,
Zj (for column X) = ($0)(2) + ($0)(4) = $0
Zj (for column Y) = ($0)(1) + ($0)(3) = $0
Zj (for column S1) = ($0)(1) + ($0)(0) = $0
Zj (for column S2) = ($0)(0) + ($0)(1) = $0
 We can see that no profit is lost by adding one unit of either
X (tables), Y (chairs), S1, or S2
 The Cj – Zj number in each column represents the net profit
that will result from introducing 1 unit of each product or
variable into the solution.
 It is computed by subtracting the Zj total for each column
from the Cj value at the very top of that variable’s column.

11
Cont.
COLUMN
X Y S1 S2
Cj for column $70 $50
$0 $0
Zj for column 0 0
0 0
Cj – Zj for column $70 $50
$0 $0
 Obviously with a profit of $0, the initial solution is not optimal
 By examining the numbers in the Cj – Zj row in Table, we can
see that the total profits can be increased by $70 for each
unit of X and $50 for each unit of Y.
 A negative number in the number in the Cj – Zj row would tell
us that the profits would decrease if the corresponding
variable were added to the solution mix.
− An optimal solution is reached when all the numbers in
the Cj – Zj row are 0 or negative (no positive numbers).
12
Five Steps of the Simplex Method for
Maximization Problems
1. Determine the variable to enter the solution mix next. One
way of doing this is by identifying the column, and hence the
variable, with the largest positive number in the Cj - Zj row of
the preceding tableau.
− The column identified in this step is called the pivot
column.
2. Determine which variable to replace. This is done by dividing
the quantity column by the corresponding number in the
column selected in step 1.
− The row with the smallest nonnegative number calculated in
this fashion will be replaced in the next tableau.
− This row is often referred to as the pivot row.
− The number at the intersection of the pivot row and pivot
column is the pivot number.
13
Cont.
3. Compute new values for the pivot row. To do this, we simply
divide every number in the pivot row by the pivot number.
4. Compute the new values for each remaining row. All
remaining rows are calculated as follows:
(New row numbers) = (Numbers in old row)
Number above Corresponding number in
– or below x the new row, that is, the
pivot number row replaced in step 3

5. Compute the Zj and Cj - Zj rows, as demonstrated in the initial


tableau.
− If all the numbers in the Cj - Zj row are 0 or negative, an
optimal solution has been reached. If this is not the case,
return to step 1.
 We can now apply these steps to the Firew Furniture problem:
14
The Second Simplex Tableau
Step 1. Select the variable with the largest positive Cj - Zj value to enter
the solution next. In this E.g, variable X with a contribution value of
$70.
Cj $70 $50 $0 $0
SOLUTION QUANTITY
MIX X Y S1 S2 (RHS)
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240
Zj $0 $0 $0 $0 $0
Cj - Z j $70 $50 $0 $0
Total profit
Pivot column

Step 2. Select the variable to be replaced. Either S1 or S2 will have to leave to


make room for X in the basis. The following ratios need to be calculated.
For the S1 row
100(hours of painting time available)
 50 tables
2(hours required per table)

15
Cont.
For the S2 row
240(hours of carpentry time available)
 60 tables
4(hours required per table)
We choose the smaller ratio (50) and this determines the S1
variable is to be replaced(Leaving Variable).
Cj $70 $50 $0 $0
SOLUTION QUANTITY
MIX X Y S1 S2 (RHS)
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240
Pivot number Pivot row
Zj $0 $0 $0 $0 $0
Cj - Zj $70 $50 $0 $0
Pivot column

16
Cont.
Step 3. We can now begin to develop the second, improved simplex
tableau. We have to compute a replacement for the pivot row.
This is done by dividing every number in the pivot row by the
pivot number. The new version of the pivot row is below.

2 1 1*
0 100
1  0.5  0 .5 0  50
2 2 2 2 2

Cj SOLUTION MIX X Y S1 S2 QUANTITY

$70 X 1 0.5 0.5 0 50

17
Cont.
Step 4. Completing the rest of the tableau, the S2 row, is slightly more
complicated. The right of the following expression is used to
find the left side.
Number in
Number in Number Corresponding
= – Below Pivot  Number in the New X
New S2 Row Old S2 Number Row
Row
0 = 4 – (4)  (1)
1 = 3 – (4)  (0.5)
–2 = 0 – (4)  (0.5)
1 = 1 – (4)  (0)
40 = 240 – (4)  (50)

Cj SOLUTION MIX X Y S1 S2 QUANTITY


$70 X 1 0.5 0.5 0 50
$0 S2 0 1 –2 1 40

18
Cont.
The X column contains 1 and the S2 column
0
contains 0 , necessary conditions for variables to be in the solution.
1
The manipulations of steps 3 and 4 were designed to produce 0s and 1s in
the appropriate positions.
Step 5. The final step of the second iteration is to introduce the effect
of the objective function. This involves computing the Cj - Zj
rows. The Zj for the quantity row gives us the gross profit and the
other Zj represent the gross profit given up by adding one unit of
each variable into the solution.
Zj (for X column) = ($70)(1) + ($0)(0) = $70
Zj (for Y column) = ($70)(0.5) + ($0)(1) = $35
Zj (for S1 column) = ($70)(0.5) + ($0)(–2) = $35
Zj (for S2 column) = ($70)(0) + ($0)(1) = $0
Zj (for total profit) = ($70)(50) + ($0)(40) = $3,500
19
Cont.
COLUMN
X Y S1 S2
Cj for column $70 $50
$0 $0
Zj for column $70 $35
$35 $0
Cj – Zj for column $0 $15 –
 Completed second simplex tableau $35 $0

Cj $70 $50 $0 $0
SOLUTION QUANTITY
MIX X Y S1 S2 (RHS)
$70 X 1 0.5 0.5 0 50
$0 S2 0 1 –2 1 40
Zj $70 $35 $35 $0 $3,500
Cj - Zj $0 $15 –$35 $0

20
Interpreting the Second Tableau
 Current solution
− The solution point of 50 tables and 0 chairs
(X = 50, Y = 0) generates a profit of $3,500.
− X is a basic variable and Y is a non-basic variable.
 Resource information
− Slack variable S2 is the unused time in the carpentry
department and is in the basis. Its value implies there
is 40 hours of unused carpentry time remaining.
− Slack variable S1 is non-basic and has a value of 0
meaning there is no slack time in the painting
department.
 Since the previous tableau is not optimal(since positive number
exist), we repeat the five simplex steps.

21
Developing the Third Tableau

Step 1. Variable Y will enter the solution as its Cj - Zj value of 15


is the largest positive value. The Y column is the new
pivot column.
Step 2. Identify the pivot row by dividing the number in the
quantity column by its corresponding substitution rate in
the Y column.
50
For the T
X row :  100 chairs
0 .5

40
For the S2 row :  40 chairs
1
The S2 row has the smallest ratio so S2 will leave the basis
and will be replaced by Y.

22
Cont.
Cj $70 $50 $0 $0
SOLUTION MIX X Y S1 S2 QUANTITY
$70 X 1 0.5 0.5 0 50
$0 S2 0 1 –2 1 40
Pivot number Pivot row
Zj $70 $35 $35 $0 $3,500
Cj - Zj $0 $15 –$35 $0
Pivot column

Step 3. The pivot row is replaced by dividing every number in it by


the pivot point number.
0 1 2 1 40
0 1  2 1  40
1 1 1 1 1
The new Y row is: SOLUTION MIX X Y QUANTITY
Cj S1 S2

$50 Y 0 1 –2 1 40

23
Cont.
Step 4. The new values for the X row may now be computed
Number in
Number in Number above Corresponding
= –
new X row old X row pivot number  number in new Y row

1 = 1 – (0.5)  (0)
0 = 0.5 – (0.5)  (1)
1.5 = 0.5 – (0.5)  (–2)
–0.5 = 0 – (0.5)  (1)
30 = 50 – (0.5)  (40)

SOLUTION X Y QUANTITY
Cj MIX S1 S2
$70 X 1 0 1.5 –0.5 30
$50 Y 0 1 –2 1 40

24
Cont.
Step 5. The Zj and Cj - Zj rows can now be calculated
Zj (for X column) = ($70)(1) + ($50)(0) = $70
Zj (for Y column) = ($70)(0) + ($50)(1) = $50
Zj (for S1 column) = ($70)(1.5) + ($50)(–2) = $5
Zj (for S2 column) = ($70)(–0.5) + ($50)(1) = $15
Zj (for total profit) = ($70)(30) + ($50)(40) = $4,100
And the net profit per unit row is now
COLUMN
X Y S1 S2
Cj for column $70 $50
$0 $0
Zj for column $70 $50
$5 $15
Cj – Zj for column $0 $0 – –
$5 $15
25
Cont.
 Note that every number in the Cj - Zj row is 0 or negative
indicating an optimal solution has been reached. The optimal
solution is: X = 30 tables
Y = 40 chairs
S1 = 0 slack hours in the painting department
S2 = 0 slack hours in the carpentry department
Profit = $4,100 for the optimal solution
 The final simplex tableau for the Firew Furniture
Cj $70 $50 $0 $0
SOLUTION
MIX X Y S1 S2 QUANTITY
$70 X 1 0 1.5 –0.5 30
$50 Y 0 1 –2 1 40
Zj $70 $50 $5 $15 $4,100
Cj - Zj $0 $0 –$5 –$15

26
Solving Minimization Problems Example

 Standard Form of a Minimization Model


 Consider the previous example of linear programming model for a
farmer purchasing fertilizer on Slide pp. 27 of Chapter 3:

Minimize cost(Z) = $6X1+ $3X2


subject to 2X1 + 4X2 ≥ 16 lb. of nitrogen
4X1 + 3X2 ≥ 24 lb. of phosphate
X1, X2 ≥ 0
Where
X1 = bags of Super-gro fertilizer
X2 = bags of Crop-quick fertilizer
Z = farmer’s total cost of purchasing fertilizer

27
Example: Cont’d…
 Surplus variables
− Greater-than-or-equal-to (≥) constraints require a different
approach than the less-than-or-equal-to (≤) constraints.
− They involve the subtraction of a surplus variable rather than
the addition of a slack variable.
− The surplus variable tells us how much the solution exceeds
the constraint amount. This is sometimes called negative slack.
 To convert the first constraint we subtract a surplus variable, S1,
to create an equality.
 Constraint 1 Re-written: 2X1 + 4X2 – S1 = 16
 Artificial variables
− If a surplus variable is added by itself, it would have a negative
value in the initial tableau where all real variables are set to zero.
2(0) + 4(0) – S1 = 16
S1 = – 16
 But all variables in LP problems must be nonnegative at all times.
28
Example: Cont’d…

 To resolve this we add in another variable called an artificial


variable
 Constraint 1 Completed: 2X1 + 4X2 – S1 + A1 = 16
 Now X1, X2, and S1 can all be 0 in the initial solution and A1 will
equal 16.
 When a problem has many constraint equations with many
variables, it is not possible to “eyeball” an initial solution.
 Using artificial variables allows us to use the automatic initial
solution of setting all the other variables to 0.
 Unlike slack or surplus variables, artificial variables have no
meaning in the problem formulation. They are strictly a
computational tool, they will be gone in the final solution.

29
Example: Cont’d…
 Surplus and artificial variables in the objective function
− Both types of variables must be included in the objective
function
− Surplus variables, like slack variables, carry a $0 cost coefficient
− Since artificial variables must be forced out of the solution, we
assign an arbitrarily high cost.
− By convention we use the coefficient M which simply represents
a very large number.
 And the constraint equations we saw before would appear as:

Minimize cost = $6X1 +$3X2 + $0S1 + $0S2 +$MA1 +$MA2

subject to 2X1 + 4X2 – S1 + A1 = 16

4X1 + 3X2 – S2 +A2 = 24

X1, X2, S1, S2, A1, A2 ≥ 0


30
Rules of the Simplex Method for
Minimization Problems
 Minimization problems are quite similar to the maximization
problems tackled earlier.
 The significant difference is the Cj - Zj row
− We will now choose the variable with the negative Cj - Zj
that gives the largest improvement
− We select the variable that decreases costs the most
 In minimization problems, an optimal solution is reached
when all the numbers in the Cj - Zj are 0 or positive
 All other steps in the simplex method remain the same.

31
Procedures for Solving LP
Minimization Problems
I. Formulate the LP problem’s objective function and
constraints
II. Include slack variables to each less-than-or-equal-to
constraint and both surplus and artificial variables to
greater-than-or-equal-to constraints and add all variables
to the objective function
III. Develop and initial simplex tableau with artificial and
slack variables in the basis and the other variables set
equal to 0. compute the Zj and
Cj - Zj values for this tableau.
IV. Follow the five steps until an optimal solution has been
reached

32
Steps for Simplex Minimization Problems

1. Choose the variable with the greatest negative Cj - Zj to


enter the solution in the pivot column.
2. Determine the solution mix variable to be replaced and
the pivot row by selecting the row with the smallest
(nonnegative) ratio of the quantity-to-pivot column
substitution rate.
3. Calculate the new values for the pivot row
4. Calculate the new values for the other row(s)
5. Calculate the Zj and Cj - Zj values for this tableau. If there
are any Cj - Zj numbers less than 0, return to step 1. if not,
and optimal solution has been reached.

33
First Simplex Tableau for the Farmer
Fertilizer Purchase Example
 The initial tableau is set up in the same manner as the in the
maximization problem.
 Note the costs for the artificial variables are $M
 We simply treat this as a very large number which forces the
artificial variables out of the solution quickly.
 The first two rows are:

Cj SOLUTION MIX X1 X2 S1 S2 A1 A2 QUANTITY


$M A1 2 4 –1 0 1 0 16
$M A2 4 3 0 –1 0 1 24

 The numbers in the Zj are computed by multiplying the Cj


column on the far left of the table times the corresponding
numbers in each other column.

34
Cont.
Zj (for X1 column) = $M(2) + $M(4) = 6M
Zj (for X2 column) = $M(4) + $M(3) = 7M
Zj (for S1 column) = $M(–1) + $M(0) = –M
Zj (for S2 column) = $M(0) + $M(–1) = –M
Zj (for A1 column) = $M(1) + $M(0) = M
Zj (for A2 column) = $M(0) + $M(1) = M
Zj (for
 The Cj –total cost) are
Zj entires = $M(16) + $M(24)
determined = $40M
as follows:

COLUMN
X1 X2 S1 S2 A1 A2
Cj for column 6 3 0 0 M M
Zj for column 6M 7M –M –M M M
Cj – Zj for column 6 – 6M 3 – 7M M M 0 0

35
Cont.

 The initial solution was obtained by letting each of the


variables X1, X2, S1 and S2 assume a value of 0.
 The current basic variables are A1 = 16, and A2 = 24
 The complete solution could be expressed in vector form
as:
X1 0
X2 0
S1 0
=
0
S2
16
A1
24
A2

36
Cont.

 The initial tableau

Cj $6 $3 $0 $0 $M $M
SOLUTION
MIX X1 X2 S1 S2 A1 A2 QUANTITY

$M A1 2 4 –1 0 1 0 16
$M A2 4 3 0 –1 0 1 24 Pivot row
Pivot number

Zj 6M 7M –M –M M M $ 40M
Cj – Zj 6 – 6M 3 – 7M M M 0 0
Pivot column

37
Developing the Second Tableau
 In the Cj – Zj row there are two entries with negative values, X1 and X2
− This means an optimal solution does not yet exist.
 The negative entry for X2 indicates it has the will result in the largest
improvement, which means it will enter the solution next.
 To find the variable that will leave the solution, we divide the
elements in the quantity column by the respective pivot column
substitution rates:
16 (smallest quotient,
For the A1 row   4 indicating pivot row)
4
24
For the A2 row  8
3
 Hence the pivot row is the A1 row and the pivot number is at the
intersection of the X2 column and the A1 row.
 The entering row for the next tableau is found by dividing each
element in the pivot row by the pivot number.

38
Cont.
 The new X2 Row:
2 4 1 0 0 16
 0. 5 1  0.25 0 0 4
4 4 4 4 4 4

Number in Number in Corresponding


= – Number Below 
new A2 row old A2 row pivot number number in new X2 row
2.5 = 4 – (3)  (0.5)
0 = 3 – (3)  (1)
0.75 = 0 – (3) x (–0.25)
–1 = –1 – (3)  (0)
1 = 1 – (3)  (0)
12 = 24 – (3)  (4)

39
Cont.

 The Zj and Cj – Zj rows are computed next:

Zj (for X1) = 3(0.5) + M(2.5) = 1.5 + 2.5M


Zj (for X2) = 3(1) + M(0) =3
Zj (for S1) = 3(–0.25) + M(0.75) = –0.75 +0.75M
Zj (for S2) = 3(0) + M(–1) = –M
Zj (for A2) = 3(0) + M(1) =M
Zj (for total cost) = 3(4) + M(12) = 12 + 12M

40
Cont.

 Second simplex tableau

Cj $6 $3 $0 $0 $M
SOLUTION
MIX X1 X2 S1 S2 A2 QUANTITY

3 X2 0.5 1 –0.25 0 0 4
Pivot number
M A2 2.5 0 0.75 –1 1 12 Pivot row
Zj 1.5 +2.5M 3 –.75+.75M –M M 12+ 12M

Cj – Zj 4.5 – 2.5M 0 0.75 –.75M M 0


Pivot column

41
Developing a Third Tableau
 The new pivot column is the X1 column and we check the
quantity column-to-pivot column ratio.
4
 For the X2 row = =8
0.5
Hence variable A2 will be
12 replaced by X1
 For the A2 row =
2.5 = 4.8
 The new X1 Row:

2.5 = 1 0 0.75 –1 12
 =0 = 0.3 = –0.4 = 4.8
2.5 2.5 2.5 2.5 2.5

42
Cont.

 The other calculations are shown below:

Number in Number in Number above Corresponding


= –
new X2 row old X2 row pivot number  number in new X1 row
0 = 0.5 – (0.5)  (1)
1 = 1 – (0.5)  (0)
–0.4 = –0.25 – (0.5) x 0.3
0.2 = 0 – (0.5)  (–0.4)
1.6 = 4 – (0.5)  (4.8)

43
Cont.

 The Zj and Cj – Zj rows are computed next:

Zj (for X1) = 3(0) + 6(1) =6


Zj (for X2) = 3(1) + 6(0) =3
Zj (for S1) = 3(–0.4) + 6(0.3) = 0.6
Zj (for S2) = 3(0.2) + 6(–0.4) = –1.8
Zj (for total cost) = 3(1.6) + 6(4.8) = 33.6

44
Cont.

 The third simplex tableau for the Farmer Fertilizer problem

Cj $6 $3 $0 $0
SOLUTION
MIX X1 X2 S1 S2 QUANTITY

Pivot number
$6 X2 0 1 –0.4 0.2 1.6
$3 X1 1 0 0.3 –0.4 4.8 Pivot row
Zj 6 3 0.6 – 1.8 $33.6
Cj – Zj 0 0 – 0.6 1.8
Pivot column

45
Fourth Tableau for Farmer Fertilizer
 The new pivot column is the S1 column: and we check the
quantity column-to-pivot column ratio.
1.6
 For the X2 row = = – 4 (not considered because it is negative)
–0.4
4.8 (row to be replaced by S1)
 For the X1 row = = 16
3

 The new S1 Row:

1 0 0.3 –0.4 4.8


 = 3.33 =0 =1 = –1.33 = 16
0.3 0.3 0.3 0.3 0.3

46
Cont.

 The other calculations are shown below:

Number in Number in Number above Corresponding


= –
new X2 row old X2 row pivot number  number in new S1 row
1.33 = 0 – (–0.4)  (3.33)
1 = 1 – (–0.4)  (0)
0 = –0.4 – (–0.4) x 1
–0.33 = 0.2 – (–0.4)  (–1.33)
8 = 1.6 – (–0.4)  (16)

47
Cont.

 Finally the Zj and Cj – Zj rows are computed:

Zj (for X1) = 3(1.33) + 0(3.33) = 3.99


Zj (for X2) = 3(1) + 0(0) =3
Zj (for S1) = 3(0) + 0(1) =0
Zj (for S2) = 3(–0.33) + 0(–1.33) = –0.99
Zj (for total cost) = 3(8) + 0(16) = 24

48
Cont.
 Fourth tableau for the Farmer Fertilizer Purchase problem
Cj $6 $3 $0 $0
SOLUTION QUANTITY
MIX X1 X2 S1 S2

$3 X2 1.33 1 0 –0.33 8
$0 S1 3.33 0 1 –1.33 16
Zj 3.99 3 0 –0.99 24
C j – Zj 2.01 0 0 0.99
 This is the optimal simplex tableau because the Cj – Zj row
contains no negative values. The optimal solution is:
Z = $24, total cost of purchasing fertilizer
S2 = 0 extra lb. of phosphate
X1 = 0 bags of Super-gro
X2 = 8 bags of Crop-quick
S1 = 16 extra lb. of nitrogen
49
Special Cases
 We have seen how special cases arise when solving
LP problems graphically
 They also apply to the simplex method
 You remember the four cases are
− Infeasibility
− Unbounded Solutions
− Degeneracy
− Multiple Optimal Solutions

50
Infeasibility
 Infeasibility comes about when there is no solution that satisfies
all of the problem’s constraints.
 All Cj - Zj row entries will be of the proper sign to imply optimality,
but an artificial variable will still be in the solution mix.
− No feasible solution is possible if an artificial variable(A2)
remains in the solution mix
 A situation with no feasible solution may exist if the problem was
formulated improperly.
Cj $5 $8 $0 $0 $M $M
SOLUTION
MIX X1 X2 S1 S2 A1 A2 QUANTITY

$5 X1 1 0 –2 3 –1 0 200
$8 X2 0 1 1 2 –2 0 100
$M A2 0 0 0 –1 –1 1 20
Zj $5 $8 –$2 $31 – M –$21 – M $M $1,800 + 20M
Cj – Zj $0 $0 $2 $M – 31 $2M + 21 $0

51
Unbounded Solutions
 Un-boundedness describes linear programs that do not have
finite solutions. It occurs in maximization problems when a
solution variable can be made infinitely large without violating a
constraint. In the simplex method this will be discovered prior to
reaching the final tableau.
 It will be manifested when trying to decide which variable to
remove from the solution mix. If all the ratios turn out to be
negative or undefined, it indicates that the problem is unbounded
Cj $6 $9 $0 $0
SOLUTION MIX X1 X2 S1 S2 QUANTITY
$9 X2 –1 1 2 0 30
$0 S2 –2 0 –1 1 10
Zj –$9 $9 $18 $0 $270
Cj - Z j $15 $0 –$18 $0
Pivot column

52
Degeneracy
 Degeneracy develops when three constraints pass through a
single point.
 For example, suppose a problem has only these three
constraints X1 ≤ 10, X2 ≤ 10, and X1 + X2 < 20.
 All three constraint lines will pass through the point (10, 10)
 Degeneracy is first recognized when the ratio calculations
are made.
 If there is a tie for the smallest ratio, this is a signal that
degeneracy exists.
 As a result of this, when the next tableau is developed, one
of the variables in the solution mix will have a value of zero
 Degeneracy could lead to a situation known as cycling in
which the simplex algorithm alternates back and forth
between the same non-optimal solutions.

53
Cont.
 One simple way of dealing with the issue is to select either
row in question arbitrarily.
 If unlucky and cycling does occur, simply go back and
select the other row. Tie for the smallest ratio
 Problem illustrating degeneracy. indicates degeneracy

Cj $5 $8 $2 $0 $0 $0
SOLUTION QUANTITY
MIX X1 X2 X3 S1 S2 S3

$8 X2 0.25 1
10/0.25 =140 –2 0 0 10
$0 S2 4 20/4
0 = 50.33 –1 1 0 20
$0 S3 2 10/2
0 = 52 0.4 0 1 10
Zj $2 $8 $8 $16 $0 $0 $80
Cj - Zj $3 $0 –$6 –$16 $0 $0
Pivot column

54
Multiple Optimal Solutions
 In the simplex method, multiple, or alternate, optimal
solutions can be spotted by looking at the final tableau
 If the Cj – Zj value is equal to 0 for a variable that is not in the
solution mix, more than one optimal solution exists
 A problem with alternate optimal solutions.

Cj $3 $2 $0 $0
SOLUTION MIX X1 X2 S1 S2 QUANTITY

$2 X2 1.5 1 1 0 6
$0 S2 1 0 0.5 1 3
Zj $3 $2 $2 $0 $12
Cj - Z j $0 $0 –$2 $0

55
Any Query

You might also like