CD S7-1-1 SUPPLEMENT 1 TO CHAPTER 7 ADVANCED FORMULATION TECHNIQUES FOR BINARY INTEGER PROGRAMMING Chapter 7 gives various examples of how yes-or-no decisions can arise. Each such decision is represented by a binary decision variable in a binary integer programming (BIP) model. In addition to any such binary decision variables, other binary variables sometimes are introduced simply to help formulate the model. Here is the terminology to distinguish between the two kinds of binary variables. A binary decision variable is a binary variable that represents a yes-or-no decision. An auxiliary binary variable is an additional 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. Auxiliary binary variables will be denoted by y1, y2, . . . . This supplement to Chapter 7 illustrates some of the ways in which auxiliary binary variables can play a crucial role in being able to formulate the model to fit a standard problem so that the model can be solved. To facilitate focusing on the role of the auxiliary binary variables, the first two examples are variations of the familiar Wyndor Glass Co. problem introduced in Section 2.1 and formulated as a linear programming model on a spreadsheet in Section 2.2. To further refresh your memory, Figure 1 shows the graphical solution originally developed in Section 2.4 for this problem, where the symbol P represents the weekly profit in dollars. Production rate for windows W 8 Optimal solution (2, 6) 6 4 Feasible Region P = 3,600 = 300 D + 500 W 2 0 Figure 1 4 2 Production rate for doors 6 8 10 D This graph summarizes the presentation in Section 2.4 of the application of the graphical method to the original Wyndor problem. 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 CD S7-1-2 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.). Example 1: The Wyndor Problem with Mutually Exclusive Products Change for Example 1: The two potential new products (doors and windows) would compete for the same customers. Therefore, management has decided not to produce both of them together. At most one can be chosen for production, so either D = 0 or W = 0 (or both) 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 W P = 300 D + 500 W Either D = 0 or W = 0 8 Production rate for windows (0, 6) gives P = 3,000 6 4 2 (0, 0) gives P = 0 0 Figure 2 (4, 0) gives P = 1,200 2 4 Production rate for doors 6 8 D The dark line segments show the feasible solutions for Example 1. 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 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. CD S7-1-3 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, proceeding as in Figure 7.8 (including using the safely large coefficient of 99). 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 <= <= <= Hours Available 4 12 18 <= Maximum To Produce 1 Wyndor Glass Co. with Mutually Exclusive Products Doors $300 Unit Profit Plant 1 Plant 2 Plant 3 Hours Used Per Unit Produced 1 0 0 2 3 2 Units Produced Only If Produce Produce? Doors 0 <= 0 0 Windows 6 <= 99 1 Hours Used 0 12 12 Total Produced 1 Total Profit $3,000 Solver Parameters Set Objective Cell: TotalProfit To: Max By Changing (Variable) Cells: UnitsProduced, Produce? Subject to the Constraints: Produce? = binary HoursUsed <= HoursAvailable TotalProduced <= MaximumToProduce UnitsProduced <= OnlyIfProduce B C Only If Produce =99*C16 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 E 6 Hours 7 Used 8 =SUMPRODUCT(C8:D8,UnitsProduced) 9 =SUMPRODUCT(C9:D9,UnitsProduced) 10 =SUMPRODUCT(C10:D10,UnitsProduced) Solver Options: Make Variables Nonnegative Solving Method: Simplex LP 15 Windows $500 D =99*D16 E 14 Total 15 Produced 16 =SUM(Produce?) G 18 Total Profit 19 =SUMPRODUCT(UnitProfit,UnitsProduced) Figure 3 A spreadsheet model for Example 1, where Solver provides the optimal solution shown in the changing cells, UnitsProduced (C13:D13) and Produce? (C16: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 objective cell TotalProfit (G19). 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. Example 2: The Wyndor Problem with Either-Or Constraints Now suppose that the only change from the original Wyndor problem is the one spelled out below. Change for Example 2: The company has just opened a new plant (plant 4) that is similar to plant 3, so the new plant can perform the same operations as plant 3 to help produce the two new products (doors and windows). However, for administrative reasons, management wants just one of the plants to be chosen to work on these products. The plant chosen should be the one that provides the most profitable product mix. Table 1 gives the data for this problem. This table is identical to Table 2.1 for the original problem except for the addition of the data for plant 4. Although the hours of production time are different for plants 3 and 4 (because of differences in the types of production facilities being used), the costs of the operations for each product are essentially the same for the two plants. Therefore, the unit profits in the last row of the table are unaffected by the choice of which plant to use for these products. CD S7-1-6 Table 1 Data for Example 2 Production Time Used for Each Unit Produced (Hours) Plant Doors Windows Production Time Available per Week (Hours) 1 1 0 4 2 0 2 12 3 3 2 18 4 2 4 28 Unit Profit $300 $500 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 3D + 2W ≤ 18 Or 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 (a) Choose Plant 3 (b) Choose Plant 4 W W 8 8 (2, 6) gives P = 3,600 6 6 4 4 (4, 5) gives P = 3,700 Feasible region Feasible region 2 2 0 2 Figure 4 4 D 0 2 4 D 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 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. Formulation with an Auxiliary Binary Variable There are just two possibilities: either 3D + 2W ≤ 18 must hold (due to choosing plant 3) or 2D + 4W ≤ 28 must hold (due to choosing plant 4). Therefore, we can introduce an auxiliary binary variable y to indicate which possibility is chosen by defining y as ⎧1, if 2D + 4W ≤ 28 must hold (choose plant 4) y=⎨ ⎩0, if 3D + 2W ≤ 18 must hold (choose plant 3) CD S7-1-8 This definition is enforced by introducing an extremely large positive number (we will use 99 again) and then making the following changes in the model. Replace by Either 3D + 2W ≤ 18 3D + 2W ≤ 18 + 99y Or 2D + 4W ≤ 28 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 3D + 2W ≤ 18 and 2D + 4W ≤ 28 + 99 (a relatively huge number) so 3D + 2W ≤ 18 must hold but 2D + 4W ≤ 28 does not need to hold 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 3D + 2W ≤ 18 + 99 (a relatively huge number) 2D + 4W ≤ 28 so 3D + 2W ≤ 18 does not need to hold but 2D + 4W ≤ 28 must hold 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 dialog box, we now have a mixed BIP model that can be solved by Solver. Clicking on the Solve button causes Solver to simultaneously choose the value of y and the production rates (D and W) that maximize the total profit given in the objective 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 B C D E F G H Modified Hours Available 4 12 117 28 Hours Available 4 12 18 28 Wyndor Glass Co. Problem with Either-Or Constraints Doors $300 Unit Profit Plant 1 Plant 2 Plant 3 Plant 4 Windows $500 Hours Used 4 10 22 28 Hours Used Per Unit Produced 1 0 0 2 3 2 2 4 Doors 4 Units Produced Windows 5 Total Profit Which Plant to Use? (0=Plant 3, 1=Plant 4) Solver Parameters Set Objective Cell: TotalProfit To: Max By Changing Variable Cells: UnitsProduced, WhichPlantToUse? Subject to the Constraints: WhichPlantToUse? = binary HoursUsed <= ModifiedHoursAvailable <= <= <= <= $3,700 1 Range Name HoursAvailable HoursUsed HoursUsedPerUnitProduced ModifiedHoursAvailable TotalProfit UnitProfit UnitsProduced WhichPlantToUse? Cells H8:H11 E8:E11 C8:D11 G8:G11 H14 C4:D4 C14:D14 E16 Solver Options: Make Variables Nonnegative Solving Method: Simplex LP 5 6 7 8 9 10 11 E F Hours Used =SUMPRODUCT(C8:D8,UnitsProduced) =SUMPRODUCT(C9:D9,UnitsProduced) =SUMPRODUCT(C10:D10,UnitsProduced) =SUMPRODUCT(C11:D11,UnitsProduced) 14 <= <= <= <= G Modified Hours Available =H8 =H9 =H10+99*WhichPlantToUse? =H11+99*(1-WhichPlantToUse?) G H Total Profit =SUMPRODUCT(UnitProfit,UnitsProduced) Figure 5 A spreadsheet model for Example 2, where Solver gives the optimal solution shown in the changing cells, UnitsProduced (C14:D14) and WhichPlantToUse? (E16). CD S7-1-10 Example 3: Imposing Managerial Restrictions The Research and Development Division of the Good Products Company has developed three possible new products. However, to avoid undue diversification of the company’s product line, management has imposed the following restriction: Restriction 1: From the three possible new products, at most two should be chosen to be produced. Each of these products can be produced in either of two plants. For administrative reasons, management has imposed a second restriction in this regard: Restriction 2: Just one of the two plants should be chosen to be the sole producer of the new products. The production cost per unit of each product would be essentially the same in the two plants. However, because of differences in their production facilities, the number of hours of production time needed per unit of each product might differ between the two plants. These data are given in Table 2 along with other relevant information, including marketing estimates of the number of units of each product that could be sold per week if it is produced. According to management, the objective is to choose the products, the plant, and the production rates of the chosen products so as to maximize the total profit. Table 2 Data for Example 3 (The Good Products Co. Problem) Production Time Used for Each Unit Produced (Hours) Plant Product 1 Product 2 Product 3 Production Time Available per Week (Hours) 1 3 4 2 30 2 4 6 2 40 Unit Profit 5 7 3 ($thousands) Sales potential 7 5 9 (units per week) 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 1–13 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 , are needed as constraints in the model. 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 B C D E F G H I <= <= Modified Hours Available 129 40 Hours Available 30 40 <= Maximum To Produce 2 Good Products Co. with Managerial Restrictions Unit Profit ($thousands) Product 1 5 Only If Produce Maximum Sales Product 3 3 Product 1 5.5 <= 7 7 Product 2 0 <= 0 5 Product 3 9 <= 9 9 1 0 1 Produce? Which Plant to Use? (0=Plant 1, 1=Plant 2) Solver Parameters Set Objective Cell: TotalProfit To: Max By Changing Variable Cells: UnitsProduced, Produce?, WhichPlantToUse? Subject to the Constraints: Produce? = binary WhichPlantToUse? = binary HoursUsed <= ModifiedHoursAvailable TotalProduced <= MaximumToProduce UnitsProduced <= OnlyIfProduce Solver Options: Make Variables Nonnegative Solving Method: Simplex LP 5 6 7 8 9 F F 15 Total 16 Produced 17 =SUM(Produce?) Figure 6 Total Produced 2 Total Profit ($thousands) 54.5 1 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 G Hours Used =SUMPRODUCT(C8:E8,UnitsProduced) =SUMPRODUCT(C9:E9,UnitsProduced) 14 Hours Used 34.5 40 Hours Used Per Unit Produced 3 4 2 4 6 2 Plant 1 Plant 2 Units Produced Product 2 7 H Modified Hours Available <= =I8+99*WhichPlantToUse? <= =I9+99*(1-WhichPlantToUse?) B C Only If Produce =C15*C17 D =D15*D17 E =E15*E17 H 19 Total Profit 20 ($thousands) 21 =SUMPRODUCT(UnitProfit,UnitsProduced) A spreadsheet formulation of the BIP model for the Good Products Co. problem, where 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 3x1 + 4x2 + 2x3 ≤ 30 Or 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. Formulation with Auxiliary Binary Variables Except for involving more products and choices, restriction 1 is similar to the restriction imposed in Example 1. For Example 1, there were just two new products, and the restriction was that at most one could be chosen to be produced. Following the formulation approach used there, we can deal with restriction 1 by introducing three auxiliary binary variables (y1, y2, y3) with the interpretation that ⎧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 products—x1 ≤ 7, x2 ≤ 5, and x3 ≤ 9—by 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 13–21 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 figure—give 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 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 51⁄2 units per week for product 1 and 9 units per week for product 3. The resulting total profit given in the objective cell TotalProfit (H21) is $54,500 per week. Example 4: Violating Proportionality The Supersuds Corporation is developing its marketing plans for next year’s new products. For three of these products, the decision has been made to purchase a total of five TV spots for commercials on national television networks. Each spot will feature a single product. Therefore, the problem on which we will focus is how to allocate the five spots to these three products, with a maximum of three spots (and a minimum of zero) for each product. Table 3 shows the estimated impact of allocating zero, one, two, or three spots to each product. This impact is measured in terms of the profit from the additional sales that would result from the spots, considering also the cost of producing the commercial and purchasing the spots. The objective is to allocate five spots to the products so as to maximize the total profit. This problem is small enough that it can be solved easily by trial and error. (The optimal solution is to allocate two spots to product 1, no spots to product 2, and three spots to product 3.) However, we will show one formulation with auxiliary binary variables for illustrative purposes. Such a formulation would become necessary if this small problem needed to be incorporated into a larger model involving the allocation of resources to marketing activities for all the corporation’s new products. CD S7-1-14 Table 3 Data for Example 4 (the Supersuds Corp. Problem) Profit (Millions) Number of TV Spots Product 1 Product 2 Product 3 0 $0 $0 $0 1 1 0 –1 2 3 2 2 3 3 3 4 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. Maximize P = ? subject to and x1 ≤ 3 x2 ≤ 3 x3 ≤ 3 x1 + x2 + x3 = 5 x1 ≥ 0 x2 ≥ 0 x3 ≥ 0 x1, x2, x3 are integers CD S7-1-15 Now see what happens when we introduce nine auxiliary binary variables with the following interpretations: ⎧⎪ y11 = ⎨ ⎪⎩ ⎧⎪ y21 = ⎨ ⎪⎩ ⎧⎪ y31 = ⎨ ⎩⎪ 1, if x1 = 1 0, otherwise 1, if x2 = 1 0, otherwise 1, if x3 = 1 0, otherwise ⎧⎪ y12 = ⎨ ⎪⎩ ⎧⎪ y22 = ⎨ ⎪⎩ ⎧⎪ y32 = ⎨ ⎩⎪ 1, if x1 = 2 0, otherwise 1, if x2 = 2 0, otherwise 1, if x3 = 2 0, otherwise ⎧⎪ y13 = ⎨ ⎪⎩ ⎧⎪ y23 = ⎨ ⎪⎩ ⎧⎪ y33 = ⎨ ⎩⎪ 1, if x1 = 3 0, otherwise 1, if x2 = 3 0, otherwise 1, if x3 = 3 0, otherwise For example, look at the definitions of y11, y12, and y13. These definitions imply that (y11, y12, y13) = (0, 0, 0) if x1 = 0 (y11, y12, y13) = (1, 0, 0) if x1 = 1 (y11, y12, y13) = (0, 1, 0) if x1 = 2 (y11, y12, y13) = (0, 0, 1) if 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 x2 ≤ 3 x3 ≤ 3 x2 ≥ 0, x3 ≥ 0 x2, x3 are integers CD S7-1-16 Therefore, we now can formulate a model for the Supersuds problem in terms of these auxiliary binary variables by including the above constraints on these variables. We also need to add a constraint that will ensure that the original constraint, x1 + x2 + x3 = 5 still will hold. The key here is to note that the definitions of the auxiliary binary variables imply that x1 = y11 + 2y12 + 3y13 x2 = y21 + 2y22 + 3y23 x1 = y31 + 2y32 + 3y33 Therefore, the original constraint can be replaced by the constraint y11 + 2y12 + 3y13 + y21 + 2y22 + 3y23 + y31 + 2y32 + 3y33 = 5 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 Profit from product 1 = y11 + 3y12 + 3y13 Profit from product 2 = 2y22 + 3y23 Profit from product 3 = –y31 + 2y32 + 4y33 Therefore, adding these three profits, the total profit is P = y11 + 3y12 + 3y13 + 2y22 + 3y23 – y31 + 2y32 + 4y33 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, y11 = 0 y12 = 1 y13 = 0 so x1 = 2 (allocate 2 TV spots to product 1) y21 = 0 y22 = 0 y23 = 0 so x2 = 0 (allocate 0 TV spots to product 2) y31 = 0 y32 = 0 y33 = 1 so x3 = 3 (allocate 3 TV spots to product 3) which yields a profit of P = 7 ($7 million), according to the objective cell TotalProfit (I13). The number of TV spots being allocated to the respective products is shown in NumberOfSpots (D18:F18). 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 H I Supersuds Corp. Marketing Plan Profit ($millions) Number of Spots Solution Number of Spots 1 2 3 1 2 3 Total Max Of One Product 1 1 3 3 Product 2 0 2 3 Product 3 -1 2 4 Product 1 0 1 0 1 <= 1 Product 2 0 0 0 0 <= 1 Product 3 0 0 1 1 <= 1 2 0 3 Number of Spots Solver Options: Make Variables Nonnegative Solving Method: Simplex LP 14 C D Total =SUM(D11:D13) Total Profit ($millions) 7 Total Spots 5 = Range Name MaxOfOne NumberOfSpots Profit RequiredSpots Solution Total TotalProfit TotalSpots Solver Parameters Set Objective Cell: TotalProfit To: Max By Changing Variable Cells: Solution Subject to the Constraints: Solution = binary Total <= MaxOfOne TotalSpots = RequiredSpots 18 G Required Spots 5 Cells D16:F16 D18:F18 D5:F7 I18 D11:F13 D14:F14 I13 G18 I 10 Total 11 Profit 12 ($millions) 13 =SUMPRODUCT(Profit,Solution) E =SUM(E11:E13) F =SUM(F11:F13) C D E Number of Spots =SUMPRODUCT(C11:C13,D11:D13) =SUMPRODUCT(C11:C13,E11:E13) G 16 Total 17 Spots 18 =SUM(NumberOfSpots) Figure 7 A spreadsheet formulation of the BIP model for the Supersuds problem, where the optimal solution obtained by Solver is given in Solution (D11:F13), which yields NumberOfSpots (D18:F:18). CD S7-1-18 REVIEW QUESTIONS 1. What is the distinction between a binary decision variable and an auxiliary binary variable? 2. What is meant by mutually exclusive products? 3. How can an auxiliary binary variable be defined in terms of whether to allow the production of a certain product? 4. How does an either-or constraint arise in Example 2? 5. 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? 6. How does restriction 1 for Example 3 relate to the restriction imposed in Example 1? 7. 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? 8. 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? 9. What are the groups of mutually exclusive alternatives that arise when introducing the auxiliary binary variables for Example 4? 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. The research and Development Division of the Progressing Company has been developing four possible new product lines. Management must now make a decision as to which of these four products actually will be produced and at what levels. Therefore, a management science study has been requested to find the most profitable product mix. A substantial cost is associated with beginning the production of any product, as given in the first row of the following table. Management’s objective is to find the product mix that maximizes the total profit (total net revenue minus start-up costs). Start-up cost Marginal revenue 1 $50,000 70 Product 2 3 $40,000 $70,000 60 90 4 $60,000 80 Let the continuous decision variables x1, x2, x3, and x4 be the total number of units produced of products 1, 2, 3, and 4, respectively. Management has imposed the following policy constraints on these variables: 1. No more than two of the products can be produced. 2. Either product 3 or 4 can be produced only if either product 1 or 2 is produced. 3. Either 5x1 + 3x2 + or 4x1 + 6x2 + 3x3 + 5x4 ≤ 6,000 6x3 + 4x4 ≤ 6,000 Use auxiliary binary variables to formulate and solve a mixed BIP model on a spreadsheet for this problem. E* 7s.2. The Toys-R-4-U Company has developed two new toys for possible inclusion in its product line for the upcoming Christmas season. Setting up the production facilities to begin production would cost $50,000 for toy 1 and $80,000 for toy 2. Once these costs are covered, the toys would generate a unit profit of $10 for toy 1 and $15 for toy 2. The company has two factories that are capable of producing these toys. However, to avoid doubling the start-up costs, just one factory would be used, where the choice would be based on maximizing profit. For administrative reasons, the same factory would be used for both new toys if both are produced. Toy 1 can be produced at a rate of 50 per hour in factory 1 and 40 per hour in factory 2. Toy 2 can be produced at the rate of 40 per hour in factory 1 and 25 per hour in factory 2. Factories 1 and 2, respectively, have 500 hours and 700 hours of production time available before Christmas that could be used to produce these toys. It is not known whether these two toys would be continued after Christmas. Therefore, the problem is to determine how many units (if any) of each new toy should be produced before Christmas to maximize the total profit. Formulate and solve a mixed BIP model on a spreadsheet for this problem. CD S7-1-20 E* 7s.3. Reconsider the Fly-Right Airplane Co. problem introduced in Problem 7.7. 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. Airplanes Produced 0 1 2 3 4 5 Customer 1 0 –$1 2 4 Profit (Millions) Customer 2 0 $1 5 Customer 3 0 $1 3 5 6 7 Use auxiliary binary variables to formulate and solve a BIP model on a spreadsheet for this new version of the problem. E* 7s.4. Reconsider Problem 3.6, 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 B in the back of the book for the optimal solution for Problem 3.6.) 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. E* 7s.5. Consider the following algebraic form of an integer programming model: Maximize Profit = 4x12 – x13 + 10x22 – x24 subject to x1 + x2 ≤ 3 and x1 ≥ 0 x2 ≥ 0 x1 and x2 are integers E* a. Reformulate this model in algebraic form as a pure BIP model with six binary variables. b. Display and solve this model on a spreadsheet. c. Reexpress the optimal solution obtained in part b in terms of the variables, x1 and x2, for the original model.
© Copyright 2025 Paperzz