Integer Programming - 0702112
Integer Programming - 0702112
Slide 1
Types of Integer Linear Programming Models Graphical and Computer Solutions for an AllAllInteger Linear Program Applications Involving 0-1 Variables 0Modeling Flexibility Provided by 0-1 Variables 0-
Slide 2
An LP in which all the variables are restricted to be integers is called an all-integer linear program (ILP). allThe LP that results from dropping the integer requirements is called the LP Relaxation of the ILP. If only a subset of the variables are restricted to be integers, the problem is called a mixed-integer linear mixedprogram (MILP). 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. program.
Slide 3
Consider the following all-integer linear program: allMax s.t. 3x 2x 3x1 + 2x2 3x 3x1 + x2 < 9 x1 + 3x2 < 7 3x -x 1 + x 2 < 1 x1, x2 > 0 and integer
Slide 4
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 x1 and x2. From the graph on the next slide, we see that the optimal solution to the linear program is: x1 = 2.5, x2 = 1.5, Max 3x1 + 2x2 = 10.5 3x 2x
Slide 5
LP Relaxation x2
5 4 3 2 1 x1 + x2 < 1 3x1 + x2 < 9 Max 3x1 + 2x2 3x 2x LP Optimal (2.5, 1.5) x1 + 3x2 < 7 3x
x1
Slide 6
Rounding Up If we round up the fractional solution (x1 = 2.5, (x x2 = 1.5) to the LP relaxation problem, we get x1 = 3 and x2 = 2. From the graph on the next slide, we see that this point lies outside the feasible region, making this solution infeasible.
Slide 7
Rounded Up Solution x2
5 4 3 2 1 x1 + x2 < 1 3x1 + x2 < 9 Max 3x1 + 2x2 3x 2x ILP Infeasible (3, 2) LP Optimal (2.5, 1.5) x1 + 3x2 < 7 3x
x1
Slide 8
Rounding Down By rounding the optimal solution down to x1 = 2, x2 = 1, we see that this solution indeed is an integer solution within the feasible region, and substituting in the objective function, it gives 3x1 + 2x2 = 8. 3x 2x We have found a feasible all-integer solution, but allhave we found the OPTIMAL all-integer solution? all--------------------The answer is NO! The optimal solution is x1 = 3 and x2 = 0 giving 3x1 + 2x2 = 9, as evidenced in the 3x 2x next two slides.
Slide 9
Complete Enumeration of Feasible ILP Solutions There are eight feasible integer solutions to this problem: x1 x2 3x1 + 2x2 2x 1. 2. 3. 4. 5. 6. 7. 8. 0 1 2 3 0 1 2 1 0 0 0 0 1 1 1 2 0 3 6 9 2 5 8 7
optimal solution
Slide 10
x1
Slide 11
1 19 11 12 X
Slide 12
Slide 13
Define the decision variables xij = 1 if garment i is assigned to tailor j = 0 otherwise. Number of decision variables = [(number of garments)(number of tailors)] - (number of unacceptable assignments) = [4(5)] - 3 = 17
Slide 14
Define the objective function Minimize total time spent making garments: Min 19x11 + 23x12 + 20x13 + 21x14 + 18x15 + 11x21 19x 23x 20x 21x 18x 11x + 14x22 + 12x24 + 10x25 + 12x31 + 8x32 + 11x33 14x 12x 10x 12x 8x 11x + 9x35 + 20x42 + 20x43 + 18x44 + 21x45 20x 20x 18x 21x
Slide 15
Define the Constraints Exactly one tailor per garment: 1) x11 + x12 + x13 + x14 + x15 = 1 2) x21 + x22 + x24 + x25 = 1 3) x31 + x32 + x33 + x35 = 1 4) x42 + x43 + x44 + x45 = 1
Slide 16
Define the Constraints (continued) No more than one garment per tailor: 5) x11 + x21 + x31 < 1 6) x12 + x22 + x32 + x42 < 1 7) x13 + x33 + x43 < 1 8) x14 + x24 + x44 < 1 9) x15 + x25 + x35 + x45 < 1 Nonnegativity: xij > 0 for i = 1, . . ,4 and j = 1, . . ,5
Slide 17
When xi and xj represent binary variables designating whether projects i and j have been completed, the following special constraints may be formulated:
Slide 18
Slide 19
Product Line 1. 2. 3. 4. 5. 6. 7. TV/VCRs TVs Projection TVs VCRs DVD Players Video Games Home Computers
Slide 20
Slide 21
Define the Decision Variables xj = 1 if product line j is introduced; = 0 otherwise. where: Product line 1 = TV/VCRs Product line 2 = TVs Product line 3 = Projection TVs Product line 4 = VCRs Product line 5 = DVD Players Product line 6 = Video Games Product line 7 = Home Computers
Slide 22
Define the Decision Variables xj = 1 if product line j is introduced; = 0 otherwise. Define the Objective Function Maximize total expected return: Max .081(6000)x1 + .09(12000)x2 + .11(20000)x3 .081(6000)x .09(12000)x .11(20000)x + .102(14000)x4 + .105(15000)x5 + .141(2000)x6 .102(14000)x .105(15000)x .141(2000)x + .132(32000)x7 .132(32000)x
Slide 23
Define the Constraints 1) Money: 6x1 + 12x2 + 20x3 + 14x4 + 15x5 + 2x6 + 32x7 < 45 12x 20x 14x 15x 2x 32x 2) Space: 125x +150x +200x +40x +40x +20x +100x 125x1 +150x2 +200x3 +40x4 +40x5 +20x6 +100x7 < 420 3) Stock projection TVs only if stock TV/VCRs or TVs: x1 + x2 > x3 or x1 + x2 - x3 > 0
Slide 24
Define the Constraints (continued) 4) Do not stock both VCRs and DVD players: x4 + x5 < 1 5) Stock video games if they stock TV's: x2 - x6 > 0 6) Introduce at least 3 new lines: x1 + x2 + x3 + x4 + x5 + x6 + x7 > 3 7) Variables are 0 or 1: xj = 0 or 1 for j = 1, , , 7
Slide 25
Slide 26
RHS 45 420 0 1 0 3
Slide 27
Optimal Solution
12 13 14 15 16 17 18 19 20 21 22 B C D X1 X2 X3 Dec.Values 1 0 1 Maximized Total Expected Return Constraints Money Space TVs VCRs Video Lines LHS 41 365 0 1 0 3 A E X4 0 F X5 1 4261 G X6 0 H X7 0
RHS 45 420 0 1 0 3
Slide 28
Optimal Solution Introduce: TV/VCRs, Projection TVs, and DVD Players Do Not Introduce: TVs, VCRs, Video Games, and Home Computers Total Expected Return: Return: $4,261
Slide 29
Sensitivity analysis often is more crucial for ILP problems than for LP problems. A small change in a constraint coefficient can cause a relatively large change in the optimal solution. Recommendation: Resolve the ILP problem several times with slight variations in the coefficients before choosing the best solution for implementation.
Slide 30