Professional Documents
Culture Documents
Figure 1
This graph summarizes the presentation in Section 2.4 of the application of the graphical method to the original Wyndor problem.
CD S7-1-2
This original Wyndor problem has no yes-or-no decisions and so no binary decision variables. However, each of the two variations presented below introduces a complication that can be overcome by using auxiliary binary variables to formulate a model that can be readily solved. (Because the Wyndor problem has only two decision variables, we will be able to use graphical analysis to help introduce and analyze each variation before showing how auxiliary binary variables can be used with any number of decision variables.).
Thus, we now are dealing with mutually exclusive products. Figure 2 shows the feasible region for this problem, namely, the line segment from (0, 0) to (4, 0) and the line segment from (0, 0) to (0, 6). These are the only solutions from the feasible region for the original problem for which either x1 = 0 or x2 = 0. For this tiny problem, it can be seen from the figure that the feasible solution that maximizes P (i.e., the optimal solution) is (D, W) = (0, 6) with P = 3,000
Figure 2
The dark line segments show the feasible solutions for Example 1.
CD S7-1-3
Linear or integer programming models do not permit an either-or-restriction such as either D = 0 or W = 0. How can we rewrite this restriction in a standard form to fit such a model so that the model can be solved by available algorithms (including those in the Excel Solver)? As illustrated by the case study in Section 7.1, if D and W were binary variables, we would only need to rewrite the restriction that the two products are mutually exclusive alternatives as D + W = 1. However, D and W represent production rates that can take on various values besides 0 and 1, so this constraint does not work. Now watch auxiliary binary variables come to the rescue .
Formulation with Auxiliary Binary Variables For each product, there are just two possibilities regarding the decision of whether it can be produced. Either it can or it cannot. Therefore, we can associate each of the two values of an auxiliary binary variable with one of these possibilities. Specifically, let the auxiliary binary variables be
1, if D > 0 can hold (can produce doors) y1 = 0, if D = 0 must hold (cannot produce doors) 1, if W > 0 can hold (can produce windowss) y2 = 0, if W = 0 must hold (cannot produce windows)
The relationships between y1 and D, as well as between y2 and W, are identical to the ones shown in Section 7.5 for another variation of the Wyndor problem.. Therefore, Figure 3 demonstrates that the analogous constraints involving these variables, UnitsProduced (C13:D13) OnlyIfProduce (C15:D15) and Produce? (C16:D16) = binary, can be used to ensure that these relationships hold. To make the products mutually exclusive, we now add the usual kind of constraint for mutually exclusive alternatives with regard to these two binary variables, y1 + y2 1 which gives the constraint, TotalProduced (E16) MaximumToProduce (G16), in the spreadsheet model. This forces either C16 = 0 or D16 = 0 (or both).
CD S7-1-4
A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 B C D E F G
Total Produced 1
<=
Range Name HoursAvailable HoursUsed HoursUsedPerUnitProduced MaximumToProduce OnlyIfProduce Produce? TotalProduced TotalProfit UnitProfit UnitsProduced
Cells G8:G10 E8:E10 C8:D10 G16 C15:D15 C16:D16 E16 G19 C4:D4 C13:D13
15
D =99*D16
CD S7-1-5
These are the only new constraints needed along with the constraints of the original model. Since D and W are production rates, these variables do not need to have integer values, so the model in Figure 3 is a mixed BIP model. There are no extra costs associated with any values of y1 and y2. The original objective function, without y1 and y2, still applies, as indicated by the equation entered into the target cell TotalProfit (G19). The Excel Solver gives the optimal solution shown in the changing cells, namely, the windows are the product chosen to be produced, and then they are produced at the maximum rate (W = 6) allowed by the original constraints. For such a small problem, we were able to find this optimal solution from Figure 3 without introducing auxiliary binary variables. However, auxiliary binary variables become necessary when dealing with larger problems. For example, if this pair of mutually exclusive products is just part of a larger group of products under consideration, then the larger model would need to add the constraints involving y1 and y2. You will see this same approach included again later in Example 3 when there are three potential new products and at most two can be chosen to be produced.
The data for plant 4 indicate that if this plant is chosen, then we must satisfy the constraint 2D + 4W 28 when solving for the most profitable product mix. However, if plant 3 is chosen instead, then this constraint is irrelevant and we must instead satisfy the original constraint for plant 3, 3D + 2W 18 In other words, the relevant restriction is the following pair of either-or constraints: Either Or 3D + 2W 18
2D + 4W 28
Choosing one of these two constraints as the one that must be satisfied corresponds to choosing one of the two plants to help produce the doors and windows. The choice of which plant depends on which one allows the largest total profit when considering all the constraints of the model. Figure 4 shows the effect of these two choices. If plant 3 were chosen to help produce these two products (so 3D + 2W 18 is relevant but 2D + 4W 28 is not), then we would have the linear programming problem on the left side of the figure. Since this problem is identical to the original Wyndor problem shown in Figure 1, the best available solution would be (D, W) = (2, 6) with P = 3,600
However, if plant 4 were chosen instead (so 2D + 4W 28 is relevant but 3D + 2W 18 is not), then we would have the linear programming problem on the right side of the figure. The best available solution for this problem would be (D, W) = (4, 5) with P = 3,700
Since P = 3,700 is larger than P = 3,600, the largest possible weekly profit is $3,700, which is only obtainable by choosing plant 4 instead of plant 3 to help produce the two new products.
CD S7-1-7
Figure 4
These two graphs for Example 2 show the linear programming problem and its optimal solution that would result if the plant chosen to help produce the two new products were (a) plant 3 or (b) plant 4.
Despite its either-or constraints, we have just managed to solve the complete model for variation 3 by solving and comparing two linear programming problems. However, solving larger models with several pairs of either-or constraints in this way would require solving and comparing numerous linear programming problems. We would much prefer to be able to apply a standard algorithm (such as those used by the Excel Solver) just once to solve the model. Unfortunately, the model for Example 2 is not a linear programming model, since eitheror constraints are not allowed in linear or integer programming. In fact, this model does not fit the format for any kind of standard model. Therefore, we cannot use a standard algorithm once to find an optimal solution for this model in its current form. How can we reformulate this model into a standard format where a standard algorithm can be used one time to find an optimal solution? Once again, auxiliary binary variables come to the rescue.
CD S7-1-8
This definition is enforced by introducing an extremely large positive number (we will use again) and then making the following changes in the model. Replace Either Or 3D + 2W 18 2D + 4W 28 by 3D + 2W 18 + 99y 2D + 4W 28 + 99(1 - y) y is binary To see why these new constraints work, check what happens when y = 0. y=0 gives and so 3D + 2W 18 must hold but 2D + 4W 28 does not need to hold 3D + 2W 18 2D + 4W 28 + 99 (a relatively huge number)
Since the other constraints in the model prevent 2D + 4W from being much larger than 28, having y = 0 give 2D + 4W 28 + 99 has the same effect as eliminating this constraint from the model. Similarly, y=1 gives and so 3D + 2W 18 does not need to hold but 2D + 4W 28 must hold 3D + 2W 18 + 99 (a relatively huge number) 2D + 4W 28
Again, adding 99 to the right-hand side of 3D + 2W 18 is equivalent to eliminating the constraint. Figure 5 shows how this approach can be incorporated into a spreadsheet model. An additional changing cell (E16) displays the value of y. As indicated in the figure by the equations entered into cells G10 and G11, these cells give the modified right-hand sides of the plants 3 and 4 constraints that result from the value of y. With the constraints included in the Solver dialogue box, we now have a mixed BIP model that can be solved by the Excel Solver. Clicking on the Solve button causes the Solver to simultaneously choose the value of y and the production rates (D and W) that maximize the total profit given in the target cell TotalProfit (H14). Since y = 1 in this optimal solution, plant 4 should be chosen to help produce the new products, with D = 4 and W = 5. This choice of plant provides a weekly profit of $3,700 rather than the $3,600 obtainable by choosing plant 3 instead.
CD S7-1-9
A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Units Produced
Total Profit 1
$3,700
Range Name HoursAvailable HoursUsed HoursUsedPerUnitProduced ModifiedHoursAvailable TotalProfit UnitProfit UnitsProduced WhichPlantToUse?
5 6 7 8 9 10 11
14
Figure 5
A spreadsheet model for Example 2, where the Excel Solver gives the optimal solution shown in the changing cells, UnitsProduced (C14:D14) and WhichPlantToUse? (E16).
In some ways, this problem resembles a standard product-mix problem such as the Wyndor Glass Co. case study described in Section 2.1. In fact, if we changed the problem by dropping the two restrictions and by requiring each unit of a product to use the production hours given in Table 2 in both plants (so the two plants now perform different operations needed by the products), it would become just such a problem. In particular, let x1, x2, and x3 be the production rates of the respective products. Displaying the values of these decision variables in changing cells UnitsProduced (C12:E12), the spreadsheet model then would become the one shown in rows 113 and 15 of Figure 6 if column H and the other rows were omitted except for TotalProfit (H21). MaximumSales (C15:E15) provides upper bounds on the production rates for the three products, so
x1 7 ,
x2 5 ,
x3 9
CD S7-1-11
A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Hours Used Per Unit Produced 3 4 2 4 6 2 Product 1 5.5 <= 7 7 1 Product 2 0 <= 0 5 0 Product 3 9 <= 9 9 1
<= <=
Total Produced 2
<=
Range Name HoursAvailable HoursUsed HoursUsedPerUnitProduced MaximumSales MaximumToProduce ModifiedHoursAvailable OnlyIfProduce Produce? TotalProduced TotalProfit UnitProfit UnitsProduced WhichPlantToUse?
Cells I8:I9 F8:F9 C8:E9 C15:E15 H17 H8:H9 C14:E14 C17:E17 F17 H21 C4:E4 C12:E12 E21
5 6 7 8 9
14
D =D15*D17
E =E15*E17
Figure 6
A spreadsheet formulation of the BIP model for the Good Products Co. problem, where the Excel Solver provides the optimal solution given in the changing cells, UnitsProduced (C12:E12), Produce? (C17:E17), and WhichPlanToUse? (E21)
CD S7-1-12
For the real problem, however, restriction 1 necessitates adding to the model the constraint: No more than two of the decision variables (x1, x2, x3) can have a value greater than zero. This constraint does not fit into a linear or integer programming format, so the key question is how to convert it to such a format so that a corresponding algorithm can be used to solve the overall model. If the decision variables were binary variables, then the constraint would be expressed in this format as x1 + x2 + x3 2. However, with continuous decision variables, a more complicated approach involving the introduction of auxiliary binary variables is needed. Restriction 2 necessitates replacing the first two functional constraints (3x1 + 4x2 + 2x3 30 and 4x1 + 6x2 + 2x3 40) by the restriction Either Or 3x1 + 4x2 + 2x3 30 4x1 + 6x2 + 2x3 40
must hold, where the choice of which constraint must hold corresponds to the choice of which plant will be used to produce the new products. Example 2 illustrated how such either-or constraints can be converted to a linear or integer programming format, again with the help of an auxiliary binary variable.
1, if x j > 0 can hold (can produce product j) yj = 0, if x j = 0 must hold (cannot produce product j)
for j = 1, 2, 3. To enforce this interpretation in the model, we replace the constraints on the maximum production rates of the three productsx1 7, x2 5, and x3 9by the new constraints,
x1 7y1 ,
x2 5y2 ,
x3 9y3
Therefore, y1 = 1 allows any feasible value of x1, whereas y1 = 0 forces x1 = 0, and both y2 and y3 have the same effect on x2 and x3, respectively. We also add the constraints, y1 + y2 + y3 2 yj is binary, for j = 1, 2, 3 Consequently, when these constraints force choosing at most two of the yj to equal 1, this amounts to choosing at most two of the new products as the ones that can be produced. To deal with restriction 2, we use the same approach as for Example 2. Therefore, we introduce another auxiliary binary variable y4 with the interpretation that
1, if 4x1 + 6x2 + 2x3 40 must hold (choose plant 2) y4 = 0, if 3x1 + 4x2 + 2x3 30 must hold (choose plant 1)
CD S7-1-13
This interpretation is enforced by adding the constraints 3x1 + 4x2 + 2x3 30 + 99y4 4x1 + 6x2 + 2x3 40 + 99(1 - y4) y4 is binary Both column H and rows 1321 of Figure 6 show how all of this can be incorporated into the spreadsheet model in an intuitive way. The additional changing cells, Produce? (C17:E17) and WhichPlantToUse? (E21), give the values of the four auxiliary binary variables, so all four cells are constrained to be binary. The constraint that TotalProduced (F17) MaximumToProduce (H17) forces choosing at most two of the new products to be produced. The equations entered into OnlyIfProduce (C14:E14)as shown at the bottom of the figuregive the values of 7y1, 5y2, and 9y3, so the constraints that UnitsProduced (C12:E12) OnlyIfProduce (C14:E14) force the production rate of a product to be 0 in row 12 if the decision has been made in row 17 not to produce that product. With the equations that are shown for ModifiedHours Available (H8:H9), the constraints that HoursUsed (F18:F19) ModifiedHoursAvailable (H8:H9) correspond to the algebraic constraints given at the end of the preceding paragraph. The spreadsheet model now is a mixed BIP model, with three continuous decision variables [UnitsProduced (C12:E12)] and four auxiliary binary variables [Produce? (C17:E17) and WhichPlantToUse? (E21)], so now the problem is formulated in a form that can be solved. Using the Excel Solver gives the optimal solution shown in the changing cells in Figure 6, namely, choose products 1 and 3 to produce, choose plant 2 for the production, and choose the production rates of 512 units per week for product 1 and 9 units per week for product 3. The resulting total profit given in the target cell TotalProfit (H21) is $54,500 per week.
CD S7-1-14
Table 3 Data for Example 4 (the Supersuds Corp. Problem)
A Formulation with Auxiliary Binary Variables A natural formulation would be to let x1 = Number of TV spots allocated to product 1 x2 = Number of TV spots allocated to product 2 x3 = Number of TV spots allocated to product 3 P = Total profit (in millions of dollars) The contribution of each of these integer decision variables (x1, x2, x3) to P then would be given by the corresponding column in Table 3. However, each column indicates that profit is not proportional to the number of TV spots allocated to that product. Therefore, we cannot write a legitimate objective function in terms of these decision variables to fit integer programming. Using the algebraic form, the best that we can do with these decision variables is to formulate an incomplete integer programming model (not a binary integer programming model) that includes all the needed constraints but not an objective function.
CD S7-1-15
For example, look at the definitions of y11, y12, and y13. These definitions imply that (y11, y12, y13) = (0, 0, 0) (y11, y12, y13) = (1, 0, 0) (y11, y12, y13) = (0, 1, 0) (y11, y12, y13) = (0, 0, 1) if if if if x1 = 0 x1 = 1 x1 = 2 x1 = 3
These four alternative values of x1 are the only possible values. Since these alternative values are mutually exclusive alternatives, y1, y2, and y3 need to satisfy the constraints y11 + y12 + y13 1 y11, y12, y13 are binary Selecting values of y11, y12, and y13 that satisfy these constraints is equivalent to selecting a value of x1 that satisfies the constraints x1 3 x1 0 x1 is integer In just the same way, the other auxiliary binary variables need to satisfy the constraints y21 + y22 + y23 1 y31 + y32 + y33 1 y21, y22, y23, y31, y32, y33 are binary Selecting values of these variables that satisfy these constraints is equivalent to selecting values of x2 and x3 that satisfy the constraints
CD S7-1-16
Finally, we come to the whole reason for bothering with all of this, namely, that the auxiliary binary variables enable us to formulate a legitimate objective function. Using monetary units of millions of dollars, the three profit columns of Table 3 respectively indicate that
Consequently, the complete BIP model for the Supersuds problem can be formulated on a spreadsheet as shown in Figure 7, where the changing cells Solution (D11:F13) display the values of the auxiliary binary variables. Clicking on the Solve button then provides the optimal solution shown in these changing cells in the figure, namely,
CD S7-1-17
A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 B C D E F G H I
1 2 3
1 2 3 Total
Range Name MaxOfOne NumberOfSpots Profit RequiredSpots Solution Total TotalProfit TotalSpots
14
18
C D Total =SUM(D11:D13)
E =SUM(E11:E13)
F =SUM(F11:F13)
CD S7-1-18
Review Questions
1. 2. 3. 4. 5. What is the distinction between a binary decision variable and an auxiliary binary variable? What is meant by mutually exclusive products? How can an auxiliary binary variable be defined in terms of whether to allow the production of a certain product? How does an either-or constraint arise in Example 2? When two individual constraints are paired together as either-or constraints, how can an auxiliary binary variable be defined in terms of which one of these individual constraints is chosen as the one that must hold? How does restriction 1 for Example 3 relate to the restriction imposed in Example 1? After introducing auxiliary binary variables for Example 3, what constraint on these variables forces choosing at most two of the possible new products as the ones that can be produced? When using the natural (integer) decision variables (x1, x2, x3) defined for Example 4, why is it not possible to write a legitimate objective function in terms of these decision variables to fit integer programming? What are the groups of mutually exclusive alternatives that arise when introducing the auxiliary binary variables for Example 4?
6. 7.
8.
9.
Glossary
auxiliary binary variable A binary variable that is introduced into the model, not to represent a yes-or-no decision, but simply to help formulate the model as a (pure or mixed) BIP problem. either-or constraints A pair of constraints such that either one can be chosen to be observed and then the other one would be ignored.
CD S7-1-19
Problems
To the left of the problems (or their parts), we have inserted an E* whenever Excel should be used (unless your instructor give you contrary instructions).
E* 7s.1.
E* 7s.2.
CD S7-1-20
E* 7s.3. Reconsider the Fly-Right Airplane Co. problem introduced in Problem 7.6. A more detailed analysis of the various cost and revenue factors now has revealed that the potential profit from producing airplanes for each customer cannot be expressed simply in terms of a start-up cost and a fixed marginal net revenue per airplane produced. Instead, the profits are given by the following table.
E* 7s.4.
Reconsider Problem 3.5, where the management of the Omega Manufacturing Company is considering devoting excess production capacity to one or more of three products. (See the Partial Answers to Selected Problems in Appendix C in the back of the book for the optimal solution for Problem 3.5.) Management now has decided to add the restriction that no more than two of the three prospective products should be produced. Use auxiliary binary variables to formulate and solve a mixed BIP model on a spreadsheet for this new version of the problem.