Download presentation
Presentation is loading. Please wait.
Published byMaurice Barton Modified over 9 years ago
1
1 1 Slide © 2001 South-Western College Publishing/Thomson Learning Anderson Sweeney Williams Anderson Sweeney Williams Slides Prepared by JOHN LOUCKS QUANTITATIVE METHODS FOR BUSINESS 8e QUANTITATIVE METHODS FOR BUSINESS 8e
2
2 2 Slide Chapter 11 Integer Linear Programming n Types of Integer Linear Programming Models n Graphical and Computer Solutions for an All-Integer Linear Program n Applications Involving 0-1 Variables n Modeling Flexibility Provided by 0-1 Variables
3
3 3 Slide Types of Integer Programming Models n A linear program in which all the variables are restricted to be integers is called an all-integer linear program (ILP). n The linear program that results from dropping the integer requirements is called the LP Relaxation of the ILP. n If only a subset of the variables are restricted to be integers, the problem is called a mixed-integer linear program (MILP). n Binary variables are variables whose values are restricted to be 0 or 1. If all variables are restricted to be 0 or 1, the problem is called a 0-1 or binary integer linear program.
4
4 4 Slide Example: All-Integer LP n Consider the following all-integer linear program: Max 3 x 1 + 2 x 2 Max 3 x 1 + 2 x 2 s.t. 3 x 1 + x 2 < 9 s.t. 3 x 1 + x 2 < 9 x 1 + 3 x 2 < 7 x 1 + 3 x 2 < 7 - x 1 + x 2 < 1 - x 1 + x 2 < 1 x 1, x 2 > 0 and integer x 1, x 2 > 0 and integer
5
5 5 Slide Example: All-Integer LP n LP Relaxation Solving the problem as a linear program ignoring the integer constraints, the optimal solution to the linear program gives fractional values for both x 1 and x 2. From the graph on the next slide, we see that the optimal solution to the linear program is: x 1 = 2.5, x 2 = 1.5, z = 10.5
6
6 6 Slide Example: All-Integer LP n LP Relaxation LP Optimal (2.5, 1.5) Max 3x 1 + 2x 2 Max 3x 1 + 2x 2 -x 1 + x 2 < 1 x2x2x2x2 x1x1x1x1 3x 1 + x 2 < 9 1 3 2 5 4 1 2 3 4 5 6 7 x 1 + 3x 2 < 7 x 1 + 3x 2 < 7
7
7 7 Slide Example: All-Integer LP n Rounding Up If we round up the fractional solution ( x 1 = 2.5, x 2 = 1.5) to the LP relaxation problem, we get x 1 = 3 and x 2 = 2. From the graph on the next page, we see that this point lies outside the feasible region, making this solution infeasible.
8
8 8 Slide Example: All-Integer LP n Rounded Up Solution LP Optimal (2.5, 1.5) Max 3x 1 + 2x 2 Max 3x 1 + 2x 2 -x 1 + x 2 < 1 x2x2x2x2 x1x1x1x1 3x 1 + x 2 < 9 1 3 2 5 4 1 2 3 4 5 6 7 ILP Infeasible (3, 2) ILP Infeasible (3, 2) x 1 + 3x 2 < 7 x 1 + 3x 2 < 7
9
9 9 Slide Example: All-Integer LP n Rounding Down By rounding the optimal solution down to x 1 = 2, x 2 = 1, we see that this solution indeed is an integer solution within the feasible region, and substituting in the objective function, it gives z = 8. We have found a feasible all-integer solution, but have we found the OPTIMAL all-integer solution? --------------------- The answer is NO! The optimal solution is x 1 = 3 and x 2 = 0 giving z = 9, as evidenced in the next two slides.
10
10 Slide Example: All-Integer LP n Complete Enumeration of Feasible ILP Solutions There are eight feasible integer solutions to this problem: x 1 x 2 z x 1 x 2 z 1. 0 0 0 1. 0 0 0 2. 1 0 3 2. 1 0 3 3. 2 0 6 3. 2 0 6 4. 3 0 9 optimal solution 4. 3 0 9 optimal solution 5. 0 1 2 5. 0 1 2 6. 1 1 5 6. 1 1 5 7. 2 1 8 7. 2 1 8 8. 1 2 7 8. 1 2 7
11
11 Slide Example: All-Integer LP ILP Optimal (3, 0) Max 3x 1 + 2x 2 Max 3x 1 + 2x 2 -x 1 + x 2 < 1 x2x2x2x2 x1x1x1x1 3x 1 + x 2 < 9 1 3 2 5 4 1 2 3 4 5 6 7 x 1 + 3x 2 < 7 x 1 + 3x 2 < 7
12
12 Slide Example: All-Integer LP n Partial Spreadsheet Showing Problem Data
13
13 Slide Example: All-Integer LP n Partial Spreadsheet Showing Formulas
14
14 Slide Example: All-Integer LP n Partial Spreadsheet Showing Optimal Solution
15
15 Slide Special 0-1 Constraints n When x i and x j represent binary variables designating whether projects i and j have been completed, the following special constraints may be formulated: At most k out of n projects will be completed:At most k out of n projects will be completed: x j < k x j < k j j Project j is conditional on project i :Project j is conditional on project i : x j - x i < 0 x j - x i < 0 Project i is a corequisite for project j :Project i is a corequisite for project j : x j - x i = 0 x j - x i = 0 Projects i and j are mutually exclusive:Projects i and j are mutually exclusive: x i + x j < 1 x i + x j < 1
16
16 Slide Example: Metropolitan Microwaves Metropolitan Microwaves, Inc. is planning to expand its operations into other electronic appliances. The company has identified seven new product lines it can carry. Relevant information about each line follows: Initial Floor Space Exp. Rate Initial Floor Space Exp. Rate Product Line Invest. (Sq.Ft.) of Return Product Line Invest. (Sq.Ft.) of Return 1. Black & White TVs$ 6,000 125 8.1% 2. Color TVs 12,000 150 9.0 3. Large Screen TVs 20,000 200 11.0 4. VHS VCRs 14,000 40 10.2 5. Beta VCRs 15,000 40 10.5 6. Video Games 2,000 20 14.1 7. Home Computers 32,000 100 13.2
17
17 Slide Example: Metropolitan Microwaves Metropolitan has decided that they should not stock large screen TVs unless they stock either B&W or color TVs. Also, they will not stock both types of VCRs, and they will stock video games if they stock color TVs. Finally, the company wishes to introduce at least three new product lines. If the company has $45,000 to invest and 420 sq. ft. of floor space available, formulate an integer linear program for Metropolitan to maximize its overall expected rate of return.
18
18 Slide Example: Metropolitan Microwaves n Define the Decision Variables x j = 1 if product line j is introduced; = 0 otherwise. = 0 otherwise. n Define the Objective Function Maximize total overall expected return: Max.081(6000) x 1 +.09(12000) x 2 +.11(20000) x 3 Max.081(6000) x 1 +.09(12000) x 2 +.11(20000) x 3 +.102(14000) x 4 +.105(15000) x 5 +.141(2000) x 6 +.102(14000) x 4 +.105(15000) x 5 +.141(2000) x 6 +.132(32000) x 7 +.132(32000) x 7
19
19 Slide Example: Metropolitan Microwaves n Define the Constraints 1) Money: 1) Money: 6 x 1 + 12 x 2 + 20 x 3 + 14 x 4 + 15 x 5 + 2 x 6 + 32 x 7 < 45 6 x 1 + 12 x 2 + 20 x 3 + 14 x 4 + 15 x 5 + 2 x 6 + 32 x 7 < 45 2) Space: 2) Space: 125 x 1 +150 x 2 +200 x 3 +40 x 4 +40 x 5 +20 x 6 +100 x 7 < 420 125 x 1 +150 x 2 +200 x 3 +40 x 4 +40 x 5 +20 x 6 +100 x 7 < 420 3) Stock large screen TVs only if stock B&W or color: 3) Stock large screen TVs only if stock B&W or color: x 1 + x 2 > x 3 or x 1 + x 2 - x 3 > 0 x 1 + x 2 > x 3 or x 1 + x 2 - x 3 > 0
20
20 Slide Example: Metropolitan Microwaves n Define the Constraints (continued) 4) Do not stock both types of VCRs: x 4 + x 5 < 1 5) Stock video games if they stock color TV's: 5) Stock video games if they stock color TV's: x 2 - x 6 > 0 6) At least 3 new lines: 6) At least 3 new lines: x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 > 3 7) Variables are 0 or 1: 7) Variables are 0 or 1: x j = 0 or 1 for j = 1,,, 7 x j = 0 or 1 for j = 1,,, 7
21
21 Slide Example: Metropolitan Microwaves n Partial Spreadsheet Showing Problem Data
22
22 Slide Example: Metropolitan Microwaves n Partial Spreadsheet Showing Example Formulas
23
23 Slide Example: Metropolitan Microwaves n Solver Parameters Dialog Box Solver Parameters Set Target Cell: Equal To: By Changing Cells: Reset All X ? Help Close Solve Options Max Min Value of: $B$13:$H$13 Subject to the Constraints: Delete Change Guess Add $B$13:$H$13 = binary $D$17:$D$18 <= $H$17:$H$18 $D$19 >= $H$19 $D$20 <= $H$20 $B$13:$H$13 = binary $D$17:$D$18 <= $H$17:$H$18 $D$19 >= $H$19 $D$20 <= $H$20
24
24 Slide Example: Metropolitan Microwaves n Solver Options Dialog Box Select Assume Linear ModelSelect Assume Linear Model Select Assume Non-negativeSelect Assume Non-negative Set Tolerance equal to 0Set Tolerance equal to 0
25
25 Slide Example: Tom’s Tailoring Tom's Tailoring has five idle tailors and four custom garments to make. The estimated time (in hours) it would take each tailor to make each garment is listed below. (An 'X' in the table indicates an unacceptable tailor-garment assignment.) Tailor Tailor Garment 1 2 3 4 5 Garment 1 2 3 4 5 Wedding gown 19 23 20 21 18 Clown costume 11 14 X 12 10 Clown costume 11 14 X 12 10 Admiral's uniform 12 8 11 X 9 Admiral's uniform 12 8 11 X 9 Bullfighter's outfit X 20 20 18 21 Bullfighter's outfit X 20 20 18 21
26
26 Slide Example: Tom’s Tailoring Formulate an integer program for determining the tailor-garment assignments that minimize the total estimated time spent making the four garments. No tailor is to be assigned more than one garment and each garment is to be worked on by only one tailor. -------------------- This problem can be formulated as a 0-1 integer program. The LP solution to this problem will automatically be integer (0-1).
27
27 Slide Example: Tom’s Tailoring n Define the decision variables x ij = 1 if garment i is assigned to tailor j x ij = 1 if garment i is assigned to tailor j = 0 otherwise. = 0 otherwise. Number of decision variables = Number of decision variables = [(number of garments)(number of tailors)] - (number of unacceptable assignments) - (number of unacceptable assignments) = [4(5)] - 3 = 17 n Define the objective function Minimize total time spent making garments: Minimize total time spent making garments: Min 19 x 11 + 23 x 12 + 20 x 13 + 21 x 14 + 18 x 15 + 11 x 21 Min 19 x 11 + 23 x 12 + 20 x 13 + 21 x 14 + 18 x 15 + 11 x 21 + 14 x 22 + 12 x 24 + 10 x 25 + 12 x 31 + 8 x 32 + 11 x 33 + 14 x 22 + 12 x 24 + 10 x 25 + 12 x 31 + 8 x 32 + 11 x 33 + 9x 35 + 20 x 42 + 20 x 43 + 18 x 44 + 21 x 45 + 9x 35 + 20 x 42 + 20 x 43 + 18 x 44 + 21 x 45
28
28 Slide Example: Tom’s Tailoring n Define the Constraints Exactly one tailor per garment: 1) x 11 + x 12 + x 13 + x 14 + x 15 = 1 1) x 11 + x 12 + x 13 + x 14 + x 15 = 1 2) x 21 + x 22 + x 24 + x 25 = 1 2) x 21 + x 22 + x 24 + x 25 = 1 3) x 31 + x 32 + x 33 + x 35 = 1 3) x 31 + x 32 + x 33 + x 35 = 1 4) x 42 + x 43 + x 44 + x 45 = 1 4) x 42 + x 43 + x 44 + x 45 = 1
29
29 Slide Example: Tom’s Tailoring n Define the Constraints (continued) No more than one garment per tailor: 5) x 11 + x 21 + x 31 < 1 6) x 21 + x 22 + x 23 + x 24 < 1 7) x 31 + x 33 + x 34 < 1 8) x 41 + x 42 + x 44 < 1 9) x 51 + x 52 + x 53 + x 54 < 1 Nonnegativity: x ij > 0 for i = 1,..,4 and j = 1,..,5
30
30 Slide The End of Chapter 11
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.