Integer Programming
Integer Programming
stc 7x1+4x2<=13
x1,x2>=0
x1 0 0 0 0 0 1 1 1 2
x2 0 1 2 3 4 0 1 2 0
constraints 0 4 8 12 16 7 11 15 14
Objective function 0 11 22 33 44 21 32 43 42
1 2
Region Average Daily Payments
Los Angeles Chicago
1 West 70000 2 6
2 Midwest 50000 6 2
3 East 60000 8 5
4 South 40000 8 5
1 2
Region Average Daily Payments
Los Angeles Chicago
1 West 70000 140,000 420,000
2 Midwest 50000 300,000 100,000
3 East 60000 480,000 300,000
4 South 40000 320,000 200,000
1 2
Region Average Daily Payments
Los Angeles Chicago
1 West 70000 28,000 84,000
2 Midwest 50000 60,000 20,000
3 East 60000 96,000 60,000
4 South 40000 64,000 40,000
1 2
Region Average Daily Payments
Los Angeles Chicago
X 1 West 70 28 84
2 Midwest 50 60 20
3 East 60 96 60
4 South 40 64 40
X11 Y1
X12 Y2
X13 Y3
X14 Y4
X21 Y1
3 4
New York Atlanta
8 8
5 5
2 5
5 2
3 4
New York Atlanta
560,000 560,000
250,000 250,000
120,000 300,000
200,000 80,000
3 4
New York Atlanta
112,000 112,000
50,000 50,000
24,000 60,000
40,000 16,000
3 4
New York Atlanta
112 112
50 50
24 60
40 16
Investment NPV Outflow
X1 16K 5K Total NPV=16x1+22x2+12x3+8x4
X2 22K 7K Max Z = 16x1+22x2+12x3+8x4
X3 12K 4K
X4 8K 3K 5x1+7x2+ 4x3+3x4<=14
22x2+12x3+8x4
x2+12x3+8x4
x1 x2 x3
Resource Compact Midsize Large
Steel (tons) 1.5 3 5
Labor (hours) 30 25 40
Profit (Dollars) 2000 3000 4000
1.5x1+3x2+5x3<=6000
30x1+25x2+40x3<=60000
6000
60000
5000
13500
18500
QuantityPrice (CentsCumulative QuantiTotal Price
500 25 500 12,500
500 20 1000 22,500
500 15 1500 30,000
Euing Gas
31 x=0z1+500z2+1000z3+1500z4
32 z1<=y1
33 z2<=y1+y2
34 z3<=y2+y3
35 z4<=+y3
36 y1+y2+y3=1
37 z1+z2+z3+z4=1
df to discuss other constraints
500z2+1000z3+1500z4 If y2=1,
based on equation 32, z1<=0
based on equation 33, z2<=1
based on equation 34, z3<=1
based on equation 35, z4<=0
based on equation 36, y1=0, y3=0
therefore, z2 and z3, must be a nonnegative number (fraction) less than 1
If x=800
b2=500<=800<=1000=b3
try, y1=1, y2=0, y3=0, z3=0, z4=0
reduced eq 31 800=x=500z2
if z2<0 or 1, reduced eq 31 is not satisfied
800=x=(0,500)
max z=40x1+80x2+10x4+60x7
OF C Ratio Rank
x1 16 5 3.20 1 1
x2 22 7 3.14 2 1
x3 12 4 3.00 3 1/2
x4 8 3 2.67 4
5x1+7x2+4x3+3x4=14 44
x1=1
14-5=9
x2=1
9-7=2
x3=1/2 fraction
2-4(1/2)=0
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
2 4 4 4 0
1 6 8 10 2
3 5 12 15 3
4 8 16 23 7
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
2 4 4 4 0
3 5 12 9 0
1 6 8 15 7
4 8 16 23 7
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
1 6 8 6 0
3 5 12 11 0
2 4 4 15 11
4 8 16 23 7
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
2 4 4 4 0
3 5 12 9 0
4 8 16 17 1
1 6 8 23 15
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
2 4 4 4 0
4 8 16 12 0
3 5 12 17 5
1 6 8 23 15
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
3 5 12 5 0
2 4 4 9 5
4 8 16 17 1
1 6 8 23 15
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
3 5 12 5 0
4 8 16 13 0
2 4 4 17 13
1 6 8 23 15
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
3 5 12 5 0
4 8 16 13 0
1 6 8 19 11
2 4 4 23 19
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
3 5 12 5 0
1 6 8 11 3
4 8 16 19 3
2 4 4 23 19
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
4 8 16 8 0
3 5 12 13 1
1 6 8 19 11
2 4 4 23 19
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
4 8 16 8 0
1 6 8 14 6
3 5 12 19 7
2 4 4 23 19
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
4 8 16 8 0
1 6 8 14 6
2 4 4 18 14
3 5 12 23 11
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
4 8 16 8 0
2 4 4 12 8
1 6 8 18 10
3 5 12 23 11
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
1 6 8 6 0
4 8 16 14 0
2 4 4 18 14
3 5 12 23 11
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
1 6 8 10 2
2 4 4 4 0
4 8 16 18 2
3 5 12 23 11
10 16
10 12 Optimal sequence
14
18
25
21
25
13
City 1 City 2 City 3 City 4 City 5
Gary City 1 0 132 217 164 58
Fort Wayne City 2 132 0 290 201 79
Evansville City 3 217 290 0 113 303
Terre Haute City 4 264 201 113 0 196
South Bend City 5 58 79 303 196 0
in cases that subtours are not allowed, branch and bound can be used.
Optimal 34,25
1-5-2-4-3-1
Gary Fort WaynEvansville Terre HautSouth Bend
Gary City 1 1000000 132 217 164 58
Fort WayneCity 2 132 1000000 290 201 1000000
Evansville City 3 217 290 1000000 1000000 303
Terre HauteCity 4 264 201 113 1000000 196
South BendCity 5 58 79 303 196 1000000
Min Z 668
Minimum City 1 City 2 City 3 City 4 City 5
Gary City 1 0 74 159 106 0
Fort WCity 2 53 0 211 122 0
EvansviCity 3 104 177 0 0 190
Terre City 4 151 88 0 0 83
South City 5 0 21 245 138 0
Minimum 53 21 159 106 83
34,52
1-4-3-2-5-1
City 1 City 2 City 3 City 4 City 5
Gary City 1 1000000 132 217 164 58
Fort Wayne City 2 132 1000000 290 201 79
Evansville City 3 217 290 1000000 1000000 303
Terre Haute City 4 264 201 113 1000000 196
South Bend City 5 58 1000000 303 196 1000000
Min Z 704
City 1 City 2 City 3 City 4 City 5 Count (<1)
Gary City 1 0 53 0 0 0 4 1 Gary
Fort WayneCity 2 0 0 52 16 0 3 2 Fort Wayne
Evansville City 3 51 156 0 0 107 2 5 Evansville
Terre HauteCity 4 98 67 0 0 0 3 3 Terre Haute
South BendCity 5 0 0 86 32 0 3 4 South Bend
Count (<1) 3 2 3 3 4 Count (<1)
City 1 City 2 City 3 City 4 City 5 Count (<1)
City 1 0 53 0 0 0 4 3
City 2 0 0 52 16 0 3 3
City 3 51 156 0 0 107 2 2 2
City 4 98 67 0 0 0 3 3 2
City 5 0 0 86 32 0 3 3 1
0 0 0 0 0
3 2 3 3 4
1 2 2
1 1
1
1-5-2-1
1
1 1
Base Power Base^Power Example x= 93
2 8 256 93 93 0
2 7 128 93 93 0
2 6 64 29 29 1
2 5 32 29 29 0
2 4 16 13 13 1
2 3 8 5 5 1
2 2 4 1 1 1
2 1 2 1 1 0
2 0 1 0 0 1
page 544
x1 x2 x3 x4 x5 Constraint 1 Constrain
0 0 0 0 0 0 0
1 0 0 0 0 -4 -4
0 1 0 0 0 -2 -2
0 0 1 0 0 1 -4
0 0 0 1 0 -2 1
0 0 0 0 1 -1 2
1 1 0 0 0 -6 -6
0 1 1 0 0 -1 -6
0 0 1 1 0 -1 -3
0 0 0 1 1 -3 3
1 0 1 0 0 -3 -8
0 1 0 1 0 -4 -1
0 0 1 0 1 0 -2
1 0 0 1 0 -6 -3
0 1 0 0 1 -3 0
1 0 0 0 1 -5 -2
1 1 1 0 0 -5 -10
0 1 1 1 0 -3 -5
0 0 1 1 1 -2 -1
1 0 0 1 1 -7 -1
1 1 0 0 1 -7 -4
1 1 0 1 0 -8 -5
1 1 0 0 1 -7 -4
0 1 1 0 1 -2 -4
1 0 1 1 0 -5 -7
0 1 0 1 1 -5 1
1 1 1 1 0 -7 -9
0 1 1 1 1 -4 -3
1 0 1 1 1 -6 -5
1 1 0 1 1 -9 -3
1 1 1 0 1 -6 -8
1 1 1 1 1 -8 -7
Free Variable
Select x1, arbitrarily
Max z -3 -7 Max z
OF C1 C2 OF
x1 -7 -4 -4 x1 1
x2 -3 -2 -2 x2
x3 -2 1 -4 x3
x4 -1 -2 1 x4
x5 -2 -1 2 x5
Feasibility Check
-9
-10
Max z
0
-7
-3
-2
-1
-2
-10
-5
-3
-3
-9
-4
-4
-8
-5
-9
-12
-6
-5
-10
-12
-11
-12
-7
-10
-6
-13
-8
-12
-13
-14
-15
-9
Passed Fail
-3 -7 -7 -4 -4 -10
C1 C2 OF C1 C2 OF
1 1 x1 1 1 1 x1 1
x2 0 0 0 x2 1
x3 0 0 0 x3 0
x4 0 0 0 x4 0
x5 0 0 0 x5 0
optimal
Pivot Column
R1-R2(NEW) 5 1 0.5556
1 0 0.44444
2.25023 0 1 2.25023 -0.25
R2(old)-R1(new)(0.5556) 3.74977 1 0 -1.2502 0.25
R1
R2
0.11111
or 3x1+2x2<=15
1X2+2.25S1-0.25S2=2.25
1X1-1.25S1+0.25S2=3.75
aint), s2= (2nd constraint) (From setting up the constraint during LP relaxation)
5+2.25x1+1.25x2
S1=6-x1-x2
S2=45-9x1-5x2
0.816496581
0.183503419
4338019706
S1=6-x1-x2
S2=45-9x1-5x2
x1
0
0
0
0
0
0
0
1
1
1
X1 X2 RHS X1 X2 1
1 1 6 6 6 1
9 5 45 5 9 1
2
5 6 2
2
2
2
3
3
3
3
4
4
5
x2 FC1 FC2 z
0 0 0 0 39
1 1 5 5
2 2 10 10
3 3 15 15
4 4 20 20
5 5 25 25
6 6 30 30
0 1 9 8
1 2 14 13
2 3 19 18
3 4 24 23
4 5 29 28
5 6 34 33
0 2 18 16
1 3 23 21
2 4 28 26
3 5 33 31
4 6 38 36
0 3 27 24
1 4 32 29
2 5 37 34
3 6 42 39
0 4 36 32
1 5 41 37
0 5 45 40