Download presentation
Presentation is loading. Please wait.
Published byCarmel Audra Johnston Modified over 9 years ago
1
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.1 Table of Contents Chapter 9 (Integer Programming) General Integer Programming (Section 9.1)9.2–9.12 A Case Study: California Manufacturing (Section 9.2)9.13–9.19 Some Other Applications (Section 9.3)9.20–9.21 Other Formulation Possibilities: Wyndor with Setup Costs (Section 9.4)9.22–9.27 Other Formulation Possibilities: Mutually Exclusive Products (Section 9.4)9.28–9.31 Other Formulation Possibilities: Either-Or Constraints (Section 9.4)9.32–9.36 Some Formulation Examples: Good Products (Section 9.5)9.37–9.40 Some Formulation Examples: Supersuds (Section 9.5)9.41–9.44 Some Formulation Examples: Southwestern Airways (Section 9.5)9.45–9.49 Introduction to Integer Programming (UW Lecture)9.50–9.65 These slides are based upon a lecture from the MBA core-course in Management Science at the University of Washington (as taught by one of the authors). Applications of Integer Programming (UW Lecture)9.66–9.78 These slides are based upon a lecture from the MBA elective “Modeling with Spreadsheets” at the University of Washington (as taught by one of the authors).
2
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.2 Assumptions of linear programming Proportionality: the gross margin and resource requirements per unit of activity are assumed to be constant regardless of the level of the activity use Additivity: no interaction effects between activities Homogeneity: all units of the same resource or activity are identical Continuity: resources can be used and activities produced in any fractional units Deterministic coefficients: all coefficients in the model are known with certainty Optimization: One proper objective function to be maximized or minimized Finiteness: only a finite number of activities and constraints is considered
3
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.3 The TBA Airlines Problem TBA Airlines is a small regional company that specializes in short flights in small airplanes. The company has been doing well and has decided to expand its operations. The basic issue facing management is whether to purchase more small airplanes to add some new short flights, or start moving into the national market by purchasing some large airplanes, or both. Question: How many airplanes of each type should be purchased to maximize their total net annual profit?
4
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.4 Data for the TBA Airlines Problem Small Airplane Large Airplane Capital Available Net annual profit per airplane$1 million$5 million Purchase cost per airplane5 million50 million$100 million Maximum purchase quantity2—
5
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.5 Linear Programming Formulation LetS = Number of small airplanes to purchase L = Number of large airplanes to purchase Maximize Profit = S + 5L ($millions) subject to Capital Available:5S + 50L ≤ 100 ($millions) Max Small Planes:S ≤ 2 and S ≥ 0, L ≥ 0.
6
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.6 Graphical Method for Linear Programming
7
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.7 Violates Divisibility Assumption of LP Divisibility Assumption of Linear Programming: Decision variables in a linear programming model are allowed to have any values, including fractional values, that satisfy the functional and nonnegativity constraints. Thus, these variables are not restricted to just integer values. Since the number of airplanes purchased by TBA must have an integer value, the divisibility assumption is violated.
8
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.8 Integer Programming Formulation LetS = Number of small airplanes to purchase L = Number of large airplanes to purchase Maximize Profit = S + 5L ($millions) subject to Capital Available:5S + 50L ≤ 100 ($millions) Max Small Planes:S ≤ 2 and S ≥ 0, L ≥ 0 S, L are integers.
9
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.9 Graphical Method for Integer Programming When an integer programming problem has just two decision variables, its optimal solution can be found by applying the graphical method for linear programming with just one change at the end. We begin as usual by graphing the feasible region for the LP relaxation, determining the slope of the objective function lines, and moving a straight edge with this slope through this feasible region in the direction of improving values of the objective function. However, rather than stopping at the last instant the straight edge passes through this feasible region, we now stop at the last instant the straight edge passes through an integer point that lies within this feasible region. This integer point is the optimal solution.
10
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.10 Graphical Method for Integer Programming
11
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.11 Spreadsheet Model
12
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.12 Types of Integer Programming Problems Pure integer programming problems are those where all the decision variables must be integers. Mixed integer programming problems only require some of the variables (the “integer variables”) to have integer values so the divisibility assumption holds for the rest (the “continuous variables”). Binary variables are variables whose only possible values are 0 and 1. Binary integer programming (BIP) problems are those where all the decision variables restricted to integer values are further restricted to be binary variables. –Such problems can be further characterized as either pure BIP problems or mixed BIP problems, depending on whether all the decision variables or only some of them are binary variables.
13
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.13 Applications of Binary Variables Since binary variables only provide two choices, they are ideally suited to be the decision variables when dealing with yes-or-no decisions. Examples: –Should we undertake a particular fixed project? –Should we make a particular fixed investment? –Should we locate a facility in a particular site?
14
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.14 The capital budgeting decision is a matter of choosing among n alternatives in order to maximize the return, subject to constraints on the amount of capital invested over time. Capital Budgeting: An Expansion Decision Applications of Binary Variables For example, suppose that AutoPower’s board of directors faces the following data:
15
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.15 Expand Belgian Plant 400 100 50 200 100 0 Expand Sm. Machine Capacity in US 700 300 200 100 100 100 Establish New Plant in Chile 800 100 200 270 200 100 Expand Lg. Machine Capacity in US 1000 200 100 400 200 200 Capital Available 500 450 700 400 300 ALTERNATIVE PRESENT VALUE OF NET RETURN ($000s) CAPTIAL REQUIRED IN YEAR BY ALTERNATIVE ($000s) 1 2 3 4 5 The Board must select one or more of these alternatives:
16
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.16 An ILP Model for Capital Budgeting at AutoPower: binary0-1 ILP An ILP Model for Capital Budgeting at AutoPower: This model can be modeled as an ILP (called a binary or 0-1 ILP model) in which all the variables are binary variables. Let x i = 1 if project i is accepted and x i = 0 if project i is not accepted. The model becomes:
17
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.17 Max 400x 1 + 700x 2 + 800x 3 + 1000x 4 s.t. 100x 1 + 300x 2 + 100x 3 + 200x 4 < 500 50x 1 + 200x 2 + 200x 3 + 100x 4 < 450 200x 1 + 100x 2 + 270x 3 + 400x 4 < 700 100x 1 + 100x 2 + 200x 3 + 200x 4 < 400 100x 2 + 100x 3 + 200x 4 < 300 x i = 0 or 1; i = 1, 2, 3, 4 Present value from accepted projects Capital required in year 1 Capital available in year 1
18
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.18 The LP Relaxation: The LP Relaxation: First, approach this model by solving the LP relaxation. =SUMPRODUCT(Decisions, C5:F5)=H7-G7Note: named ranges were used to improve readability of models.
19
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.19 Note that your solution may differ because the model has alternative optimal solutions. In the LP relaxation model, x i was constrained to be less than or equal to 1. This resulted in fractional values (0<x i <1) for the decision variables. Since we are looking for 1’s (yes) and 0’s (no), these fractional values are not meaningful. In addition, rounding these values would not work very well. Rounding to: x 1 = 1, x 2 = 1, x 3 = 0, x 4 = 1 would result in an infeasible solution.
20
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.20 integer programming The optimal ILP solution can be obtained using Solver’s integer programming option. Use the bin option to force all four of the decision variables to 0-1 values
21
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.21 The Premium Edition Solver for Education produces a different Solver Results completion message for ILPs to remind you that the ILP solution may not be optimal.
22
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.22 The default Tolerance field on the Solver Options dialog (relevant only for ILP models) is 5%. This means that the Solver ILP optimization procedure is continued only until the ILP solution OV is within 5% of the ILP’s optimum OV. A higher Tolerance speeds up Solver at the risk of a reported solution further from the true ILP optimum. Setting Tolerance to 0% forces Solver to find the ILP optimum but with much longer solution times.
23
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.23 An important use of binary variables is to impose constraints that arise from logical conditions. Logical Conditions Applications of Binary Variables No More Than k of n Alternatives: Let x i = 0 or 1, for i = 1, 2, …, n The constraint x 1 + x 2 + … + x n < k implies that, at most, k alternatives of n possibilities can be selected (i.e., not more than k x i can equal 1).
24
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.24 For example, adding the constraint: x 1 + x 3 < 1 to the previous AutoPower example, implies that the solution can contain at most one of the overseas alternatives. Dependent Decisions: Dependent Decisions: You can use 0-1 variables to force a dependent relationship on two or more decisions.
25
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.25 For example, suppose that AutoPower’s management does not want to select alternative k unless it first selects alternative m. The following constraint enforces this condition: If alternative m is not selected, then x m = 0 which forces x k to be 0 (i.e., not selected). x k < x m or equivalently x k - x m < 0 If alternative m is selected, then x m = 1 and x k < 1. Solver is then free to select 0 or 1 for x k.
26
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.26 Lot Size Constraints: Lot Size Constraints: A portfolio manager is considering purchasing security j. Let x j be the number of shares purchased. Consider the following constraints: minimum lot sizebatch size 1. If he purchases security j, he must purchase at least 200 shares (called a minimum lot size or batch size constraint) 2. He may not purchase more than 1000 shares of security j. 200 < x j < 1000 These constraints insist that x j always be at least 200. We want the conditions to be either x j = 0 or 200 < x j < 1000.
27
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.27 To achieve the constraint conditions, use a binary variable, say y j, for security j. If y j = 1, then purchase security j The constraints are: x j < 1000y j x j > 200y j If y = 1, then the above constraints imply that 200 < x j < 1000 (purchase j). If y = 0, then the above constraints imply that x j = 0 (do not purchase j). If y j = 0, do not purchase security j These 2 constraints together guarantee the “minimum lot size” constraint.
28
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.28 K of m Constraints: K of m Constraints: In general notation, let the “superset” of m constraints on a model’s (non-binary) decision variables, x i, be g i (x 1, …, x n ) < b i, for i = 1, …, m Now, introduce m additional 0-1 decision variables y i to the model, and let M be chosen as a very large number, so large that, for each i, g i (x i, …, x n ) < M for every x satisfying any set of k inequalities taken from the above m.
29
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.29 The following m + 1 constraints express the desired condition: m i=1 y i = k i This constraint forces exactly k of the new y i decision variables to have the value 1. g i (x 1, …, x n ) < b i y i + M(1- y i ), i=1, …, m Exactly k of the inequality constraints are equivalent to: g i (x 1, …, x n ) < b i The remaining m-k inequality constraints are equivalent to: g i (x 1, …, x n ) < M The very large number choice for M causes each such constraint to be redundant and not affect the model’s optimal solution.
30
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.30 K of m Constraints Example: K of m Constraints Example: Assume a company must find production quantities of three products (x 1, x 2, x 3 ) as part of a large LP model. Within the LP formulation, the company must choose one or the other (but not both) of two different production technologies for the 3 products. Here are the two constraints: 30x 1 + 20x 2 + 10x 3 < 100 (Technology 1) 10x 1 + 30x 2 + 5x 3 < 110 (Technology 2)
31
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.31 These constraints cannot be added directly to the LP model. Instead, add two new binary decision variables (y 1 and y 2 ) to the LP model, making it an ILP model. y 1 = 1 “Solver, choose Technology 1” y 1 = 0 “Solver, do not choose Technology 1” y 2 = 1 “Solver, choose Technology 2” y 2 = 0 “Solver, do not choose Technology 2”
32
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.32 The original constraints are then modified: 30x 1 + 20x 2 + 10x 3 < 100y 1 + 999999(1-y 1 ) 10x 1 + 30x 2 + 5x 3 < 110y 2 + 999999(1-y 2 ) y 1 + y 2 = 1 Forces Solver to choose exactly one technology option 999999 was chosen to guarantee that one or the other constraint will be redundant for the whole LP model
33
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.33 A Fixed Charge Model In order to conserve capital, STECO, an electronics parts wholesaler, leases regional warehouses for its use. The cost per month to lease warehouse i is F i. Warehouse i can load a maximum of T i trucks per month. There are four sales districts, and the typical monthly demand in district j is d j truckloads. The average cost of sending a truck from warehouse i to district j is c ij.
34
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.34 STECO wants to know which warehouses to lease and how many trucks to send from each warehouse to each district. STECO pays no lease cost for a given warehouse unless at least one truck is dispatched from it, and then it pays the full monthly lease amount. fixed charge models Lot size models incorporating this cost behavior are common and are called fixed charge models.
35
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.35 Here is the network flow diagram:ABC 1243 Leasing cost/mth for warehouses F A F B F C Capacity (truckloads) T A T B T C Warehouses Districts Demands per month d 1 d 2 d 3 d 4
36
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.36 Here are the data for this model: A 170 40 70 160 200 7750 B 150 195 100 10 250 4000 C 100 240 140 60 300 5500 Monthly Demand (truck loads) 100 90 110 60 WAREHOUSE Monthly Capacity (No. of Trucks) Cost Per Truck Sales District ($) 1 2 3 4 Monthly Leasing Costs ($)
37
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.37 A Fixed Charge Model Modeling Considerations: Define y i as a binary decision variable and let: y i = 1 if warehouse i is leased y i = 0 if warehouse i is not leased Although it may seem logical to treat the number of trucks sent from a warehouse to a district as an integer variable, in reality, there are three arguments as to why we should not:
38
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.38 1. This is a planning model, not a detailed operating model. 2. Treating the number of trucks as integer variables may make the model more difficult to optimize. 3. It costs more to lease one of the warehouses than to send a truck from a warehouse to a sales district.
39
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.39 A Fixed Charge Model The MILP Model To model STECO’s model as an MILP, let y i = 1 if warehouse i is leased, i=A, B, C y i = 0 if warehouse i is not leased x ij = number of trucks sent from warehouse i to district j i=A, B, C; j=1, 2, 3, 4
40
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.40 Min 7750y A + 4000y B + 5500y C + 170x A1 + … + 60x C4 Total leasing cost Total truck cost x A1 + x B1 + x C1 > 100demand at district 1 Demand Constraints: x A2 + x B2 + x C2 > 90demand at district 2 x A3 + x B3 + x C3 > 110demand at district 3 x A4 + x B4 + x C4 > 60demand at district 4 These four constraints guarantee that demand will be satisfied at the respective sales district. Objective Function:
41
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.41 x A1 + x A2 + x A3 + x A4 < 200y A or Capacity Constraints (for each warehouse): These constraints serve 2 purposes: x A1 + x A2 + x A3 + x A4 - 200y A < 0 1. It guarantees that capacity at warehouse i is not exceeded. 2. It forces STECO to lease warehouse i if anything is sent out of it. x B1 + x B2 + x B3 + x B4 < 250y B x C1 + x C2 + x C3 + x C4 < 300y C
42
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.42 Here is the Solved spreadsheet model: =J4*C9=C9*C4=E4*E9=C16+I16
43
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.43 Here are the Solver parameters:
44
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.44 In conclusion, the optimal solution to this model with integer supplies and demands will always include an integer allocation of trucks. A Fixed Charge Model The argument involves two steps: 1. The optimal solution must lease some set of warehouses, and 2. Every possible set of leased warehouses yields an integer allocation of trucks.
45
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.45 Some Other Applications Investment Analysis –Should we make a certain fixed investment? –Examples: Turkish Petroleum Refineries (1990), South African National Defense Force (1997), Grantham, Mayo, Van Otterloo and Company (1999) Site Selection –Should a certain site be selected for the location of a new facility? –Example: AT&T (1990) Designing a Production and Distribution Network –Should a certain plant remain open? Should a certain site be selected for a new plant? Should a distribution center remain open? Should a certain site be selected for a new distribution center? Should a certain distribution center be assigned to serve a certain market area? –Examples: Ault Foods (1994), Digital Equipment Corporation (1995) All references available for download at www.mhhe.com/hillier2e/articles
46
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.46 Some Other Applications Dispatching Shipments –Should a certain route be selected for a truck? Should a certain size truck be used? Should a certain time period for departure be used? –Examples: Quality Stores (1987), Air Products and Chemicals, Inc. (1983), Reynolds Metals Co. (1991), Sears, Roebuck and Company (1999) Scheduling Interrelated Activities –Should a certain activity begin in a certain time period? –Examples: Texas Stadium (1983), China (1995) Scheduling Asset Divestitures –Should a certain asset be sold in a certain time period? –Example: Homart Development (1987) Airline Applications: –Should a certain type of airplane be assigned to a certain flight leg? Should a certain sequence of flight legs be assigned to a crew? –Examples: American Airlines (1989, 1991), Air New Zealand (2001) All references available for download at www.mhhe.com/hillier2e/articles
47
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.47 Wyndor with Setup Costs (Variation 1) Suppose that two changes are made to the original Wyndor problem: 1.For each product, producing any units requires a substantial one-time setup cost for setting up the production facilities. 2.The production runs for these products will be ended after one week, so D and W in the original model now represent the total number of doors and windows produced, respectively, rather than production rates. Therefore, these two variables need to be restricted to integer values.
48
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.48 Graphical Solution to Original Wyndor Problem
49
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.49 Net Profit for Wyndor Problem with Setup Costs Net Profit ($) Number of Units ProducedDoorsWindows 00(300) – 0 = 00 (500) – 0 = 0 11(300) – 700 = –4001(500) – 1,300 = –800 22(300) – 700 = –1002(500) – 1,300 = –300 33(300) – 700 = 2003(500) – 1,300 = 200 44(300) – 700 = 5004(500) – 1,300 = 700 5Not feasible5(500) – 1,300 = 1,200 6Not feasible6(500) – 1,300 = 1,700
50
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.50 Feasible Solutions for Wyndor with Setup Costs
51
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.51 Algebraic Formulation LetD = Number of doors to produce, W = Number of windows to produce, y 1 = 1 if perform setup to produce doors; 0 otherwise, y 2 = 1 if perform setup to produce windows; 0 otherwise. Maximize P = 300D + 500W – 700y 1 – 1,300y 2 subject to Original Constraints: Plant 1:D ≤ 4 Plant 2:2W ≤ 12 Plant 3:3D + 2W ≤ 18 Produce only if Setup: Doors:D ≤ 99y 1 Windows:W ≤ 99y 2 and D ≥ 0, W ≥ 0, y 1 and y 2 are binary.
52
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.52 Spreadsheet Model
53
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.53 Wyndor with Mutually Exclusive Products (Variation 2) Suppose that now the only change from the original Wyndor problem is: 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.
54
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.54 Feasible Solution for Wyndor with Mutually Exclusive Products
55
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.55 Algebraic Formulation LetD = Number of doors to produce, W = Number of windows to produce, y 1 = 1 if produce doors; 0 otherwise, y 2 = 1 if produce windows; 0 otherwise. Maximize P = 300D + 500W subject to Original Constraints: Plant 1:D ≤ 4 Plant 2:2W ≤ 12 Plant 3:3D + 2W ≤ 18 Auxiliary variables must =1 if produce any: Doors:D ≤ 99y 1 Windows:W ≤ 99y 2 Mutually Exclusive:y 1 + y 2 ≤ 1 and D ≥ 0, W ≥ 0, y 1 and y 2 are binary.
56
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.56 Spreadsheet Model
57
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.57 Wyndor with Either-Or Constraints (Variation 3) Suppose that now the only change from the original Wyndor problem is: 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, management wants just one of the plants to be chosen to work on these new products. The plant chosen should be the one that provides the most profitable product mix.
58
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.58 Data for Wyndor with Either-Or Constraints (Variation 3) Production Time Used for Each Unit Produced (Hours) Production Time Available per Week (Hours) PlantDoorsWindows 1104 20212 33218 42428 Unit Profit$300$500
59
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.59 Graphical Solution with Plant 3 or Plant 4
60
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.60 Algebraic Formulation LetD = Number of doors to produce, W = Number of windows to produce, y = 1 if plant 4 is used; 0 if plant 3 is used Maximize P = 300D + 500W subject to Plant 1:D ≤ 4 Plant 2:2W ≤ 12 Plant 3:3D + 2W ≤ 18 + 99y Plant 4:2D + 4W ≤ 28 + 99(1 – y) and D ≥ 0, W ≥ 0, y 1 and y 2 are binary.
61
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.61 Spreadsheet Model
62
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.62 Good Products Company Production Planning The Research and Development Division of the Good Products Company has developed three possible new products. To avoid undue diversification of the company’s product line, management has imposed the following restriction: –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 the following restriction: –Just one of the two plants should be chosen to be the sole producer of the two new products.
63
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.63 Data for the Good Products Company Production Time Used for Each Unit Produced (Hours) Production Time Available per Week (Hours) PlantProduct 1Product 2Product 3 134230 246240 Unit Profit573($thousands) Sales potential759(units per week)
64
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.64 Algebraic Formulation Letx i = Number of units of product i to produce per week (i = 1, 2, 3), y i = 1 if product i is produced; 0 otherwise (i = 1, 2, 3), y 4 = 1 if plant 2 is used; 0 if plant 1 is used Maximize Profit = 5x 1 + 7x 2 + 3x 3 ($thousands) subject to Auxiliary variables must =1 if produce any & Max Sales: Product 1:x 1 ≤ 7y 1 Product 2:x 2 ≤ 5y 2 Product 3:x 3 ≤ 9y 3 Either plant 1 (y 4 = 0) or plant 2 (y 4 = 1): Plant 1:3x 1 + 4x 2 + 2x 3 + 99y 4 ≤ 30 Plant 2:4x 1 + 6x 2 + 2x 3 + 99(1 – y 4 ) ≤ 40 and x i ≥ 0 (i = 1, 2, 3), y i are binary (i = 1, 2, 3, 4).
65
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.65 Spreadsheet Model
66
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.66 Supersuds Corporation Marketing Plan The Supersuds Corporation is developing its marketing plan 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. Question: How should the five spots be allocated to these three products?
67
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.67 Data for the Supersuds Corp. Problem Profit (Millions) Number of TV SpotsProduct 1Product 2Product 3 0$0 110–1 2322 3334
68
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.68 Algebraic Formulation Lety ij = 1 if there are j TV spots for product i; 0 otherwise (i = 1, 2, 3; j = 1, 2, 3) Maximize Profit = y 11 + 3y 12 + 3y 13 + 2y 22 + 3y 23 – y 31 + 2y 32 + 4y 33 ($millions) subject to Mutually Exclusive: Product 1:y 11 + y 12 + y 13 ≤ 1 Product 2:y 21 + y 22 + y 23 ≤ 1 Product 3:y 31 + y 32 + y 33 ≤ 1 Total available spots:y 11 + 2y 12 + 3y 13 + y 21 + 2y 22 + 3y 23 + y 31 + 2y 32 + 3y 33 ≤ 5 and y ij are binary (i = 1, 2, 3; j = 1, 2, 3).
69
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.69 Spreadsheet Model
70
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.70 Southwestern Airways Crew Scheduling Southwestern Airways needs to assign crews to cover all its upcoming flights. We will focus on assigning 3 crews based in San Francisco (SFO) to 11 flights. Question: How should the 3 crews be assigned 3 sequences of flights so that every one of the 11 flights is covered?
71
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.71 Southwestern Airways Flights
72
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.72 Data for the Southwestern Airways Problem Feasible Sequence of Flights Flights123456789101112 1. SFO–LAX1111 2. SFO–DEN1111 3. SFO–SEA1111 4. LAX–ORD22323 5. LAX–SFO2355 6. ORD–DEN334 7. ORD–SEA33334 8. DEN–SFO2445 9. DEN–ORD222 10. SEA–SFO2445 11. SEA–LAX22442 Cost, $1,000s234675789989
73
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.73 Algebraic Formulation Letx j = 1 if flight sequence j is assigned to a crew; 0 otherwise. (j = 1, 2, …, 12). Minimize Cost = 2x 1 + 3x 2 + 4x 3 + 6x 4 + 7x 5 + 5x 6 + 7x 7 + 8x 8 + 9x 9 + 9x 10 + 8x 11 + 9x 12 (in $thousands) subject to Flight 1 covered:x 1 + x 4 + x 7 + x 10 ≥ 1 Flight 2 covered:x 2 + x 5 + x 8 + x 11 ≥ 1 :: Flight 11 covered:x 6 + x 9 + x 10 + x 11 + x 12 ≥ 1 Three Crews:x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 + x 10 + x 11 + x 12 ≤ 3 and x j are binary (j = 1, 2, …, 12).
74
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.74 Spreadsheet Model
75
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.75 Integer Programming When are “non-integer” solutions okay? –Solution is naturally divisible e.g., $, pounds, hours –Solution represents a rate e.g., units per week –Solution only for planning purposes When is rounding okay? –When numbers are large e.g., rounding 114.286 to 114 is probably okay. When is rounding not okay? –When numbers are small e.g., rounding 2.6 to 2 or 3 may be a problem. –Binary variables yes-or-no decisions
76
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.76 The Challenges of Rounding Rounded Solution may not be feasible. Rounded solution may not be close to optimal. There can be many rounded solutions. –Example: Consider a problem with 30 variables that are non- integer in the LP-solution. How many possible rounded solutions are there?
77
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.77 How Integer Programs are Solved
78
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.78 How Integer Programs are Solved
79
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.79 Applications of Binary Variables Making “yes-or-no” type decisions –Build a factory? –Manufacture a product? –Do a project? –Assign a person to a task? Set-covering problems –Make a set of assignments that “cover” a set of requirements. Fixed costs –If a product is produced, must incur a fixed setup cost. –If a warehouse is operated, must incur a fixed cost.
80
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.80 Example #1 (Capital Budgeting) Norwood Development is considering the potential of four different development projects. Each project would be completed in at most three years. The required cash outflow for each project is given in the table below, along with the net present value of each project to Norwood, and the cash that is available each year. Cash Outflow Required ($million) Cash Available ($million) Project 1Project 2Project 3Project 4 Year 19761128 Year 2643013 Year 3604010 NPV30162214 Question: Which projects should be undertaken?
81
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.81 Algebraic Formulation Let y i = 1 if project i is undertaken; 0 otherwise (i = 1, 2, 3, 4). Maximize NPV = 30y 1 + 16y 2 + 22y 3 + 14y 4 subject to Year 1:9y 1 + 7y 2 + 6y 3 + 11y 4 ≤ 28 ($million) Year 2 (cumulative):15y 1 + 11y 2 + 9y 3 + 11y 4 ≤ 41 ($million) Year 3 (cumulative):21y 1 + 11y 2 + 13y 3 + 11y 4 ≤ 51 ($million) and y i are binary (i = 1, 2, 3, 4).
82
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.82 Spreadsheet Solution
83
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.83 Additional Considerations (Logic and Dependency Constraints) At least one of projects 1, 2, or 3 Project 2 can’t be done unless project 3 is done Either project 3 or project 4, but not both No more than two projects total Question: What constraints would need to be added for each of these additional considerations?
84
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.84 Example #2 (Set Covering Problem) The Washington State legislature is trying to decide on locations at which to base search-and-rescue teams. The teams are expensive, so they would like as few as possible. Response time is critical, so they would like every county to either have a team located in that county or in an adjacent county. Question: Where should search-and-rescue teams be located?
85
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.85 The Counties of Washington State
86
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.86 Algebraic Formulation Let y i = 1 if a team is located in county i; 0 otherwise (i = 1, 2, …, 37). Minimize Number of Teams = y 1 + y 2 + … + y 37 subject to County 1 covered:y 1 + y 2 ≥ 1 County 2 covered:y 1 + y 2 + y 3 + y 6 + y 7 ≥ 1 County 3 covered:y 2 + y 3 + y 4 + y 7 + y 8 + y 14 ≥ 1 : County 37 covered:y 32 + y 36 + y 37 ≥ 1 and y i are binary (i = 1, 2, …, 37).
87
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.87 Spreadsheet Solution
88
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.88 Example #3 (Fixed Costs) Woodridge Pewter Company is a manufacturer of three pewter products: platters, bowls, and pitchers. The manufacture of each product requires Woodridge to have the appropriate machinery and molds available. The machinery and molds for each product can be rented at the following rates: for the platters, $400/week; for the bowls, $250/week; for the pitcher, $300/week. Each product requires the amounts of labor and pewter given in the table below. The sales price and variable cost are also given in the table. Labor Hours Pewter (pounds) Sales Price Variable Cost Platter35$100$60 Bowl148550 Pitcher437540 Available130240 Question: Which products should be produced, and in what quantity?
89
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.89 Algebraic Formulation Let x 1 = Number of platters produced, x 2 = Number of bowls produced, x 3 = Number of pitchers produced, y i = 1 if lease machine and mold for product i; 0 otherwise (i = 1, 2, 3). Maximize Profit = ($100–$60)x 1 + ($85–$50)x 2 + ($75–$40)x 3 – $400y 1 – $250y 2 – $300y 3 subject to Labor:3x 1 + x 2 + 4x 3 ≤ 130 hours Pewter:5x 1 + 4x 2 + 3x 3 ≤ 240 pounds Allow production only if machines and molds are purchased: x 1 ≤ 99y 1 x 2 ≤ 99y 2 x 3 ≤ 99y 3 and x i ≥ 0, and y i are binary (i = 1, 2, 3).
90
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.90 Spreadsheet Solution
91
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.91 Applications of Binary Variables Making “yes-or-no” type decisions –Build a factory? –Manufacture a product? –Do a project? –Assign a person to a task? Fixed costs –If a product is produced, must incur a fixed setup cost. –If a warehouse is operated, must incur a fixed cost. Either-or constraints –Production must either be 0 or ≥ 100. Subset of constraints –meet 3 out of 4 constraints.
92
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.92 Quality Furniture (Either-Or Constraints) Reconsider the Quality Furniture Problem: –The Quality Furniture Corporation produces benches and picnic tables. The firm has a limited supply of two resources: labor and wood. 1,600 labor hours are available during the next production period. The firm also has a stock of 9,000 pounds of wood available. Each bench requires 3 labor hours and 12 pounds of wood. Each table requires 6 labor hours and 38 pounds of wood. The profit margin on each bench is $8 and on each table is $18. Now suppose that they would not produce any fewer than 200 units of either product (i.e., either produce 0 or at least 200). Question: What product mix will maximize their total profit?
93
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.93 Spreadsheet Solution
94
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.94 Meeting a Subset of Constraints Consider a linear programming model with the following constraints, and suppose that meeting 3 out of 4 of these is good enough –12x 1 + 24x 2 + 18x 3 ≥ 2,400 –15x 1 + 32x 2 + 12x 3 ≥ 1,800 –20x 1 + 15x 2 + 20x 3 ≤ 2,000 –18x 1 + 21x 2 + 15x 3 ≤ 1,600
95
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.95 Meeting a Subset of Constraints Let y i = 1 if constraint i is enforced; 0 otherwise. Constraints: y 1 + y 2 + y 3 + y 4 ≥ 3 12x 1 + 24x 2 + 18x 3 ≥ 2,400y 1 15x 1 + 32x 2 + 12x 3 ≥ 1,800y 2 20x 1 + 15x 2 + 20x 3 ≤ 2,000 + M (1 – y 3 ) 18x 1 + 21x 2 + 15x 3 ≤ 1,600 + M (1 – y 4 ) where M is a large number.
96
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.96 Facility Location Consider a company that operates 5 plants and 3 warehouses that serve customers in 4 different regions. To lower costs, they are considering streamlining by closing one or more plants and warehouses. Associated with each plant are fixed costs, shipping costs, and production costs. Each plant has a limited capacity. Associated with each warehouse are fixed costs and shipping costs. Each warehouse has a limited capacity. Questions: Which plants should they keep open? Which warehouses should they keep open? How should they divide production among the open plants? How much should be shipped from each plant to each warehouse, and from each warehouse to each customer?
97
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.97 Data for Facility Location Problem Fixed Cost (per month) (Shipping + Production) Cost (per unit) Capacity (units per month) WH #1WH #2WH #3 Plant 1$42,000$650$750$850400 Plant 250,000500350550300 Plant 345,000450 350300 Plant 450,000400500600350 Plant 547,000550450350375 Fixed Cost (per month) Shipping Cost (per unit) Capacity (per month) Cust. 1Cust. 2Cust. 3Cust. 4 WH #1$45,000$25$65$70$35600 WH #225,00050254060400 WH #365,00060204045900 Demand:250225200275
98
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2003 9.98 Spreadsheet Solution
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.