Integer Programming, Gomory
-
Upload
avinash-juriani -
Category
Engineering
-
view
184 -
download
1
Transcript of Integer Programming, Gomory
Integer Programming Exclusive Including Gomory Method
Edited by Avinash Juriani
Management Science
Operations Research
by
Assoc. Prof. Sami Fethi
© 2007 Pearson Education
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 2
Chapter Topics
Integer Programming (IP) Models
Examples for Integer Programming (IP) Models
Integer Programming Graphical Solution
Traditional approaches to solving integer
programming problems
Branch and Bound Method
Gomory cutting plane Method
Examples for Gomory cutting plane Method
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 3
Why used?
The implicit assumption was that solutions could be
fractional or real numbers (i.e., non-integer) in the linear
programming models. However, non-integer solutions
are always practical.
When only integer solutions are practical or logical, non-
integer solution values can be rounded off to the nearest
feasible integer values.
For example, if the case is nail, it will cause little
concern considering 8000.4 nails as 8000 nails. Round
off makes the case cost only a few cents apeice.
For example, if the case is a production of jet aircraft,
round off could affect profit or cost by million dollar
considering 7.4 jet airliners as 7 or 8.
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 4
Integer Programming Models: Types of Models
Total Integer Model: All decision variables required to have
integer solution values.
0-1 Integer Model: All decision variables required to have
integer values of zero or one.
Mixed Integer Model: Some of the decision variables (but
not all) required to have integer values.
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 5
Example 1: A Total Integer Model (1 of 2)
Machine shop obtaining new presses and lathes.
Marginal profitability: each press $100/day; each lathe
$150/day.
Resource constraints: $40,000, 200 sq. ft. floor space.
Machine purchase prices and space requirements:
Machine
Required Floor Space (sq. ft.)
Purchase Price
Press Lathe
15
30
$8,000
4,000
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 6
A Total Integer Model (2 of 2)
Integer Programming Model:
Maximize Z = $100x1 + $150x2
subject to:
8,000x1 + 4,000x2 $40,000
15x1 + 30x2 200 ft2
x1, x2 0 and integer
x1 = number of presses
x2 = number of lathes
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 7
Example 2: A Total Integer Model (1 of 1)
Integer Programming Model:
Maximize Z = 6x1 + 5x2 + 2x3
subject to:
10 x1 + 4 x2 + 2 x3 600
2 x1 + 5 x2 + 2 x3 800
x1, x2 ,,x3 0 and integer
x1 = 22
x2 = 0
x3 = 378
Z=888
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 8
Recreation facilities selection to maximize daily usage by
residents.
Resource constraints: $120,000 budget; 12 acres of land.
Selection constraint: either swimming pool or tennis center
(not both).
Data:
Recreation Facility
Expected Usage (people/day)
Cost ($) Land
Requirement (acres)
Swimming pool Tennis Center Athletic field Gymnasium
300 90 400 150
35,000 10,000 25,000 90,000
4 2 7 3
Example 3 : A 0 - 1 Integer Model (1 of 2)
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 9
Integer Programming Model:
Maximize Z = 300x1 + 90x2 + 400x3 + 150x4
subject to:
$35,000x1 + 10,000x2 + 25,000x3 + 90,000x4 $120,000
4x1 + 2x2 + 7x3 + 3x4 12 acres
x1 + x2 1 facility
x1, x2, x3, x4 = 0 or 1
x1 = construction of a swimming pool
x2 = construction of a tennis center
x3 = construction of an athletic field
x4 = construction of a gymnasium
Example 3 : A 0 - 1 Integer Model (2 of 2)
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 10
Example 4 : A 0 - 1 Integer Model (1 of 1)
Integer Programming Model:
Maximize Z = 6x1 + 5x2 + 2x3
subject to:
10 x1 + 4 x2 + 2 x3 600
2 x1 + 5 x2 + 2 x3 800
x1, x2 ,,x3 0 or 1
x1 = 1
x2 = 1
x3 = 1
Z=13
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 11
Example 5: A Mixed Integer Model (1 of
2)
$250,000 available for investments providing greatest
return after one year.
Data:
Condominium cost $50,000/unit, $9,000 profit if sold
after one year.
Land cost $12,000/ acre, $1,500 profit if sold after one
year.
Municipal bond cost $8,000/bond, $1,000 profit if sold
after one year.
Only 4 condominiums, 15 acres of land, and 20
municipal bonds available.
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 12
Integer Programming Model:
Maximize Z = $9,000x1 + 1,500x2 + 1,000x3
subject to:
50,000x1 + 12,000x2 + 8,000x3 $250,000
x1 4 condominiums
x2 15 acres
x3 20 bonds
x2 0
x1, x3 0 and integer
x1 = condominiums purchased
x2 = acres of land purchased
x3 = bonds purchased
Example 5: A Mixed Integer Model (2 of 2)
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 13
Example 6 : A Mixed Integer Model (1 of 1)
Integer Programming Model:
Maximize Z = 6x1 + 5x2 + 2x3
subject to:
10 x1 + 4 x2 + 2 x3 600
2 x1 + 5 x2 + 2 x3 800
x1, x2 ,,x3 0
x1 = 22.2
x2 = 0
x3 = 377.8
Z=888.9
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 14
Integer Programming Example
Graphical Solution of Maximization Model
Maximize Z = $100x1 + $150x2
subject to:
8,000x1 + 4,000x2 $40,000
15x1 + 30x2 200 ft2
x1, x2 0 and integer
Optimal Solution:
Z = $1,055.56
x1 = 2.22 presses
x2 = 5.55 lathes
Figure 1 Feasible Solution Space with Integer Solution Points
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 15
Rounding non-integer solution values up to the
nearest integer value can result in an infeasible
solution.
A feasible solution is ensured by rounding down non-
integer solution values but may result in a less than
optimal (sub-optimal) solution.
Integer Programming Graphical Solution
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 16
Traditional approaches to solving integer programming problems
Branch and Bound Method
Based on principle that total set of feasible solutions
can be partitioned into smaller subsets of solutions.
Smaller subsets evaluated until best solution is found.
Method is a tedious and complex mathematical
process.
This method can be used more easier If Excel or QM is
conducted.
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 17
Traditional approaches to solving integer programming problems
Gomory cutting plane Method
In 1958 Ralph Gomory was the first individual to
develop a systematic (algorithmic) approach for solving
linear integer programming problems.
His method is an algebraic approach based on the
systematic addition of new constraints (or cuts), which
are satisfied by an integer solution but not by a
continous variable solution.
The idea of a cut is a new contstraint permits the new
feasible region to include all the feasible integer solution
for the original constraints, but it does not include the
optimal noninteger solution originally found.
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 18
Example 1- Gromory cutting plane Method
Integer Programming Model: Gromory’s fractional cut
Maximize Z = $ 3x1 + $ 5x2
subject to:
1 x1 + 4 x2 9
2 x1 + 3 x2 4
Non-negativity
x1, x2 0
Given the optimal noninteger solution to the problem:
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 19
Example 1- Gromory cutting plane Method
Find the optimal integer solution using Gomory’s cutting
plane method
3 5 0 0
C Pmix Quan X1 X2 S1 S2
5 X2 7/5 0 1 2/5 -1/5
3 X1 17/5 1 0 -3/5 4/5
Z 86/5 3 5 1/5 7/5
C-Z 0 0 -1/5 -7/5
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 20
Traditional approaches to solving integer programming problems
Steps in Gomory cutting plane Method
To find the cut, we arbitrarily choose one of
noninteger variables in the optimal solution.
We choose X2 and need to rewrite this row with any
noninteger value in it express as the sum of an
integer and a non negative fraction less than 1.
The numbers in such process should be rewritten:
4/3=1+1/3
5/4=1+1/4
2/3=0+2/3
-2/3=-1+1/3
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 21
Traditional approaches to solving integer programming problems
Steps in Gomory cutting plane Method
Initially, we write these values in the C row (1, 2/5, -1/5, 7/5)
as the sum of an integer and a nonnegative fraction less
than 1.
(1+0) X2+ (0+2/5) S1 + (-1+4/5) S2= (1+2/5)
Then we take all the integer coefficient to the right-hand
side:
2/5 S1 +4/5 S2= (2/5+1-1X2+1S2)
2/5 S1 +4/5 S2= (2/5+some integer )
Pmix Quan X1 X2 S1 S2
X2 7/5 0 1 2/5 -1/5
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 22
Traditional approaches to solving integer programming problems
Steps in Gomory cutting plane Method
Omitting some integer part and write the cut eqn as follow:
The eqn must be greater than or equal 2/5.
2/5 S1 +4/5 S2 ≥ 2/5
For the sake of simplicity, we multiply the eqn by -1 and we
avoid having to deal with subtracted slack variables which
require an artificial variable.
- 2/5 S1 - 4/5 S2 ≤ - 2/5
- 2/5 S1 - 4/5 S2 + S3 = - 2/5 -This is the required cut.
Pmix Quan X1 X2 S1 S2
X2 7/5 0 1 2/5 -1/5
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 23
Example 1- Gromory cutting plane Method
We add the required cut in the new simplex tableau. Since C-Z
values are zero or negative, it is difficult to determine which
variable to bring into the solution. However, if there is any
negative number within the quantity column, the number should
leave from the system so S3 should be taken into account.
3 5 0 0 0
C Pmix Quan X1 X2 S1 S2 S3
5 X2 7/5 0 1 2/5 -1/5 0
3 X1 17/5 1 0 -3/5 4/5 0
S3 -2/5 0 0 -2/5 -4/5 1
Z 86/5 3 5 1/5 7/5 0
C-Z 0 0 -1/5 -7/5 0
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 24
Example 1- Gromory cutting plane Method
Now divide the negative values in the S3 row into the
corresponding values in C-Z row and bring in that variable which
has the smallest quotient:
S1=(- 1/5)/ (-2/5)= ½, S2=(- 7/5)/ (-1/4)= 7/4, S1 is the smallest
one so S1 comes in whilst S3 goes out.
3 5 0 0 0
C Pmix Quan X1 X2 S1 S2 S3
5 X2 7/5 0 1 2/5 -1/5 0
3 X1 17/5 1 0 -3/5 4/5 0
S3 -2/5* 0 0 -2/5 -4/5 1 Min
Z 86/5 3 5 1/5 7/5 0
C-Z 0 0 -1/5* -7/5* 0
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 25
Example 1- Gromory cutting plane Method
S3 is leaving from the system and S1 is entering
into the system.
New S1 =( 1, 0, 0, 1, 2, -5/2)
New X2 = old X2- key * New S1
1= 7/5-2/5*1
0= 0-2/5*0
1= 1-2/5*0
0= 2/5-2/5*1
−1= -1/5-2/5*2
1= 0-2/5*-5/2
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 26
Example 1- Gromory cutting plane Method
S3 is leaving from the system and S1 is entering into
the system
New S1 =( 1, 0, 0, 1, 2, -5/2)
New X1 = old X1- key * New S1
4= 17/5-(-3/5)*1
1= 1-(-3/5)*0
0= 0-(-3/5)*0
0= -3/5-(-3/5)*1
2= 4/5-(-3/5)*2
-3/2= 0-(-3/5)*-5/2
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 27
Example 1- Gromory cutting plane Method
Now, we know that the optimal solution has been reached. It
manufactures 4 tables and 1 chair and this uses all the hours
available except for 1 hour in department 1 since S1 has the
value 1 in the final solution. The profit earned by this optimal
integer solution is $ 17 which is only slightly lower than $86/5 ($
17.20) profit earned by the optimal noninteger solution in the first
Table:
3 5 0 0 0
C Pmix Quan X1 X2 S1 S2 S3
5 X2 1 0 1 0 -1 1
3 X1 4 1 0 0 2 -3/2
S1 1 0 0 1 2 -5/2
Z 17 3 5 0 1 1/2
C-Z 0 0 0 -1 -1/2
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 28
Example 2- Gromory cutting plane Method
Integer Programming Model: Gromory’s fractional cut
Maximize Z = $ 2x1 + $ 1x2
subject to:
2 x1 + 5 x2 17
3 x1 + 2 x2 10
Non-negativity
x1, x2 0 and integer
(a) Find the optimal integer solution using simplex method
(b) Find the optimal integer solution using Gomory’s cutting
plane method
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 29
Example 2- Gromory cutting plane Method
Find the optimal integer solution using both simplex and
Gomory’s cutting plane methods
2 1 0 0
C Pmix Quan X1 X2 S1 S2 Q/XS
0 S1 17 2 5 1 0 17/2
0 S2 10 1 0 0 1 10/1
Z 0 0 0 0 0 0
C-Z 2 1 0 0 0
Max
Min
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 30
Example 2- Gromory cutting plane Method
S2 is leaving from the system and X1 is entering into the
system.
New X1 =( 10/3, 3/3, 2/3, 0, 1/3)
New S1 = old S1- key * New X1
31/3= 17-2*10/3
0= 2-2*3/3
11/3= 5-2*2/3
1= 1-2*0
−2/3= 0-2*1/3
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 31
Example 2- Gromory cutting plane Method
This is the optimal solution, however the values in Quantity
column are noninteger. It seems that the simplex technique
applied in part (a) is not good enough so we need to use
Gromory cutting plane method in part (b).
2 1 0 0
C Pmix Quan X1 X2 S1 S2 Q/XS
0 S1 31/3 0 11/3 1 -2/3 -
2 X1 10/3 1 2/3 0 1/3 -
Z 20/3 2 4/3 0 2/3 -
C-Z 0 -1/3 0 -2/3 -
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 32
Example 2- Gromory cutting plane Method
Steps in Gomory cutting plane Method
(1+0) X1+ (0+2/3) X2 + (0+1/3) S2= (3+1/3)
X1+2/3X2+1/3S2= 3+1/3
2/3 X2 +1/3 S2= 1/3+(3-1X1)
2/3 X2 +1/3 S2 = (1/3+some integer ) (multiply by -1
and add S3 variable).
-2/3 X2 -1/3 S2 + S3= -1/3
Pmix Quan X1 X2 S1 S2
X1 10/3 1 2/3 0 1/3
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 33
Example 2- Gromory cutting plane Method
Now divide the negative values in the S3 row into the
corresponding values in C-Z row and bring in that variable
which has the smallest quotient:
X2=(- 1/3)/ (-2/3)= ½, S2=(- 2/3)/ (-1/3)= 2, X2 is the smallest
one so X2 comes in whilst S3 goes out.
2 1 0 0 0
C Pmix Quan X1 X2 S1 S2 S3
2 X1 10/3 1 2/3 0 1/3 0
0 S1 31/3 0 11/3 1 -2/3 0
0 S3 -1/3 0 -2/3 0 -1/3 1
Z 20/3 2 4/3 0 2/3 0
C-Z 0 -1/3 0 -2/3 0
Min
Min Min
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 34
Example 2- Gromory cutting plane Method
S3 is leaving from the system and X2 is entering into the
system.
New X2 =( 1/2, 0, 1, 0, ½, -3/2)
New S1 = old S1- key * New X2
17/2= 31/3-11/3*1/2
0= 0-11/3*0
0= 11/3-11/3*1
1= 1-11/3*0
−5/2= -2/3-11/3*1/2
11/2= 0-11/3*-3/2
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 35
Example 2- Gromory cutting plane Method
This is the optimal solution, however the values in Quantity
column are noninteger so we need to use Gromory cutting
plane method in choosing the smallest value in Quantity
column. We therefore selected X2
2 1 0 0 0
C Pmix Quan X1 X2 S1 S2 S3
1 X2 1/2 0 1 0 1/2 -3/2
2 X1 3 1 0 0 0 1
0 S1 17/2 0 0 1 -5/2 11/2
Z 13/2 2 1 0 1/2 13/2
C-Z 0 0 0 -1/2 -1/2
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 36
Example 2- Gromory cutting plane Method
Steps in Gomory cutting plane Method
(0) X1+ (1+0) X2 + (0) S1+ (0+1/2) S2+ (-1+1/2) S3 =(0+1/2)
X2+1/2 S2-S3-1/2 S3= 1/2
1/2 S2 -1/2 S3= (or ≥) 1/2+(1S3-1X2)
1/2 S2 -1/2 S3 ≥ (1/2+some integer ) (multiply by -1 and
add S4 variable).
-1/2 S2 +1/2 S3 ≤ -1/2
-1/2 S2 + 1/2 S3 + S4 = -1/2
Pmix Quan X1 X2 S1 S2 S3
X2 1/2 0 1 0 ½ -3/2
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 37
Example 2- Gromory cutting plane Method
Now divide the negative values in the S4 row into the corresponding values in C-Z row
and bring in that variable which has the smallest quotient:
S2=(- 1/2)/ (-1/2)= 1, S3=(- 1/2)/ (1/2)= -1, S2 is the smallest one so S2 comes in whilst
S4 goes out.
2 1 0 0 0 0
C Pmix Quan X1 X2 S1 S2 S3 S4
1 X2 1/2 0 1 0 1/2 -3/2 0
2 X1 3 1 0 0 0 1 0
0 S1 17/2 0 0 1 -5/2 11/2 0
0 S4 -1/2 0 0 0 -1/2 1/2 1 Min
Z 13/2 2 1 0 1/2 1/2 0
C-Z 0 0 0 -1/2 -1/2 0
Min
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 38
Example 2- Gromory cutting plane Method
S2 is leaving from the system and S4 is entering into the
system.
New S2 =( 1, 0, 0, 0, 1,-1 -2)
New X2 = old X2- key * New S2
0= 1/2-1/2*1
0= 0-1/2*0
1= 1-1/2*0
0= 0-1/2*0
0= 1/2-1/2*(1)
-½ = -3/2-1/2*(-1)
1= 0-1/2*(-2)
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 39
Example 2- Gromory cutting plane Method
S2 is leaving from the system and S4 is entering into the
system.
New S2 =( 1, 0, 0, 0, 1,-1 -2)
New X1 = old X1- key * New S2
3= 3-0*1
1= 1-0*0
0= 0-0*0
0= 0-0*0
0= 0-0*(1)
1 = 1-0*(-1)
0= 0-0*(-2)
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 40
Example 2- Gromory cutting plane Method
S2 is leaving from the system and S4 is entering into the
system.
New S2 =( 1, 0, 0, 0, 1,-1 -2)
New S1 = old S1- key * New S2
11= 17/2-(-5/2)*1
0= 0-(-5/2) *0
0= 0-(-5/2) *0
1= 1- (-5/2) *0
0= -5/2- (-5/2) *(1)
3 = 11/2-(-5/2) *(-1)
-5= 0-(-5/2) *(-2)
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 41
Example 2- Gromory cutting plane Method
2 1 0 0 0 0
C Pmix Quan X1 X2 S1 S2 S3 S4
1 X2 0 0 1 0 0 -1/2 1
2 X1 3 1 0 0 0 1 0
0 S1 11 0 0 1 0 3 -5
0 S2 1 0 0 0 1 -1 -2
Z 6 2 1 0 0 3/2 1
C-Z 0 -2 0 0 -3/2 -1
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 42
Example 2- Gromory cutting plane Method
Now, we know that the optimal solution has been reached. It
manufactures 3 mugs and 0 bowl and this uses all the hours and
materials available except for 11 hours of labor as well as 1 lb of
clay since S1 and S2 have the value 11 and 1 in the final solution
row. The profit earned by this optimal integer solution is $ 6 which
is only slightly lower than $20/3 ($ 6.66) profit earned by the
optimal noninteger solution in the first Table:
Ch 5: Integer programmimg
Operations Research © 2010/11, Sami Fethi, EMU, All Right Reserved. 43
End of chapter