Example 1- Gromory cutting plane Method

Download Report

Transcript Example 1- Gromory cutting plane Method

Department of Business Administration
FALL-SPRING
Management Science
Operations Research
by
Assoc. Prof. Sami Fethi
© 2007 Pearson Education
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
2
Ch 5: Integer programmimg
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, noninteger 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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
3
Ch 5: Integer programmimg
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
4
Ch 5: Integer programmimg
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:
Required Floor
Space
(sq. ft.)
Purchase
Price
Press
15
$8,000
Lathe
30
4,000
Machine
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
5
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
6
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
7
Ch 5: Integer programmimg
Example 3 : A 0 - 1 Integer Model (1 of 2)
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
Swimming pool
Tennis Center
Athletic field
Gymnasium
Operations Research
Expected Usage
(people/day)
Cost ($)
Land
Requirement
(acres)
300
90
400
150
35,000
10,000
25,000
90,000
4
2
7
3
© 2010/11, Sami Fethi, EMU, All Right Reserved.
8
Ch 5: Integer programmimg
Example 3 : A 0 - 1 Integer Model (2 of 2)
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved.
9
Example 4 : A 0 - 1 Integer Model (1 of 1)
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 10
Example 5: A Mixed Integer Model (1 of
2)
Ch 5: Integer programmimg
$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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 11
Ch 5: Integer programmimg
Example 5: A Mixed Integer Model (2 of 2)
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 12
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 13
Integer Programming Example
Graphical Solution of Maximization Model
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 14
Ch 5: Integer programmimg
Integer Programming Graphical Solution
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 noninteger solution values but may result in a less than
optimal (sub-optimal) solution.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 15
Ch 5: Integer programmimg
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 16
Ch 5: Integer programmimg
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 17
Ch 5: Integer programmimg
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:
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 18
Ch 5: Integer programmimg
Example 1- Gromory 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
0
0
-1/5
-7/5
C-Z
Find the optimal integer solution using Gomory’s cutting
plane method
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 19
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 20
Ch 5: Integer programmimg
Traditional approaches to solving integer programming problems
Pmix
X2
Quan
7/5
X1
0
X2
1
S1
2/5
S2
-1/5
 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 )
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 21
Ch 5: Integer programmimg
Traditional approaches to solving integer programming problems
Pmix
Quan
X1
X2
S1
S2
X2
7/5
0
1
2/5
-1/5
 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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 22
Ch 5: Integer programmimg
Example 1- Gromory cutting plane Method
C
5
3
Pmix
X2
X1
S3
Z
C-Z
Quan
7/5
17/5
-2/5
86/5
3
X1
5
X2
0
S1
0
S2
0
S3
0
1
0
1
0
0
2/5 -1/5
-3/5 4/5
-2/5 -4/5
0
0
1
3
0
5
0
1/5 7/5
-1/5 -7/5
0
0
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 23
Ch 5: Integer programmimg
Example 1- Gromory cutting plane Method
C
5
3
Pmix
X2
X1
S3
Z
C-Z
Quan
7/5
17/5
-2/5*
86/5
3
X1
5
X2
0
S1
0
S2
0
S3
0
1
0
1
0
0
2/5
-3/5
-2/5
-1/5
4/5
-4/5
0
0
1 Min
3
0
5
0
1/5 7/5
-1/5* -7/5*
0
0
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 24
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 25
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 26
Ch 5: Integer programmimg
Example 1- Gromory cutting plane Method
C
5
3
Pmix
X2
X1
Quan
1
S1
Z
C-Z
1
17
4
3
X1
0
1
0
3
0
5
X2
1
0
0
5
0
0
S1
0
0
1
0
0
0
S2
-1
2
2
1
-1
0
S3
1
-3/2
-5/2
1/2
-1/2
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:
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 27
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 28
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
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 Min
Z
0
0
0
0
0
0
2
1
0
0
0
C-Z
Max
Find the optimal integer solution using both simplex and
Gomory’s cutting plane methods
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 29
Ch 5: Integer programmimg
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=
−2/3=
Operations Research
1-2*0
0-2*1/3
© 2010/11, Sami Fethi, EMU, All Right Reserved. 30
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
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
-
0
-1/3
0
-2/3
-
C-Z
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).
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 31
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
Pmix
X1
Quan
10/3
X1
1
X2
2/3
S1
0
S2
1/3
 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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 32
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
C
2
0
0
Pmix
X1
S1
Quan
10/3
S3
Z
C-Z
-1/3
20/3
31/3
Min
2
X1
1
0
0
2
0
1
X2
2/3
11/3
-2/3
4/3
-1/3
Min
0
S1
0
1
0
0
0
0
S2
1/3
-2/3
-1/3
2/3
-2/3
0
S3
0
0
1
0
0
Min
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 33
Ch 5: Integer programmimg
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 34
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
C
1
2
0
Pmix
X2
X1
Quan
1/2
S1
Z
C-Z
17/2
13/2
3
2
X1
0
1
0
2
0
1
X2
1
0
0
1
0
0
S1
0
0
1
0
0
0
S2
1/2
0
-5/2
1/2
-1/2
0
S3
-3/2
1
11/2
13/2
-1/2
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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 35
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
Pmix
X2
Quan
1/2
X1
0
X2
1
S1
0
S2 S3
½ -3/2
 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
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 36
Ch 5: Integer programmimg
Example 2- Gromory cutting plane Method
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
Z
13/2
2
1
0
1/2
1/2
0
0
0
0
-1/2
-1/2
0
C-Z
Min
Min
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.
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 37
Ch 5: Integer programmimg
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)
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 38
Ch 5: Integer programmimg
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)
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 39
Ch 5: Integer programmimg
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)
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 40
Ch 5: Integer programmimg
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
0
-2
0
0
-3/2
-1
C-Z
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 41
Ch 5: Integer programmimg
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:
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 42
Ch 5: Integer programmimg
End of chapter
Operations Research
© 2010/11, Sami Fethi, EMU, All Right Reserved. 43