Professional Documents
Culture Documents
Heizer10e Tut3 PDF
Heizer10e Tut3 PDF
Online Tutorial
3
of Linear Programming
Tutorial Outline
CONVERTING THE CONSTRAINTS TO SOLVING MINIMIZATION PROBLEMS
EQUATIONS SUMMARY
SETTING UP THE FIRST SIMPLEX TABLEAU KEY TERMS
SIMPLEX SOLUTION PROCEDURES SOLVED PROBLEM
SUMMARY OF SIMPLEX STEPS FOR DISCUSSION QUESTIONS
MAXIMIZATION PROBLEMS
PROBLEMS
ARTIFICIAL AND SURPLUS VARIABLES
T3-2 O N L I N E T U T O R I A L 3 THE SIMPLEX METHOD OF L I N E A R P RO G R A M M I N G
Most real-world linear programming problems have more than two variables and thus are too com-
plex for graphical solution. A procedure called the simplex method may be used to find the optimal
solution to multivariable problems. The simplex method is actually an algorithm (or a set of instruc-
tions) with which we examine corner points in a methodical fashion until we arrive at the best solu-
tion—highest profit or lowest cost. Computer programs and spreadsheets are available to handle the
simplex calculations for you. But you need to know what is involved behind the scenes in order to
best understand their valuable outputs.
subject to LP constraints:
2 X1 + 1X2 ≤ 100
4 X1 + 3 X2 ≤ 240
where X1 equals the number of Walkmans produced and X2 equals the number of Watch-TVs produced.
To convert these inequality constraints to equalities, we add slack variables S1 and S2 to the left
side of the inequality. The first constraint becomes
To include all variables in each equation (a requirement of the next simplex step), we add slack vari-
ables not appearing in each equation with a coefficient of zero. The equations then appear as
Because slack variables represent unused resources (such as time on a machine or labor-hours avail-
able), they yield no profit, but we must add them to the objective function with zero profit coeffi-
cients. Thus, the objective function becomes
The numbers (2, 1, 1, 0) and (4, 3, 0, 1) represent the coefficients of the first equation and second
equation, respectively.
SETTING UP THE F I R S T S I M P L E X T A B L E AU T3-3
X1 0
X 0
2 =
S1 100
S2 240
Variables in the solution mix, which is often called the basis in LP terminology, are referred to as
basic variables. In this example, the basic variables are S1 and S2. Variables not in the solution
mix—or basis—(X1 and X2, in this case) are called nonbasic variables.
Table T3.1 shows the complete initial simplex tableau for Shader Electronics. The terms and
rows that you have not seen before are as follows:
Cj: Profit contribution per unit of each variable. Cj applies to both the top row and first column.
In the row, it indicates the unit profit for all variables in the LP objective function. In the column, Cj
indicates the unit profit for each variable currently in the solution mix.
Zj: In the quantity column, Zj provides the total contribution (gross profit in this case) of the
given solution. In the other columns (under the variables) it represents the gross profit given up by
adding one unit of this variable into the current solution. The Zj value for each column is found by
multiplying the Cj of the row by the number in that row and jth column and summing.
The calculations for the values of Zj in Table T3.1 are as follows:
Cj Zj: This number represents the net profit (that is, the profit gained minus the profit given up),
which will result from introducing one unit of each product (variable) into the solution. It is not cal-
culated for the quantity column. To compute these numbers, we simply subtract the Zj total from the
Cj value at the very top of each variable’s column.
The calculations for the net profit per unit (Cj Zj) row in this example are as follows:
COLUMN
X1 X2 S1 S2
Cj for column $7 $5 $0 $0
Zj for column 0 0 0 0
Cj Zj for column $7 $5 $0 $0
It was obvious to us when we computed a profit of $0 that this initial solution was not optimal.
Examining numbers in the Cj Zj row of Table T3.1, we see that total profit can be increased by $7
for each unit of X1 (Walkmans) and by $5 for each unit of X2 (Watch-TVs) added to the solution
mix. A negative number in the Cj Zj row would tell us that profits would decrease if the corre-
sponding variable were added to the solution mix. An optimal solution is reached in the simplex
method when the Cj Zj row contains no positive numbers. Such is not the case in our initial
tableau.
T3-4 O N L I N E T U T O R I A L 3 THE SIMPLEX METHOD OF L I N E A R P RO G R A M M I N G
TABLE T3.1
Cj → $7 $5 $0 $0
Completed Initial ↓ SOLUTION MIX X1 X2 S1 S2 QUANTITY (RHS)
Simplex Tableau
$0 S1 2 1 1 0 100
$0 S2 4 3 0 1 240
Zj $0 $0 $0 $0 $0
Cj Zj $7 $5 $0 $0 (total profit)
5. Compute the Zj and Cj Zj rows, as demonstrated in the initial tableau. If all numbers in
the Cj Zj row are zero or negative, we have found an optimal solution. If this is not the
case, we must return to step 1.
All of these computations are best illustrated by using an example. The initial simplex tableau
computed in Table T3.1 is repeated below. We can follow the five steps just described to reach an
optimal solution to the LP problem.
Cj → $7 $5 $0 $0
↓ SOLUTION
MIX X1 X2 S1 S2 QUANTITY
pivot number
1ST TABLEAU
$0 S1 2 1 1 0 100 ← pivot
$0 S2 4 3 0 1 240 row
Zj $0 $0 $0 $0 $0
Cj Zj $7 $5 $0 $0 $0
pivot column
(maximum Cj Zj values)
S I M P L E X S O L U T I O N P RO C E D U R E S T3-5
Step 1: Variable X1 enters the solution next because it has the highest contribution to profit value, Cj Zj.
Its column becomes the pivot column.
Step 2: Divide each number in the quantity column by the corresponding number in the X1 column:
100/2 = 50 for the first row and 240/4 = 60 for the second row. The smaller of these num-
bers—50—identifies the pivot row, the pivot number, and the variable to be replaced. The
pivot row is identified above by an arrow, and the pivot number is circled. Variable X1 replaces
variable S1 in the solution mix column, as shown in the second tableau.
Step 3: Replace the pivot row by dividing every number in it by the pivot number (2/2 = 1, 1/2 = 1/2,
1/2 = 1/2, 0/2 = 0, 100/2 = 50). This new version of the entire pivot row appears below:
Cj → $7 $5 $0 $0
↓ SOLUTION
MIX X1 X2 S1 S2 QUANTITY
pivot number
2ND TABLEAU
$7 X1 1 1/2 1/2 0 50
$0 S2 0 1 2 1 40 ← pivot
row
Zj $7 $7/2 $7/2 $0 $350
(total profit)
Cj Zj $0 $3/2 $7/2 $0
pivot column
Because not all numbers in the Cj Zj row of this latest tableau are zero or negative, the solution
(that is, X1 = 50, S2 = 40, X2 = 0, S1 = 0; profit = $350) is not optimal; we then proceed to a third tableau
and repeat the five steps.
T3-6 O N L I N E T U T O R I A L 3 THE SIMPLEX METHOD OF L I N E A R P RO G R A M M I N G
Step 1: Variable X2 enters the solution next because its Cj Zj = 3/2 is the largest (and only) positive
number in the row. Thus, for every unit of X2 that we start to produce, the objective function
will increase in value by $3/2, or $1.50.
Step 2: The pivot row becomes the S2 row because the ratio 40/1 = 40 is smaller than the ratio
50 /( 12 ) = 100.
Step 3: Replace the pivot row by dividing every number in it by the (circled) pivot number. Because
every number is divided by 1, there is no change.
Step 4: Compute the new values for the X1 row.
corresponding
Number in number in number above
new X row = old X row − pivot number × number in the
1 1
new X2 row
1 = 1 − [(1/ 2) × (0)]
0 = 1/ 2 − [(1/ 2) × (1)]
3/ 2 = 1/ 2 − [(1/ 2) × ( −2)]
−1 / 2 = 0 − [(1/ 2) × (1)]
30 = 50 − [(1/ 2) × ( 40)]
The results for the third and final tableau are seen in Table T3.2.
Because every number in the third tableau’s Cj Zj row is zero or negative, we have reached an
optimal solution. That solution is: X1 = 30 (Walkmans), and X2 = 40 (Watch-TVs), S1 = 0 (slack in
first resource), S2 = 0 (slack in second resource), and profit = $410.
TABLE T3.2
Cj → $7 $5 $0 $0
Completed Initial ↓ SOLUTION MIX X1 X2 S1 S2 QUANTITY
Simplex Tableau
$7 X1 1 0 3/2 1/2 30
$5 X2 0 1 2 1 40
Zj $7 $5 $1/2 $3/2 $410
Cj Zj $0 $0 $1/2 $3/2
Example T1 The following constraints were formulated for an LP problem for the Joyce Cohen Publishing Company.
We shall convert each constraint for use in the simplex algorithm.
Constraint 1. 25X1 + 30X2 = 900. To convert an equality, we simply add an “artificial” variable (A1) to the
equation:
An artificial variable is a variable that has no physical meaning in terms of a real-world LP problem. It sim-
ply allows us to create a basic feasible solution to start the simplex algorithm. An artificial variable is not
allowed to appear in the final solution to the problem.
Constraint 2. 5X1 + 13X2 + 8X3 ≥ 2,100. To handle ≥ constraints, a “surplus” variable (S1) is first subtracted
and then an artificial variable (A2) is added to form a new equation:
A surplus variable does have a physical meaning—it is the amount over and above a required min-
imum level set on the right-hand side of a greater-than-or-equal-to constraint.
Whenever an artificial or surplus variable is added to one of the constraints, it must also be
included in the other equations and in the problem’s objective function, just as was done for slack
variables. Each artificial variable is assigned an extremely high cost to ensure that it does not appear
in the final solution. Rather than set an actual dollar figure of $10,000 or $1 million, however, we
simply use the symbol $M to represent a very large number. Surplus variables, like slack variables,
carry a zero cost. Example T2 shows how to figure in such variables.
Example T2 The Memphis Chemical Corp. must produce 1,000 lb of a special mixture of phosphate and potassium for a
customer. Phosphate costs $5/lb and potassium costs $6/lb. No more than 300 lb of phosphate can be used,
and at least 150 lb of potassium must be used.
We wish to formulate this as a linear programming problem and to convert the constraints and objective
function into the form needed for the simplex algorithm. Let
enter the solution in each tableau (the pivot column) will be the one with the largest negative num-
ber in the Cj Zj row. Thus, we will be choosing the variable that decreases costs the most. In min-
imization problems, an optimal solution is reached when all numbers in the Cj Zj row are zero or
positive—just the opposite from the maximization case. All other simplex steps, as shown, remain
the same.
1. Choose the variable with the largest negative Cj Zj to enter the solution.
2. Determine the row to be replaced by selecting the one with the smallest (non-negative)
quantity-to-pivot-column ratio.
3. Calculate new values for the pivot row.
4. Calculate new values for the other rows.
5. Calculate the Cj Zj values for this tableau. If there are any Cj Zj numbers less than
zero, return to step 1.
SUMMARY This tutorial treats a special kind of model, linear programming. LP has proven to be especially use-
ful when trying to make the most effective use of an organization’s resources. All LP problems can
also be solved with the simplex method, either by computer or by hand. This method is more com-
plex mathematically than graphical LP, but it also produces such valuable economic information as
shadow prices. LP is used in a wide variety of business applications.
KEY TERMS Simplex method (p. T3-2) Pivot number (p. T3-4)
Pivot row (p. T3-4) Surplus variable (p. T3-7)
Pivot column (p. T3-4)
SOLVED PROBLEM
Solved Problem T3.1 Solution
Convert the following constraints and objective function into the Minimize cost = 4X1 + 1X2 + 0S1 + 0S2 + MA1 + MA2
proper form for use in the simplex method. Subject to: 3X1 + 1X2 + 1A1 =3
4X1 + 3X2 – 1S1 + 1A2 = 6
Objective function: Minimize cost = 4X1 + 1X2
1X1 + 2X2 + 1S2 =3
Subject to the constraints: 3X1 + X2 = 3
4X1 + 3X2 ≥ 6
X1 + 2X2 ≤ 3
DISCUSSION QUESTIONS
1. Explain the purpose and procedures of the simplex method. Which variable should enter at the second simplex tableau? If the
2. How do the graphic and simplex methods of solving linear pro- objective function was
gramming problems differ? In what ways are they the same?
Minimize cost = $2.5X1 + $2.9X2 + $4.0X3 + $7.9X4
Under what circumstances would you prefer to use the graphic
approach?
3. What are the simplex rules for selecting the pivot column? The which variable would be the best candidate to enter the second
pivot row? The pivot number? tableau?
4. A particular linear programming problem has the following objec- 5. To solve a problem by the simplex method, when are slack vari-
tive function: ables added?
6. List the steps in a simplex maximization problem.
Maximize profit = $8X1 + $6X2 + $12X3 $2X4 7. What is a surplus variable? What is an artificial variable?
P RO B L E M S T3-9
PROBLEMS*
P T3.1 Each coffee table produced by John Alessi Designers nets the firm a profit of $9. Each bookcase yields a $12
: profit. Alessi’s firm is small and its resources limited. During any given production period (of one week), 10
gallons of varnish and 12 lengths of high-quality redwood are available. Each coffee table requires approxi-
mately 1 gallon of varnish and 1 length of redwood. Each bookcase takes 1 gallon of varnish and 2 lengths of
wood.
Formulate Alessi’s production mix decision as a linear programming problem and solve, using the simplex
method. How many tables and bookcases should be produced each week? What will the maximum profit be?
P T3.2 a) Set up an initial simplex tableau, given the following two constraints and objective function:
:
1X1 + 4 X2 ≤ 24
1X1 + 2 X2 ≤ 16
Maximize profit = $3 X1 + $9 X2
P T3.3 Solve the following linear programming problem graphically. Then set up a simplex tableau and solve the
:
problem, using the simplex method. Indicate the corner points generated at each iteration by the simplex on
your graph.
P T3.4 Solve the following linear programming problem, first graphically and then by simplex algorithm.
:
Minimize cost = 4X1 + 5X2
Subject to: X1 + 2X2 ≥ 80
3X1 + X2 ≥ 75
X1, X2 ≥ 0
What are the values of the basic variables at each iteration? Which are the nonbasic variables at each iteration?
P T3.5 Barrow Distributors packages and distributes industrial supplies. A standard shipment can be packaged in a
: Class A container, a Class K container, or a Class T container. A single Class A container yields a profit of $8;
a Class K container, a profit of $6; and a Class T container, a profit of $14. Each shipment prepared requires a
certain amount of packing material and a certain amount of time.
*Note: means the problem may be solved with POM for Windows; means the problem may be solved with Excel
OM; and P means the problem may be solved with POM for Windows and/or Excel OM.
T3-10 O N L I N E T U T O R I A L 3 THE SIMPLEX METHOD OF L I N E A R P RO G R A M M I N G
Joe Barrow, head of the firm, must decide the optimal number of each class of container to pack each week.
He is bound by the previously mentioned resource restrictions but also decides that he must keep his six full-
time packers employed all 240 hours (6 workers × 40 hours) each week.
Formulate and solve this problem, using the simplex method.
: T3.6 Set up a complete initial tableau for the data (repeated below) that were first presented in Solved Problem T3.1.
P T3.7 Solve Problem T3.6 for the optimal solution, using the simplex method.
: