0% found this document useful (0 votes)
2 views

Integer Programming

The document outlines various optimization problems including linear programming with constraints and objective functions. It includes tables of data related to average daily payments across regions, investment NPV calculations, and resource allocation for maximizing profit. Additionally, it discusses job scheduling and delays in project completion.

Uploaded by

Adam Tarawi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Integer Programming

The document outlines various optimization problems including linear programming with constraints and objective functions. It includes tables of data related to average daily payments across regions, investment NPV calculations, and resource allocation for maximizing profit. Additionally, it discusses job scheduling and delays in project completion.

Uploaded by

Adam Tarawi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Max z 21x1+11x2

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

max z = 2x1 + 3x2 + 4x3


i=1,2,3
xi<=0
xi>=1000

f (x1, x2, . . . , xn) <= 0


g (x1, x2,..., xn)<= 0

f (x1, x2, . . . , xn) = x1 x1 <= 0 or x1 >= 1,00Constraint 1


g (x1, x2,..., xn)<= 1000-x1 x2 <= 0 or x2 >= 1,00Constraint 2
x3 <= 0 or x3 >= 1,00Constraint 3

1.5x1+3x2+5x3<=6000
30x1+25x2+40x3<=60000
6000
60000

f (x1, x2, . . . , xn) <= My


g (x1, x2,..., xn)<= M(1-y)

x1<=M1y1 1000-x1<=M1(1-y1) M1 2000 4000


x2<=M2y2 1000-x2<=M2(1-y2) M2 2400 2000
x3<=M3y3 1000-x3<=M3(1-y3) M3 1500 1200
y1=0 or 1
y2=0 or 1
y3=0 or 1
Piecewise

Quantity Price (Cents)


x<=0 c(x)=0
0<=x<=500 c(x)<=25x
c(x)<=25(500)+20(x-500)
500<=x<=100=12500+20x-10000
c(x)=20x+2500
c(x)<=25(500)+20(500)+15(x-1000)
1000<=x<=15=12500+10000+15x-15000
c(x)=7500+15x

5000
13500
18500
QuantityPrice (CentsCumulative QuantiTotal Price
500 25 500 12,500
500 20 1000 22,500
500 15 1500 30,000
Euing Gas

Oil 1 Oil 2 Price (Cents) Quantity


Gas 1 (X1) at least .5 12 x<=0
Gas 2 (X2) at least .6 14 0<=x<=500
Resources 500 1000
Max Qty that can be purcha 1500 500<=x<=100
Cost
First 500 25
Second 500 20 1000<=x<=15
Third 500 15
Price (Cents)
c(x)=0
c(x)<=25x
c(x)<=25(500)+20(x-500)
=12500+20x-10000
c(x)=20x+2500
c(x)<=25(500)+20(500)+15(x-1000)
=12500+10000+15x-15000
c(x)=7500+15x

Go to pdf to discuss other co


Back to Excel

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)

try y3=1, y2=0, y1=0, z1=0, z2=0, z3=1, z4=1


800=x=1000z3+1500z4
800=x=(1000,1500)

try y2=1, y1=0, y3=0, z1=0, z2=1, z3=1, z4=0


800=x=500z2+1000z3
800=x=(500,1000)
ess than 1
OF C Ratio Rank
X1 40 40 1.00 3 1/4
X2 80 50 1.60 2 1
X3 10 30 0.33 7
X4 10 10 1.00 3 1
X5 4 10 0.40 6
X6 20 40 0.50 5
X7 60 30 2.00 1 1

30X7=100 50x2=70 10X4=20 40(X1)=10


30(1)=100 50(1)=70 10(1)=20 40(1/4)=10
100-30=70 70-50=20 20-10=10 10-10=0

Substitute to the objective function


max z=40x1+80x2+10x3+4x5+20x6
=40*(1/4)+80*(1)+10*(0)+10*(1)+4*(0)+20*(0)+60*(1)
=160

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

Then proceed explaining the graph, page 528


40(X1)=10
40(1/4)=10 fraction
10-10=0
Days Required
Job Due Date Expected Finish Delay
To Finish a Job
1 6 8 6 0
2 4 4 10 6
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
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

15-21-34-43-52 Optimal Solution


Gary Fort WaynEvansville Terre HautSouth Bend
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

subtours are allowed in LP relaxation (1-5-2-1) and (3-4-3)

in cases that subtours are not allowed, branch and bound can be used.

Min Z 495 1-4-3-1,2-5-2

Gary Fort WaynEvansville Terre HautSouth Bend


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 79 303 196 1000000
Min Z 652
For computation purposes in excel, I use 1000000 instead of M
Assignment using Hungarian Method
City 1 City 2 City 3 City 4 City 5 Minimum
Gary City 1 0 132 217 164 58 58
Fort WayneCity 2 132 0 290 201 79 79
Evansville City 3 217 290 0 113 303 113
Terre HauteCity 4 264 201 113 0 196 113
South BendCity 5 58 79 303 196 0 58

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

Go back to page 42 to discuss fixed and free variables

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

Passed Fail Passed Passed


-6 -6 -12 -5 -10 -9
C1 C2 OF C1 C2 OF
1 1 x1 1 1 1 x1 1
1 1 x2 1 1 1 x2 0
0 0 x3 1 1 1 x3 1
0 0 x4 0 0 0 x4 0
0 0 x5 0 0 0 x5 0
and so on

Passed Passed Passed Passed Fail


-3 -8 -6 -3 -5
C1 C2 OF C1 C2
1 1 x1 0 0 0
0 0 x2 1 1 1
1 1 x3 1 1 1
0 0 x4 1 1 1
0 0 x5 0 0 0
5 1 0.55556 0

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

0 0.1111 Substitute s1= (1st Constraint), s2= (2nd cons


1 -0.1111
.75-.75(6-x1-x2)-.25(45-9x1-5x2)
.75-4.5+.75x1+.75x2-11.25+2.25x1+1.25x2
-15+3x1+2x2<=0

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

You might also like