ENGM 435/535 Integer Programming
Prototype Problem Consider an investment problem in a firm is planning construction of new buildings at 4 sites in the city. These sites are designated 1, 2, 3, and 4. At each site there are three possible designs designated A, B, C. The OR Analyst is to model the problem to help management decide on which sites to build and which design to use at the selected sites.
Prototype Problem Consider an investment problem in a firm is planning construction of new buildings at 4 sites in the city. These sites are designated 1, 2, 3, and 4. At each site there are three possible designs designated A, B, C. The OR Analyst is to model the problem to help management decide on which sites to build and which design to use at the selected sites. The table below shows alternatives, investment required and annual income. Option A1 B1 C1 A2 B2 C2 A3 B3 C3 A4 B4 C4 Investment 12 20 24 30 39 45 10 -- 28 42 50 55 Return 2 4 6 5 7 11 16 19 22 The company has a total investment budget of 80. Our objective is to maximize yearly income.
Prototype Formulation Let Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA3+--+12yC3+ 16yA4+19yB4+22yC4 Subject to 12yA1+20yB1+24yC1+30yA2+39yB2+45yC2+10yA3+28yC3+42yA4+50yB4+55yC4 < 80 In addition to the budget constraint, we have several logical constraints. For example we will not put more than one design on a site.
Prototype Formulation Let Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA3+--+12yC3+ 16yA4+19yB4+22yC4 Subject to 12yA1+20yB1+24yC1+30yA2+39yB2+45yC2+10yA3+28yC3+42yA4+50yB4+55yC4 < 80 yA1+yB1+yC1 < 1 yA2+yB2+yC2 < 1 yA3+ yC3 < 1 yA4+yB4+yC4 < 1
Prototype Formulation Contingent: Plan A will only be available for sites 1, 2, 3 if it is used at site 4 Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA3+--+12yC3+ 16yA4+19yB4+22yC4 Subject to 12yA1+20yB1+24yC1+30yA2+39yB2+45yC2+10yA3+28yC3+42yA4+50yB4+55yC4 < 80 yA1+yB1+yC1 < 1 yA2+yB2+yC2 < 1 yA3+ yC3 < 1 yA4+yB4+yC4 = 1 yA1+yA2+yA3 < 3yA4 yA1+yA2+yA3 - 3yA4 < 0
Prototype Formulation B1, B2, and C4 cannot all be built because of competitive bids Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA3+--+12yC3+ 16yA4+19yB4+22yC4 Subject to 12yA1+20yB1+24yC1+30yA2+39yB2+45yC2+10yA3+28yC3+42yA4+50yB4+55yC4 < 80 yA1+yB1+yC1 < 1 yA2+yB2+yC2 < 1 yA3+ yC3 < 1 yA4+yB4+yC4 = 1 yA1+yA2+yA3 - 3yA4 < 0 yB1+yB2+yC4 < 2
Standard Form This may require rearranging variables Max in standard form equally valid
np hard Consider just 3 variables x1, x2, x3 . Possible solution set is then (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1) Or 8 possible solutions. In general, there are 2n possible solutions if variables are binary. We can check all possible solutions but it is darn tough as n gets larger. We need a more efficient algorithm.
Branch and Bound Technique Partition, Let x1 = 1, Solution subset: (1,0,0), (1,0,1), (1,1,0), (1,1,1) Let x1 = 0, Solution subset: (0,0,0), (0,0,1), (0,1,0), (0,1,1) Lower Bound ZL Create a relaxation by dropping some restrictions, find a lower bound on a given subset Upper Bound ZU Upper bound is Z evaluated for any feasible solution of original problem. Fathoming If ZL > ZU for a subset, then eliminate the subset If subset contains no feasible solutions, it can be eliminated
Example Max Z = 9x1 + 5x2 + 6x3 + 4x4 s.t. 6x1+3x2+5x3+5x4 < 10 xj = 0 or 1, j=1, 2, 3, 4
Example Branch Let x1 = 0 , then Subset 1: Max Z = 5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 10 x3+ x4 < 1 x3 < 1 -1x2 + x4 < 0 xj = 0 or 1, j=2, 3, 4,
Example Branch Let x1 = 1 , then Subset 1: Max Z = 9 +5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 4 x3+ x4 < 1 x3 < 1 -1x2 + x4 < 0 xj = 0 or 1, j=2, 3, 4,
Example Branching Tree All X1=1
Find a Bound to Original Max Z = 9x1 + 5x2 + 6x3 + 4x4 s.t. 6x1+3x2+5x3+5x4 < 10 x3+ x4 < 1 -1x1 + x3 < 0 -1x2 + x4 < 0 0 < xj < 1 or 1, j=1, 2, 3, 4
Obtain a Bound for Each Subset Find a bound by relaxing one or more constraints Let 0 < xj < 1, j=1, 2, 3, 4
Obtain a Bound for Each Subset Find a bound by relaxing one or more constraints Let 0 < xj < 1, j=1, 2, 3, 4 All xj must be integer, yields Z must be integer, yields Z=16 is a bound for the whole problem.
Example Branching Tree Z < 16 (.83,1,0,1) X1=0 All X1=1 Now let us obtain a bound for each subproblem.
Example Branch (x1=0) Let x1 = 0 , then Subset 1: Max Z = 5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 10 x3+ x4 < 1 x3 < 1 -1x2 + x4 < 0 0 < xj < 1, j=2, 3, 4,
Example Bound (x1=0)
Example Branching Tree Z = 9 (0,1,0,1) Z < 16 (.83,1,0,1) X1=0 All X1=1
Example Branch (x1=1) Let x1 = 1 , then Subset 1: Max Z = 9 +5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 4 x3+ x4 < 1 x3 < 1 -1x2 + x4 < 0 0 < xj < 1, j=2, 3, 4,
Example Branch (x1=1)
Example Branching Tree Z = 9 (0,1,0,1) Z < 16 (.83,1,0,1) X1=0 All X1=1 Z = 16 (1,.8,0,.8)
Fathoming Z* = 9 (0,1,0,1) For x1=0, Z has a bound less than 16. It also has integer values so (0,1,0,1) is the optimal solution for subset 1. (0,1,0,1) = incumbent Z < 16 (.83,1,0,1) X1=0 All X1=1 For x1=1, Z has a bound equal to 16, but solution is not feasible. We need to do another iteration. Z = 16 (1,.8,0,.8)
Iteration 2, x1=1 Max Z = 9 +5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 4 xj = 0 or 1, j=2, 3, 4,
Iteration 2, x1=1, x2=0 Max Z = 9 + 6x3 + 4x4 s.t. 5x3+2x4 < 4 xj = 0 or 1, j= 3, 4
Iteration 2, x1=1, x2=1 Max Z = 14 + 6x3 + 4x4 s.t. 5x3+2x4 < 1 xj = 0 or 1, j= 3, 4
Iteration 2, x1=1, x2=0, Relax Max Z = 9 + 6x3 + 4x4 s.t. 0 < xj < 1, j= 3, 4
Iteration 2, x1=1, x2=0, Relax
Fathoming Z* = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13.8 (1,0,.8,0) X1=0 All X2=0 X1=1 Z = 16 (1,.8,0,.8) X1=1
Iteration 2, x1=1, x2=1, Relax Max Z = 14 + 6x3 + 4x4 s.t. 0 < xj < 1, j= 3, 4
Iteration 2, x1=1, x2=1, Relax
Fathoming Z* = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13 (1,0,.8,0) X1=0 All X2=0 X1=1 Both Bounds > 9, and have feasible solutions so fathoming test fails. Z = 16 (1,.8,0,.8) X2=1 Z = 16 (1,1,0,.5)
Iteration 3, x1=1, x2=1, x3=0 Max Z = 14 + 4x4 s.t. 2x4 < 1 xj = 0 or 1, j= 4
Iteration 3, x1=1, x2=1, x3=0, Relax Max Z = 14 + 4x4 s.t. 2x4 < 1 x4 < 1 x4 < 1 0 < xj < 1, j= 4
Iteration 3, x1=1, x2=1, x3=0, Relax
Fathoming Z* = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13 (1,0,.8,0) X1=0 All X2=0 Z = 16 (1,1,0,.5) X1=1 X3=0 Z = 16 (1,.8,0,.8) X2=1 Z = 16 (1,1,0,.5) X3=1
Iteration 3, x1=1, x2=1, x3=1 Max Z = 20 + 4x4 s.t. 2x4 < -4 xj = 0 or 1, j= 4
Iteration 3, x1=1, x2=1, x3=1, Relax Max Z = 20 + 4x4 s.t. 2x4 < -4 x4 < 0 x4 < 1 0 < xj < 1, j= 4 Infeasible
Infeasible
Fathoming Z* = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13 (1,0,.8,0) X1=0 All X2=0 Z = 16 (1,1,0,.5) X1=1 X3=0 Z = 16 (1,.8,0,.8) X2=1 Z = 16 (1,1,0,.5) X3=1 Infeasible
Fathoming Z* = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13 (1,0,.8,0) X1=0 All X2=0 Z = 16 (1,1,0,.5) X4=0 X1=1 X3=0 Z = 16 (1,.8,0,.8) X4=1 X2=1 Z = 16 (1,1,0,.5) X3=1 Infeasible
Iteration 4, x1=1, x2=1, x3=0, x4=1 Max Z = 14 + 4x4 s.t. 2x4 < 1 xj = 0 or 1, j= 4
Iteration 4, x1=1, x2=1, x3=0, x4=0
Fathoming Z* = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13 (1,0,.8,0) X1=0 Z = 14 (1,1,0,0) All X2=0 Z = 16 (1,1,0,.5) X4=0 X1=1 X3=0 Z = 16 (1,.8,0,.8) X4=1 X2=1 Z = 16 (1,1,0,.5) X3=1 Infeasible
Iteration 3, x1=1, x2=1, x3=0, x4=1 Max Z = 14 + 4x4 s.t. 2x4 < 1 0 < xj < 1, j= 4
Iteration 3, x1=1, x2=1, x3=0, x4=1 Infeasible
Fathoming Z = 9 (0,1,0,1) Z < 16 (.83,1,0,1) Z = 13 (1,0,.8,0) X1=0 (1,1,0,0) All X2=0 Z = 16 (1,1,0,.5) X4=0 X1=1 X3=0 Z = 16 (1,.8,0,.8) X4=1 X2=1 Infeasible Z = 16 (1,1,0,.5) X3=1 Infeasible