Operations Research - Linear Programming
Economics Application - Profit Maximization
by
Elmer G. Wiens
Egwald's popular web pages are provided without cost to users. Please show your support by joining Egwald Web Services as a Facebook Fan:
Follow Elmer Wiens on Twitter:
Graphical Solution |
Simplex Algorithm |
Primal Simplex Tableaux Generator |
Dual Simplex Algorithm |
Dual Simplex Tableaux Generator
Economics Application - Profit Maximization |
Economics Application - Least Cost Formula
firm's production decision | sensitivity analysis | dual simplex method | dual simplex tableaux profit maximizing solution | postoptimality analysis | dual solution interpretation | references
FormTable =
The Firm's Production Decision.
A firm can produce a product using three production processes. Let the variables x1, x2, and x3 stand for the product and the quantities of the product produced by activities 1, 2, and 3, respectively. Each process uses labour (L), capital (K), and materials and supplies (M) to produce the product. The variable capital stands for various types of machinery and equipment. Assume that the use of labour and capital is measured in hours, and that M is an index number for the quantities of materials and supplies used. The availability of inputs of labour, capital, and materials and supplies, and the amounts of each input used to produce one unit of product by each production activity, are categorized by the coefficients of the following table:
L: | 25 | * x1 + | 32 | * x2 + | 43 | * x3 | <= | 850 |
K: | 35 | * x1 + | 25 | * x2 + | 20 | * x3 | <= | 800 |
M: | 30 | * x1 + | 36 | * x2 + | 40 | * x3 | <= | 980 |
The first column of the table means that 25 hours of labour (L), 35 hours of capital (K), and 30 units of materials and supplies (M) are used by process 1 to produce one unit of x1. The first row of the table means that 25, 32, and 43 units of labour are used to produce one unit of x1, x2, and x3, respectively. Furthermore, the total hours of labour used can not exceed 850 hours. The other columns and rows read similarly.
The unit costs of L, K, and M are:
wL = 14, wK = 34, and wM = 12,
and the costs to produce one unit of x1, x2, and x3 are:
cost1 = 1900 = 14 * 25 + 34 * 35 + 12 * 30,
cost2 = 1730 = 14 * 32+ 34 * 25 + 12 * 36,
cost3 = 1762 = 14 * 43+ 34 * 20 + 12 * 40.
While the items produced by each process are similar, they are of differing quality. Consumers will pay a premium for higher quality items. I assumed that each item's quality depends on the "amount of capital equipment" used in its production. You can change this assumption by changing the prices in the user-friendly form below, i.e. perhaps it is the labour intensive item that commands a price premium for the product of interest. The new web page will recompute the relevant variables.
Consumers' tastes are reflected in the prices of one unit of x1, x2, and x3:
price1 = 2610, price2 = 2400, and price3 = 2250
The profits to the firm of producing one unit of x1, x2, and x3 given by:
profit = price - cost:
are:
profit1 = 710, profit2 = 670, and profit3 = 488
The primal objective of the firm is to maximize profits, by producing appropriate amounts of products x1, x2, and x3. The firm's primal production decision is captured in the firm's Primal Linear Programming Problem.
|
Primal Linear Program
Maximize the Objective Function (P)
|
P = | 710 | * x1 + | 670 | * x2 + | 488 | * x3 |
subject to:
|
L: | 25 | * x1 + | 32 | * x2 + | 43 | * x3 | <= | 850 |
K: | 35 | * x1 + | 25 | * x2 + | 20 | * x3 | <= | 800 |
M: | 30 | * x1 + | 36 | * x2 + | 40 | * x3 | <= | 980 |
|
x1 >= 0; x2 >= 0; x3 >= 0
|
|
Using matrix notation this is: |
Primal Linear Program
Maximize the Objective Function (P)
P = cT x subject to
A x <= b, x >= 0
|
Solution Sensitivity Analysis.
The form below permits you to change the data that specify the firm's production decision. You can perform a sensitivity analysis of the firm's linear programming problem by changing the data, and clicking "Submit L.P.". A new web page will display with all the firm's data updated with your new data, and the firm's new optimal production program. Compare the new results with the results of the current web page.
After you fill in your data and click "Submit L.P.", the program will automatically calculate a sequence of tableaux that solves the primal and dual l.p. problems. Examine the tableaux that follow to see how the dual simplex method proceeds to find the solution.
Dual Simplex Method.
The standard form for the initial dual simplex tableau is:
Initial Tableau |
b | A | I3 |
0 | -cT | O3T |
In the dual simplex algorithm, a sequence of tableaux are calculated. A given Tableauk has the form:
after consolidating the center 2 by 2 block of matrices.
Phase 0 - drive all artificial variables (associated with = constraints) to zero, i.e. eliminate them from the basis;
Phase I - find a tableau with Ø >= 0, i.e. a feasible dual program;
Phase II - generate tableaux that decrease the value of µ turning ß >= 0, without dropping back into Phase 0 or I, i.e. find a feasible basic dual program that minimizes the objective function D.
|
The Tableaux of the Dual Simplex Method.
Phase I: Goal: get Ø >= 0.
Tableau0 |
|
b0 |
x01 |
x02 |
x03 |
s01 |
s02 |
s03 |
row sum |
L0 | 850 | 25 | 32 | 43 | 1 | 0 | 0 | 951 |
K0 | 800 | 35 | 25 | 20 | 0 | 1 | 0 | 881 |
M0 | 980 | 30 | 36 | 40 | 0 | 0 | 1 | 1087 |
P0 | 0 | -710 | -670 | -488 | 0 | 0 | 0 | -1868 |
-P0 / K0 | 0 | 20.286 | 26.8 | 24.4 | 0 | 0 | 0 | 0 |
Basis for Tableau0: [s1, s2, s3, ]. Value of Objective Function = 0.
Proceed to the next tableau as follows:
Phase 0: Complete.
Phase I: Goal: get Ø >= 0.
A. In Tableau0:
1. Select a target column, tcol, with Øtcol < 0: Ø01 = -710, tcol = 1.
2. Select any row, r, with a positive entry in tcol = 1 as the pivot row: row = 2 associated with x2,1 = 35 and constraint K.
3. Compute the ratios -Ø / K as per the last row. Discard ratios which are not positive and ratios associated with artificial variables.
Select the column with the least positive ratio as the pivot column: col = 1 associated with 20.286. Thus x2,1 = 35 is the pivot; variable s2 will leave the basis; variable x1 will enter the basis.
B. To create Tableau1:
4. Compute row K1 = K0 / (35).
5. Subtract multiples of row K1 from all other rows of Tableau0 so that column x1 = e2 in Tableau1.
Tableau1 |
|
b1 |
x11 |
x12 |
x13 |
s11 |
s12 |
s13 |
row sum |
L1 = L0 - (25) * K1 | 278.571 | 0 | 14.143 | 28.714 | 1 | -0.714 | 0 | 321.714 |
K1 = K0 / (35) | 22.857 | 1 | 0.714 | 0.571 | 0 | 0.029 | 0 | 25.171 |
M1 = M0 - (30) * K1 | 294.286 | 0 | 14.571 | 22.857 | 0 | -0.857 | 1 | 331.857 |
P1 = P0 - (-710) * K1 | 16228.571 | 0 | -162.857 | -82.286 | 0 | 20.286 | 0 | 16003.714 |
-P1 / M1 | 0 | 0 | 11.176 | 3.6 | 0 | 23.667 | 0 | 0 |
Basis for Tableau1: [s1, x1, s3, ]. Value of Objective Function = 16228.57.
Proceed to the next tableau as follows:
Phase 0: Complete.
Phase I: Goal: get Ø >= 0.
A. In Tableau1:
1. Select a target column, tcol, with Øtcol < 0: Ø12 = -162.857, tcol = 2.
2. Select any row, r, with a positive entry in tcol = 2 as the pivot row: row = 3 associated with x3,2 = 14.571 and constraint M.
3. Compute the ratios -Ø / M as per the last row. Discard ratios which are not positive and ratios associated with artificial variables.
Select the column with the least positive ratio as the pivot column: col = 3 associated with 3.6. Thus x3,3 = 22.857 is the pivot; variable s3 will leave the basis; variable x3 will enter the basis.
B. To create Tableau2:
4. Compute row M2 = M1 / (22.857).
5. Subtract multiples of row M2 from all other rows of Tableau1 so that column x3 = e3 in Tableau2.
Tableau2 |
|
b2 |
x21 |
x22 |
x23 |
s21 |
s22 |
s23 |
row sum |
L2 = L1 - (28.714) * M2 | -91.125 | 0 | -4.163 | 0 | 1 | 0.363 | -1.256 | -95.181 |
K2 = K1 - (0.571) * M2 | 15.5 | 1 | 0.35 | 0 | 0 | 0.05 | -0.025 | 16.875 |
M2 = M1 / (22.857) | 12.875 | 0 | 0.638 | 1 | 0 | -0.038 | 0.044 | 14.519 |
P2 = P1 - (-82.29) * M2 | 17288 | 0 | -110.4 | 0 | 0 | 17.2 | 3.6 | 17198.4 |
-P2 / M2 | 0 | 0 | 173.176 | 0 | 0 | 458.667 | 0 | 0 |
Basis for Tableau2: [s1, x1, x3, ]. Value of Objective Function = 17288.
Proceed to the next tableau as follows:
Phase 0: Complete.
Phase I: Goal: get Ø >= 0.
A. In Tableau2:
1. Select a target column, tcol, with Øtcol < 0: Ø22 = -110.4, tcol = 2.
2. Select any row, r, with a positive entry in tcol = 2 as the pivot row: row = 3 associated with x3,2 = 0.638 and constraint M.
3. Compute the ratios -Ø / M as per the last row. Discard ratios which are not positive and ratios associated with artificial variables.
Select the column with the least positive ratio as the pivot column: col = 2 associated with 173.176. Thus x3,2 = 0.638 is the pivot; variable x3 will leave the basis; variable x2 will enter the basis.
B. To create Tableau3:
4. Compute row M3 = M2 / (0.638).
5. Subtract multiples of row M3 from all other rows of Tableau2 so that column x2 = e3 in Tableau3.
Phase II: Goal: get ß >= 0.
Tableau3 |
|
b3 |
x31 |
x32 |
x33 |
s31 |
s32 |
s33 |
row sum |
L3 = L2 - (-4.163) * M3 | -7.059 | 0 | 0 | 6.529 | 1 | 0.118 | -0.971 | -0.382 |
K3 = K2 - (0.35) * M3 | 8.431 | 1 | 0 | -0.549 | 0 | 0.071 | -0.049 | 8.904 |
M3 = M2 / (0.638) | 20.196 | 0 | 1 | 1.569 | 0 | -0.059 | 0.069 | 22.775 |
P3 = P2 - (-110.4) * M3 | 19517.647 | 0 | 0 | 173.176 | 0 | 10.706 | 11.176 | 19712.706 |
-P3 / L3 | 0 | 0 | 0 | 0 | 0 | 0 | 11.515 | 0 |
Basis for Tableau3: [s1, x1, x2, ]. Value of Objective Function = 19517.65.
Proceed to the next tableau as follows:
Phase 0: Complete.
Phase I: Complete.
Phase II: Goal: get ß >= 0.
A. In Tableau3:
1. Select a pivot row, row, with b3row < 0: row = 1 associated with b31 = -7.059.
2. Compute the ratios -Ø / L as per the last row. Discard ratios which are not positive and ratios associated with artificial variables.
Select the column with the least positive ratio as the pivot column: col = 6 associated with 11.515. Thus x1,6 = -0.971 is the pivot; variable s1 will leave the basis; variable s3 will enter the basis.
B. To create Tableau4:
3. Compute row L4 = L3 / (-0.971).
3. Subtract multiples of row L4 from all other rows of Tableau3 so that column s3 = e1 in Tableau4.
Tableau4 |
|
b4 |
x41 |
x42 |
x43 |
s41 |
s42 |
s43 |
row sum |
L4 = L3 / (-0.971) | 7.273 | -0 | -0 | -6.727 | -1.03 | -0.121 | 1 | 0.394 |
K4 = K3 - (-0.049) * L4 | 8.788 | 1 | 0 | -0.879 | -0.051 | 0.065 | 0 | 8.923 |
M4 = M3 - (0.069) * L4 | 19.697 | 0 | 1 | 2.03 | 0.071 | -0.051 | 0 | 22.747 |
P4 = P3 - (11.18) * L4 | 19436.364 | 0 | 0 | 248.364 | 11.515 | 12.061 | 0 | 19708.303 |
-P4 / 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Basis for Tableau4: [s3, x1, x2]. Value of Objective Function = 19436.36.
Phase 0: Complete.
Phase I: Complete.
Phase II: Complete.
Primal Solution: [s3, x1, x2] = [7.273, 8.788, 19.697]; P = 19436.364.
(Primal x variables not in the basis have a value of 0). Dual Solution: [yL, yK, yM] = [11.515, 12.061, 0]; D = 19436.364.
Firm's Profit Maximizing Solution.
Quantities of the product produced by each production process, and the accompanying revenues, costs, and profits.
| Production Process | |
| x1 | x2 | x3 | Totals |
price | 2610 | 2400 | 2250 | |
output | 8.788 | 19.697 | 0 | |
revenue | 22936.36 | 47272.73 | 0 | 70209.09 |
L | 219.7 | 630.3 | 0 | 850 |
K | 307.58 | 492.42 | 0 | 800 |
M | 263.64 | 709.09 | 0 | 972.73 |
cost | 16696.97 | 34075.76 | 0 | 50772.73 |
profit | 6239.39 | 13196.97 | 0 | 19436.36 |
unit profit | 710 | 670 | 488 | |
Post Optimality Analysis.
Over what ranges of the values of the coefficients of the model, such as profits (c1, c2, c3), or the availability of inputs (bL, bK, bM), will the above basic feasible solution remain optimal? By the phrase "remain optimal," I mean that the variables in the basis of the current optimal basic solution remain in the basis of the new optimal basic solution, after the values of the coefficients are altered. As long as the list of variables in each basis is the same, even though the values of the variables may change with the changes in the coefficients of the model, the current basic solution is said to remain optimal.
The primal variables, x1, x2, and x3, take on the values 8.79, 19.7, and 0 with per unit profits of 710, 670, and 488 at per unit prices of 2610, 2400, and 2250. The basis variables associated with rows (
1, 2, 3) of Tableau4 are the variables (
s3, x1, x2
) whose associated objective function coefficients are (
0, 710, 670).
Objective Function Coefficients - NonBasic Variables
By how much can one increase the price of
x3 before this variable will enter the basis of a new basic optimal solution. To determine the entry price for x3, one computes the opportunity cost of producing one unit of x3 = the profits given up to produce one unit of x3 = z3, using standard L.P. notation. The value of z3 is calculated by weighting each entry of the column associated with x3 in Tableau4 by the objective function coefficient associated with the row of that entry:
z3 = 0 * -6.73 + 710 * -0.88
+ 670 * 2.03 = 736.36.
Per unit profits for x3 can increase from 488 to 736.36, and the price per unit of x3 can increase from 2250 to 2498.36 before x3 will enter the basis in the new optimal primal solution.
Objective Function Coefficients - Basic Variables
By how much can one decrease the price of variable x1 before a new optimal basic solution is obtained, i.e. the current list of basis variables is replaced by a different list.
To determine the basis upset price for x1, one needs to know the decrease in profits that result from increasing the value of each nonbasic variable by one unit, i.e. the opportunity cost, zj of producing one unit of each nonbasic variable variable, xj.
One also needs to know by how much the value of each nonbasis variable will increase from a one unit decrease in the basic variable x1, i.e. the trade-off rate x2, j, from row 2 of Tableau4 associated with basis variable x1, between the variable x1 and each nonbasis variable, xj.
Call zcj the difference between zj and the objective function coefficient cj for variable xj, divided by x2, j from Tableau4. (For slack variables, the objective function coefficient is 0.) If zcj > 0, then the nonbasic variable xj is a candidate to replace x1, when the price of x1 (or equivalently, the objective function coefficient, c1) is reduced by zcj. Taking the least positive zcj over all candidate nonbasic variables yields the possible decrease in the price of x1 before this variable leaves the basis of the existing optimal solution, i.e. a different primal or slack variable will be associated with row 2.
For the basic variable x1 associated with row 2 of Tableau4, the candidate nonbasic variables — primal variables xj, or slack variables sj — and their zcj values are given by:
xj: zcj = (zj - cj) / x2, j, or
sj: zcj = (zj - 0) / x2, j.
The zcj values for x1 associated with row 2 of Tablueau4 are:
s2: zc5 = (12.06 - 0) /
0.06 = 186.56
The least positive zcj is zc5 = 186.56. Consequently, profits per unit for x1 can decrease from 710 to
523.44, and the price per unit of x1 can decrease from 2610 to 2423.44 before the existing basis is upset. (x1 might possibly be in the basis (possibly as a degenerate variable) of the new optimal primal basic solution).
Similarily, by how much can one decrease the price of variable x2 before a new optimal basic solution is obtained, i.e. the current list of basis variables is replaced by a different list.
The zcj values for x2 associated with row 3 of Tablueau4 are:
x3: zc3 = (736.36 - 488) /
2.03 = 122.33
s1: zc4 = (11.52 - 0) /
0.07 = 162.86
The least positive zcj is zc3 = 122.33. Consequently, profits per unit for x2 can decrease from 670 to
547.67, and the price per unit of x2 can decrease from 2400 to 2277.67 before the existing basis is upset. (x2 might possibly be in the basis (possibly as a degenerate variable) of the new optimal primal basic solution).
Postoptimality Analysis.
RHS Coefficients - b-vector Constraints
Over what ranges of values for the availability of labour (L), capital (K), and materials and supplies (M), will the existing set of basic variables remain in the basis of the optimal solution, after these variables values are adjusted?
In the postoptimality analysis for the objective function coefficients, I used the the columns in Tableau4associated with each nonbasis variable xj or sj, or / and the row of Tableau4 associated with the basis variable.
The postoptimaility analysis for the resource constraints associated with the L, K, and M values, I use the matrix formed from the columns of with the slack variables in Tableau4.
On the simplex algorithm page, I showed how this matrix, called B, is the inverse of the matrix AB from Tableau0 associated with the basis variables in the optimal primal solution. Moreover, the ß column of the final tableau, Tableau4, is equal to the product of the B matrix and the original vector of resource constraints, b, i.e. ß = B * b, which also yields the values of the basis variables, xbasis in the optimal primal solution.
The range of values of the coefficients of the b-vector that will maintain the current basis depends on the following observation. If I change the ith coefficient bi to bi, then the new vector, b, must obey:
xbasis = ß = B * b >= 0
since the values of the new optimal xbasis coefficients must be nonnegative for the exisiting basis to continue as the basis in the the new optimal basic primal solution.
The B matrix for the current optimal basic solution is:
B | = |
-1.03 | -0.121 | 1 | -0.051 | 0.065 | 0 | 0.071 | -0.051 | 0 |
|
With b = (850, 800, 980), the perturbed RHS coefficients must obey:
-1.03 * L + -0.121 * 800 + 1 * 980 >= 0 | -0.051 * L + 0.065 * 800 + 0 * 980 >= 0 | 0.071 * L + -0.051 * 800 + 0 * 980 >= 0 |
-1.03 * 850 + -0.121 * K + 1 * 980 >= 0 | -0.051 * 850 + 0.065 * K + 0 * 980 >= 0 | 0.071 * 850 + -0.051 * K + 0 * 980 >= 0 |
-1.03 * 850 + -0.121 * 800 + 1 * M >= 0 | -0.051 * 850 + 0.065 * 800 + 0 * M >= 0 | 0.071 * 850 + -0.051 * 800 + 0 * M >= 0 |
Since these inequalities must be satisfied simultaneously for each bi considered separately, the upper and lower bounds are:
| L | K | M |
RHS b-vector |
850 | 800 | 980 |
Lower limit |
571.43 | 664.06 | 972.73 |
Upper limit |
857.06 | 860 | inf |
If you change the data on the form in the sensitivity analysis section above and click "Submit L.P.", this web page will display the tableaux for the new optimal solution. Continue this process until you convince yourself of the validity of the postoptimality analysis.
Economic Interpretation of the Dual Solution.
The firm's dual problem is to determine the values yL, yK, and yM per unit of input L, K and M that will minimize the total value of resources used, yet maintain each product's level of profit. The firm's dual production decision is captured in the firm's Dual Linear Programming Problem.
|
Dual Linear Program
Minimize the Objective Function (D)
|
D = | 850 | * yL + | 800 | * yK + | 980 | * yM |
subject to:
|
x1: | 25 | * yL + | 35 | * yK + | 30 | * yM | >= | 710 |
x2: | 32 | * yL + | 25 | * yK + | 36 | * yM | >= | 670 |
x3: | 43 | * yL + | 20 | * yK + | 40 | * yM | >= | 488 |
|
yL >= 0; yK >= 0; yM >= 0
|
|
Using matrix notation this is: |
Dual Linear Program
Minimize the Objective Function (D)
D = bT y subject to
yT A >= cT, y >= 0
|
The solution to this minimization problem is:
Dual Solution: [yL, yK, yM] = [11.515, 12.061, 0]; D = 19436.364.
The variables, yL, yK, and yM, measure the increase in profits, P in the primal program, from a one unit increase in the availability of labour (L), capital (K), and materials and supplies (M), respectively. (See what happens to profits when you increase the resource constraint of an input by one unit on the form in the sensitivity analysis section above and click "Submit L.P.".)
A value of zero for a variable yi, associated with a positive value for slack variable si in the optimal solution of the primal program, means that excess amounts of that input are available.
The variables, yL, yK, and yM, are referred to as opportunity prices, or shadow prices for the inputs L, K, and M.
End of the Linear Programming Dual Simplex Method
Linear Programming References.
-
Sposito, Vincent. Linear and Nonlinear Programming. Ames, Iowa: Iowa UP, 1975.
-
Restrepo, Rodrigo A. Theory of Games and Programming: Mathematics Lecture Notes. Vancouver: University of B.C., 1967.
-
Restrepo, Rodrigo A. Linear Programming and Complementarity. Vancouver: University of B.C., 1994.
-
Taha, Hamdy A. Operations Research: An Introduction. 2nd ed. New York: MacMillan, 1976.
- Wu, Nesa, and Richard Coppins. Linear Programming and Extensions. New York: McGraw-Hill, 1981.
|