Download presentation
Presentation is loading. Please wait.
1
ENGM 435/535 Integer Programming
2
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.
3
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.
4
Prototype Formulation
Let Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA yC3+ 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.
5
Prototype Formulation
Let Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA yC3+ 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 yA yC3 < 1 yA4+yB4+yC4 < 1
6
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+ 5yA yC3+ 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 yA yC3 < 1 yA4+yB4+yC4 = 1 yA1+yA2+yA3 < 3yA yA1+yA2+yA3 - 3yA4 < 0
7
Prototype Formulation
B1, B2, and C4 cannot all be built because of competitive bids Max Z=2yA1+4yB1+6yC1+5yA2+7yB2+11yC2+ 5yA yC3+ 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 yA yC3 < 1 yA4+yB4+yC4 = 1 yA1+yA2+yA3 - 3yA4 < 0 yB1+yB2+yC4 < 2
8
Standard Form This may require rearranging variables
Max in standard form equally valid
9
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.
10
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
11
Example Max Z = 9x1 + 5x2 + 6x3 + 4x4 s.t. 6x1+3x2+5x3+5x4 < 10
xj = 0 or 1, j=1, 2, 3, 4
12
Example Branch Let x1 = 0 , then Subset 1: Max Z = 5x2 + 6x3 + 4x4
s.t. 3x2+5x3+5x4 < 10 x3+ x4 < 1 x < 1 -1x x4 < 0 xj = 0 or 1, j=2, 3, 4,
13
Example Branch Let x1 = 1 , then Subset 1: Max Z = 9 +5x2 + 6x3 + 4x4
s.t. 3x2+5x3+5x4 < 4 x3+ x4 < 1 x < 1 -1x x4 < 0 xj = 0 or 1, j=2, 3, 4,
14
Example Branching Tree
All X1=1
15
Find a Bound to Original
Max Z = 9x1 + 5x2 + 6x3 + 4x4 s.t. 6x1+3x2+5x3+5x4 < 10 x3+ x4 < 1 -1x x < 0 -1x x4 < 0 0 < xj < 1 or 1, j=1, 2, 3, 4
16
Obtain a Bound for Each Subset
Find a bound by relaxing one or more constraints Let 0 < xj < 1, j=1, 2, 3, 4
17
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.
18
Example Branching Tree
Z < 16 (.83,1,0,1) X1=0 All X1=1 Now let us obtain a bound for each subproblem.
19
Example Branch (x1=0) Let x1 = 0 , then Subset 1:
Max Z = 5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 10 x3+ x4 < 1 x < 1 -1x x4 < 0 0 < xj < 1, j=2, 3, 4,
20
Example Bound (x1=0)
21
Example Branching Tree
Z = 9 (0,1,0,1) Z < 16 (.83,1,0,1) X1=0 All X1=1
22
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 x < 1 -1x x4 < 0 0 < xj < 1, j=2, 3, 4,
23
Example Branch (x1=1)
24
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)
25
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)
26
Iteration 2, x1=1 Max Z = 9 +5x2 + 6x3 + 4x4 s.t. 3x2+5x3+5x4 < 4
xj = 0 or 1, j=2, 3, 4,
27
Iteration 2, x1=1, x2=0 Max Z = 9 + 6x3 + 4x4 s.t. 5x3+2x4 < 4
xj = 0 or 1, j= 3, 4
28
Iteration 2, x1=1, x2=1 Max Z = 14 + 6x3 + 4x4 s.t. 5x3+2x4 < 1
xj = 0 or 1, j= 3, 4
29
Iteration 2, x1=1, x2=0, Relax Max Z = 9 + 6x3 + 4x4 s.t.
0 < xj < 1, j= 3, 4
30
Iteration 2, x1=1, x2=0, Relax
31
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
32
Iteration 2, x1=1, x2=1, Relax Max Z = 14 + 6x3 + 4x4 s.t.
0 < xj < 1, j= 3, 4
33
Iteration 2, x1=1, x2=1, Relax
34
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)
35
Iteration 3, x1=1, x2=1, x3=0 Max Z = 14 + 4x4 s.t. 2x4 < 1
xj = 0 or 1, j= 4
36
Iteration 3, x1=1, x2=1, x3=0, Relax
Max Z = x4 s.t. 2x4 < 1 x4 < 1 x4 < 1 0 < xj < 1, j= 4
37
Iteration 3, x1=1, x2=1, x3=0, Relax
38
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
39
Iteration 3, x1=1, x2=1, x3=1 Max Z = 20 + 4x4 s.t. 2x4 < -4
xj = 0 or 1, j= 4
40
Iteration 3, x1=1, x2=1, x3=1, Relax
Max Z = x4 s.t. 2x4 < -4 x4 < 0 x4 < 1 0 < xj < 1, j= 4 Infeasible
41
Infeasible
42
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
43
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
44
Iteration 4, x1=1, x2=1, x3=0, x4=1 Max Z = 14 + 4x4 s.t. 2x4 < 1
xj = 0 or 1, j= 4
45
Iteration 4, x1=1, x2=1, x3=0, x4=0
46
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
47
Iteration 3, x1=1, x2=1, x3=0, x4=1 Max Z = 14 + 4x4 s.t. 2x4 < 1
0 < xj < 1, j= 4
48
Iteration 3, x1=1, x2=1, x3=0, x4=1 Infeasible
49
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.