Professional Documents
Culture Documents
(1)
A surplus variable is the difference between the total value of the true (decision) variables
and the number (usually, total resource available) on the right-hand side of the equation.
Thus, a surplus variable will always have a negative value.
Consider the following linear programming problem:
Minimise cost = 6 X 1 + 8 X 2
Subject to
X 1 + X 2 = 5000
1500
X1
X 2 750
X1, X 2 0
There are three constraints, consisting of one equality, one smaller than or equal to and
one greater than or equal to.
The model should now be modified as follows:
X1 + X 2
+ S1
X1
X2
= 5000
= 1500
S 2 = 750
X 1 , X 2 , S1 , S 2 0
where S1 is a slack variable and S 2 is a surplus variable.
2
The presence of a surplus variable causes a problem when drawing the first simplex
tableau because of its negative value. In any maximisation problem, this tableau must satisfy the
following requirements:
1.
2.
3.
All the slack variables (and thus surplus variables as well) must form part of the
initial solution mix (basis).
The table must contain as many rows as there are constraints.
The elements in the columns of variables appearing in the basis must form a unit
vector.
If S 2 is included in the basis, the elements of the S 2 will be 0, 0 and 1 and thus not a
unit vector. Furthermore, the values of the true variables being 0 in the initial solution, this would
imply that S 2 would assume a negative value in the initial solution (it can be easily checked by
means of the third equality that, if X 2 = 0, S 2 = 750). This is definitely contrary to the nonnegativity restriction all variables must have a positive value.
(2)
Artificial variables
3
Example 1 (slack variables only) [Maximisation]
Linpro Limited, a manufacturing enterprise, produces two products, namely product A
and product B. Both products are manufactured from the same raw material and processed by the
same machine. The available machine capacity is 600 hours and 10 000 kilogram of raw materials
are available. The production of one unit of product A utilises 30 minutes of machine time while
one unit of product B takes one hour to produce. To produce one unit of product A, 12.5 kg of
raw material is required whereas 10 kg is required for one unit of product B. The marginal
income of product A, of which a maximum of 700 units can be sold, amounts to R4 per unit.
Product B has a marginal income of R6 per unit. The company wants to determine what
combination of product A and product B must be produced in order to obtain maximum profit.
Formulate a linear programming model for the above problem and hence find the optimal
solution by using the simplex method.
Solution 1
We first identify our decision variables, objective function and thus write down the
constraints. Let the decision variables
Maximise Profit = 4 X 1 + 6 X 2
A table may also reveal to be helpful in understanding the problem better and to write down the
constraints easily as well. Consider the following:
Product A
0.5
12.5
700
R4
Product B
1
10
R6
X 2 600
12.5 X 1 + 10 X 2 10000
X1
700
X1, X 2
4
Now, we must prepare this linear system of inequalities before using the simplex method. We
convert all inequalities to equalities by introducing slack variables. The new model is
Maximise Profit = 4 X 1 + 6 X 2 + 0 S1 + 0 S 2 + 0 S 3
subject to
0.5 X 1 + X 2 + S1
= 600
12.5 X 1 + 10 X 2
+ S2
+ S 3 = 700
X1
X1, X 2
= 10000
S1
S2
S3
Quantity
600
10000
700
X1
0.5
12.5
1
X2
1
10
0
S1
1
0
0
S2
0
1
0
S3
0
0
1
Solution mix
S1
Quantity
600
X1
X2
S1
S2
S3
0.5
S2
S3
Zj
10000
12.5
10
700
0
0
Cj Zj
5
The simplex procedure can be summarised as follows:
1.
Find the pivot column the column that has the greatest positive entry in the
C j Z j row. If there are no positive entries in a tableau, it means that the optimal
solution has already been reached.
Cj
0
0
Quantity
600
X1
X2
S1
S2
S3
0.5
10000
12.5
10
S3
Zj
700
6*
Cj Zj
Find the pivot row. Divide each solution mix entry in the Quantity column by its
corresponding entry in the pivot column and record the result in the Ratio column.
The smallest non-negative ratio determines the pivot row.
Cj
0
0
0
Solution mix
S1
S2
Quantity
600
X1
X2
S1
S2
S3
Ratio
0.5
10000
12.5
1
10
600*
1000
S3
Zj
700
Cj Zj
3.
Solution mix
S1
S2
2.
Pivot
row
Select the pivot element in order to start applying basic row operations. The pivot
element is found at the intersection of the pivot row and the pivot column. It indicates
which variable will enter the solution mix and which one will leave. In the above
table, the pivot element is 1 (indicated in bold). We deduce that X 2 will enter the
solution mix and that S1 will leave. Why S1 ? Simply because, it is the solution mix
slack variable which is found in the first row.
6
The second simplex tableau
Now, we have to perform basic row operations in order to make the X 2 column entries
identical to those in the unit vector that was in the S1 column. In this context, we will consider
only two (out of the possible three) basic row operations:
1.
2.
Solution mix
S1
Quantity
600
X1
X2
S1
S2
S3
Ratio
0.5
S2
S3
Zj
10000
12.5
700
10
0
600*
1000
0
0
Cj Zj
Pivot
row
For example, if we have to make 10 (indicated in bold above) become 0, we have to take 10
subtract 10 times1 (the pivot element). In so doing, all the entries of the second row must also
subtract 10 times the entries in the first. Remember, we only consider the entries in the rows
involving the solution mix variables in this case, S 2 and S 3 . The last entry in the pivot
column being a zero, we dont need any further basic row operations at least one good thing
here! The entries of the Z j and C j Z j rows need to be recalculated.
The complete second simplex tableau looks like
Cj
6
0
0
Solution mix
X2
S2
Quantity
600
X1
X2
S1
S2
S3
0.5
4000
7.5
10
S3
Zj
700
3600
Cj Zj
This procedure is repeated until there are no more positive entries in the C j Z j row, in which
case we would have reached the optimal solution.
7
The third simplex tableau
Cj
6
0
0
X1
X2
S1
S2
S3
0.5
Ratio
1200
10
533*
700
Solution mix
X2
S2
Quantity
600
S3
Zj
700
7.5
1
3600
4000
Cj Zj
Pivot
row
pivot column
The largest positive entry in the last row is 1 so that the pivot column is the X 1 column.
The ratios of Quantity: X 1 are recalculated and it is found that 533 is the smallest non-negative
value, meaning that the pivot row is the S 2 row. Thus, the pivot element is 7.5 (indicated in bold)
so that S 2 has to leave the solution mix for X 1 to enter. Logically, we dont expect any other
tableaus to come up since both decision variables have entered the solution mix!
Using basic row operations, we first divide the second row entries by 7.5 to obtain a 1 in
its place before converting the 0.5 and 1 in the same column to zeros.
Cj
6
0
0
X1
X2
S1
S2
S3
0.5
1.33
0.13
700
1
1
3600
Solution mix
X2
Quantity
600
S2
S3
Zj
533
Cj Zj
Basic row operations: First row minus half second row and third row minus second row.
Cj
6
4
0
Solution mix
X2
X1
Quantity
333
X1
X2
S1
S2
S3
1.67
0.067
533
1.33
0.13
S3
Zj
167
1.33
0.13
4130
4.67
0.13
4.67
0.13
Cj Zj
8
As predicted, this is the final simplex tableau since there are no more positive entries in
the last row. We have therefore reached the optimal solution! Remember that the slack variable
S 3 is not a decision variable.
The final (optimal) solution is X 1 = 533 and X 2 = 333 so that the optimal profit is
R4130. In fact, this solution mix corresponds to a corner-point (vertex) on graph.
Note that each number in the columns of the variables occurring in the solution mix
represents a unit vector.
2.
The entry at the intersection of the S1 column and the C j Z j row, 4.67,
represents the amount by which the total profit will decrease for every unit of S1
added to the solution mix, that is, R4.67. If the available machine hours are reduced
by one hour, X 2 will be reduced by 1.67 units in the solution mix whereas X 1 will
be increased by 1.33 units.
Decrease in profit = R6 1.67 = R10.00
Increase in profit = R4 1.33 = R 5.33
Net decrease in profit
= R 4.67
3.
The entry at the intersection of the S1 column and the Z j row, 4.67, represents the
amount by which the total profit will increase if one additional machine hour is made
available for the production of product A and production B (that is, 601 machine
hours). The shadow price with respect of one machine hour is thus R4.67.
4.
The entry at the intersection of the S 2 column and the Z j row, 0.13, is the shadow
price with respect to one kilogram of raw material. If the available raw material is
increased by one kilogram, the total profit will increase by 13 cents.
5.
The entry at the intersection of the S 3 column and the Z j row, 0, is the shadow
price with respect to the demand for product A. Since the current solution mix does
not fully satisfy the demand for product A, ( S 3 = 1.67) , an increase in the demand for
this product will have no influence on the total profit.
9
Example 2 (slack and artificial variables) [Minimisation]
A producer of fertiliser receives an order to supply exactly 5000 kg of fertiliser,
consisting of a special mixture of phosphate and ammonium nitrate. The mixture must not contain
more than 1500 kg of phosphate and not less than 750 kg of ammonium nitrate. The cost per
kilogram of phosphate and ammonium nitrate are R6 and R8 respectively. The producer would
like to determine the ratio in which raw materials must be combined so as to limit costs to a
minimum.
Formulate a linear programming model for the above problem and hence find the optimal
solution by using the simplex method.
Solution 2
We first identify our decision variables, objective function and thus write down the constraints.
Let the decision variables
1500
X 2 700
X1, X 2 0
[Note that this the very same example on artificial variables mentioned above.]
The above linear programming model is thus modified as
Minimise cost = 6 X 1 + 8 X 2 + 0S1 + 0 S 2 + MA1 + MA2
Subject to
1X 1 + 1X 2 + 0 S1 + 0 S 2 + 1A1 + 0 A2 = 5000
1X 1 + 0 X 2 + 1S1 + 0 S 2 + 0 A1 + 0 A2 = 1500
0 X 1 + 1 X 2 + 0 S1 1S 2 + 0 A1 + 1A2 = 750
X 1 , X 2 , S1 , S 2 , A1 , A2 0
before using the simplex procedure.
10
Tableau of the initial solution
Solution mix
A1
S1
A2
Quantity
5000
1500
750
X1
1
1
0
X2
1
0
1
S1
0
1
0
S2
0
0
1
A1
1
0
0
A2
0
0
1
Solution mix
A1
Quantity
5000
X1
X2
S1
S2
A1
A2
S1
A2
Zj
1500
750
5750M
2M
6M
82M
Cj Zj
This time, to identify the pivot column, we have to find the largest negative entry in the C j Z j
row (since this is a minimisation problem). This is the X 2 column because, remember, M is a
large positive number so that 82M is more negative than 6M.
Cj
M
0
M
Solution mix
A1
Quantity
5000
X1
X2
S1
S2
A1
A2
S1
A2
Zj
1500
750
5750M
2M
6M
82M*
Cj Zj
Pivot column
11
To identify the pivot row, the ratios Quantity: X 2 have to be calculated and the Ratio
column created. Again, the smallest non-negative entry determines the pivot row.
Cj
M
0
M
Solution mix
A1
S1
Quantity
5000
X1
X2
S1
S2
A1
A2
1500
Ratio
5000
A2
Zj
750
750*
5750M
2M
6M
82M
Cj Zj
Pivot
row
The pivot element is therefore 1 (indicated in bold above), that is, X 2 enters and A2 leaves the
solution mix. By means of basic row operations, we make the X 2 column become a unit vector
and calculate the values of Z j and C j Z j accordingly to obtain the following tableau:
Solution mix
A1
S1
Quantity
4250
X1
X2
S1
S2
A1
A2
1500
X2
Zj
750
4250M + 6000
M8
M+8
6M
M+8
2M8
Cj Zj
The pivot column, row (the ratios are recalculated) and element are again identified.
Cj
M
0
8
Solution
mix
A1
S1
X2
Zj
Cj Zj
Quantity
X1
X2
S1
S2
A1
A2
Ratio
4250
4250
1500
1500*
750
1
0
4250M + 6000
M8
M+8
6M*
M+8
2M8
12
Solution mix
A1
Quantity
2750
X1
X2
S1
S2
A1
A2
X1
X2
Zj
1500
750
2750M + 15000
6M
M8
M+8
M6
M+8
2M8
Cj Zj
The procedure is repeated since there is still an artificial variable in the solution mix (that is, a
negative entry in the last row, M+8; the pivot column, row (the ratios are recalculated) and
element are again identified.
Cj
M
6
Solution mix
A1
X1
Quantity
2750
X1
X2
S1
S2
A1
A2
1500
1
0
X2
Zj
750
2750M + 15000
6M
M8
M+8
M6
M+8*
2M8
Cj Zj
Solution mix
S2
Quantity
2750
X1
X2
S1
S2
A1
A2
X1
X2
Zj
1500
3500
37000
M8
Cj Zj
Ratio
2750*
750
13
Interpretation of the final tableau
In order to minimise cost, the mix must consist of 1500 kg phosphate ( X 1 ) and 3500 kg
of ammonium nitrate ( X 2 ). In this mix, the minimum requirement set for ammonium nitrate will
be exceeded by 2750 kg ( S 2 ). The minimum total cost amounts to R37000.
14
(3)
Extraordinary situations
The following circumstances may also arise when the simplex method is applied.
CASES
Degeneracy
Infeasibility
Unbounded solutions
When identifying the pivot row, all the ratios will be either
negative or . It means that one or more variables can increase
indefinitely without the constraints being exceeded in a
maximisation problem.
15
(4)
Key concepts
Artificial variable
Index row C j Z j
This represents the net amount by which the objective function will
increase (if positive) or decrease (if negative) if one additional unit of a
variable is added to the solution mix.
Pivot column
The column with the largest positive (negative) entry in the C j Z j row
in the case of a maximisation (minimisation) problem.
Pivot row
The row with the smallest non-negative ratio between the quantity column
and the number in the pivot column. The ratio represents the maximum
quantity of the pivot variable that can be included in the next solution
mix. The variable in the pivot row is replaced by the pivot variable in the
next simplex tableau.
Pivot variable
Principal row
The new row in the next simplex tableau that replaces the pivot row in the
previous tableau. The value of the principal row is determined by dividing
the pivot row by the pivot number.
Shadow prices
The values of the slack variables in the Z j row. A shadow price is the
value of one additional unit of resource that is already being fully utilised.
Slack variable
Solution mix
Surplus variable
The level to which a limited resource can be reduced while the profit
decreases by a constant amount with the removal of each unit of the
resource.
Z j row
It represents the total value of the solution mix in the quantity column. It
further shows the amount by which the total value will be reduced if one
additional unit of a slack variable is added to the solution mix.
16
Exercises
Questions for discussion
1.
Briefly explain the purpose of the simplex method as well as the procedure that is
followed.
2.
Enumerate the points of similarity between the simplex method and the graphical
method. Under what circumstances will preference be given to each method?
3.
Define the following terms and indicate under what circumstances each is used:
(a) slack variable
(b) surplus variable
(c) artificial variable
4.
How will you go about selecting the following after the first simplex tableau has been
completed?
(a) the pivot column
(b) the pivot row
(c) the pivot element
5.
Explain fully why the row with the smallest ratio is identified as the pivot row.
6.
7.
Why should an artificial variable appear in the optimal solution mix and what should
the decision-maker do if this happens?
8.
Explain what additional information is made available by the final simplex tableau.
17
Linear programming problem
Toskry Limited manufactures three types of videocassette tapes:
The L-500 with a recording time of two hours
The L-750 with a recording time of three hours
The P-2000 with a recording time of eight hours
The production manager consults you to help him determine the number of units of each type
of cassette tape to be manufactured per week, given an available production capacity of 450 hours
per week. The cassette tapes are packed in containers of 100 cassettes each, which must be
considered as a unit for production purposes.
The production manager has the following information available:
L-500
L-750
P-2000
30
15
45
30
70
60
200
X 3 = 150
X1, X 2 , X 3 0
18
Minimise Cost = 30 X 1 + 45 X 2 + 70 X 3 + 0S1 + 0S 2 + MA1 + MA2
Subject to
0.25 X 1 + 0.5 X 2 + X 3 + S1
= 450
S 2 + A1
X2
= 200
+ A2 = 150
X3
X 1 , X 2 , X 3 , S1 , S 2 , A1 , A2 0
Tableau of the initial solution
Solution mix
S1
Quantity
450
X1
X2
X3
S1
S2
A1
A2
0.25
0.5
A1
A2
200
150
30
Solution mix
S1
Quantity X 1
450
0.25
A1
A2
Zj
M
M
45
70
X2
X3
S1
S2
A1
A2
0.5
Ratio
900
200*
200
150
1
0
350M
30
45M*
70M
30
45
70
Cj Zj
Cj
0
45
M
Solution mix
S1
X2
Quantity
350
X1
X2
X3
S1
S2
A1
A2
0.25
0.5
0.5
200
A2
Zj
150
9000+150M
45
45
45
30
70M*
45
M45
Cj Zj
Ratio
350
150*
19
The third and final simplex tableau
Cj
0
30
45
70
Solution mix
S1
Quantity
200
X1
X2
X3
S1
S2
A1
A2
0.25
0.5
0.5
X2
X3
Zj
200
150
19500
45
70
45
45
70
30
45
M45
M70
45
70
Cj Zj
Optimal solution:
X 2 = 200 , X 3 = 150
Minimum profit = R 19 500