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

Lecture 28 30

The document discusses integer programming, which involves decision variables that must take integer values, and outlines three types: pure integer, mixed-integer, and zero-one integer programming. It explains the challenges of solving integer programming problems compared to linear programming and introduces the branch-and-bound method as a common solution technique. An example involving Harrison Electric Company illustrates the application of integer programming to maximize profit from producing chandeliers and ceiling fans under specific production constraints.

Uploaded by

f20221605
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lecture 28 30

The document discusses integer programming, which involves decision variables that must take integer values, and outlines three types: pure integer, mixed-integer, and zero-one integer programming. It explains the challenges of solving integer programming problems compared to linear programming and introduces the branch-and-bound method as a common solution technique. An example involving Harrison Electric Company illustrates the application of integer programming to maximize profit from producing chandeliers and ceiling fans under specific production constraints.

Uploaded by

f20221605
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

Integer Programming

 An integer programming model is one where one


or more of the decision variables has to take on
an integer value in the final solution
 There are three types of integer programming
problems
1. Pure integer programming where all variables
have integer values
2. Mixed-integer programming where some but
not all of the variables will have integer
values
3. Zero-one integer programming are special
cases in which all the decision variables must
have integer solution values of 0 or 1
1
Integer Programming
 Solving an integer programming problem is
much more difficult than solving an LP
problem
 Even the fastest computers can take an
excessively long time to solve big integer
programming problems
 The most common technique used to solve
integer programming problems is the branch
and bound method

2
Harrison Electric Company Example
of Integer Programming
 The Company produces two products popular with home
renovators, old-fashioned chandeliers and ceiling fans
 Both the chandeliers and fans require a two-step
production process involving wiring and assembly
 It takes about 2 hours to wire each chandelier and 3 hours
to wire a ceiling fan
 Final assembly of the chandeliers and fans requires 6 and 5
hours respectively
 The production capability is such that only 12 hours of
wiring time and 30 hours of assembly time are available

3
Harrison Electric Company Example
of Integer Programming
 Each chandelier produced nets the firm $7 and each fan
$6
 Harrison’s production mix decision can be formulated
using LP as follows

Maximize profit = $7X1 + $6X2


subject to 2X1 + 3X2 ≤ 12 (wiring hours)
6X1 + 5X2 ≤ 30 (assembly hours)
X1, X2 ≥ 0 (nonnegative)
where
X1 = number of chandeliers produced
X2 = number of ceiling fans produced

4
Harrison Electric Company Example
of Integer Programming
X2
6–

5–
6X1 + 5X2 ≤ 30

4–
+ = Possible Integer Solution
3– +
Optimal LP Solution
(X1 =3.75, X2 = 1.5,
2– + + + Profit = $35.25)

2X1 + 3X2 ≤ 12
1– + + + +

0 |– | | | | | |

1 2 3 4 5 6 X1
5
Harrison Electric Company Example
of Integer Programming
 The production planner Wes recognizes this is an integer
problem
 His first attempt at solving it is to round the values to X1 =
4 and X2 = 2
 However, this is not feasible
 Rounding X2 down to 1 gives a feasible solution, but it
may not be optimal
 This could be solved using the enumeration method
 Enumeration is generally not possible for large problems

6
Harrison Electric Company Example
of Integer Programming
CHANDELIERS (X1) CEILING FANS (X2) PROFIT ($7X1 + $6X2)  Integer
0 0 $0
solutions
1 0 7
2 0 14
3 0 21
4 0 28
5 0 35 Optimal solution to
0 1 6 integer programming
1 1 13 problem
2 1 20
3 1 27
4 1 34 Solution if
0 2 12 rounding is used
1 2 19
2 2 26
3 2 33
0 3 18
1 3 25
0 4 24
7
Harrison Electric Company Example
of Integer Programming
 The rounding solution of X1 = 4, X2 = 1 gives a
profit of $34
 The optimal solution of X1 = 5, X2 = 0 gives a
profit of $35
 The optimal integer solution is less than the
optimal LP solution
 An integer solution can never be better than the
LP solution and is usually a lesser solution

8
Branch-and-Bound Method
 The most common algorithm for solving integer
programming problems is the branch-and-bound method
 It starts by first allowing non-integer solutions
 If these values are integer valued, this must also be the
solution to the integer problem
 If these variables are not integer valued, the feasible
region is divided by adding constraints restricting the
value of one of the variables that was not integer valued
 The divided feasible region results in subproblems that are
then solved

9
Branch-and-Bound Method
 Bounds on the value of the objective function are found
and used to help determine which subproblems can be
eliminated and when the optimal solution has been found
 If a solution is not optimal, a new subproblem is selected
and branching continues

10
Six Steps in Solving IP
Maximization Problems by Branch and
Bound
1. Solve the original problem using LP. If the answer satisfies
the integer constraints, we are done. If not, this value
provides an initial upper bound.
2. Find any feasible solution that meets the integer
constraints for use as a lower bound. Usually, rounding
down each variable will accomplish this.
3. Branch on one variable from step 1 that does not have an
integer value. Split the problem into two subproblems
based on integer values that are immediately above or
below the noninteger value.
4. Create nodes at the top of these new branches by solving
the new problem

11
Six Steps in Solving IP
Maximization Problems by Branch and
Bound
5. (a) If a branch yields a solution to the LP problem
that is not feasible, terminate the branch
(b) If a branch yields a solution to the LP problem
that is feasible, but not an integer solution, go to
step 6
(c) If the branch yields a feasible integer solution,
examine the value of the objective function. If
this value equals the upper bound, an optimal
solution has been reached. If it not equal to the
upper bound, but exceeds the lower bound,
terminate this branch. 12
Six Steps in Solving IP
Maximization Problems by Branch and
Bound
6. Examine both branches again and set the upper bound
equal to the maximum value of the objective function at
all final nodes. If the upper bound equals the lower bound,
stop. If not, go back to step 3.

Note: Minimization problems involved


reversing the roles of the upper and
lower bounds

13
Harrison Electric Company Revisited

 Recall that the Harrison Electric Company’s integer


programming formulation is
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30
where
X1 = number of chandeliers produced
X2 = number of ceiling fans produced

 And the optimal noninteger solution is

X1 = 3.75 chandeliers, X2 = 1.5 ceiling fans


profit = $35.25

14
Harrison Electric Company Revisited

 Since X1 and X2 are not integers, this solution


is not valid
 The profit value of $35.25 will provide the
initial upper bound
 We can round down to X1 = 3, X2 = 1, profit =
$27, which provides a feasible lower bound
 The problem is now divided into two
subproblems

15
Harrison Electric Company Revisited

Subproblem A
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30
X1 ≥4

Subproblem B
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30
X1 ≤3

16
Harrison Electric Company Revisited

 If you solve both subproblems graphically

Subproblem A’s optimal


solution: [X1 = 4, X2 = 1.2, profit = $35.20]

Subproblem B’s optimal


solution: [X1 = 3, X2 = 2, profit = $33.00]

 We have completed steps 1 to 4 of the branch and bound method

17
Harrison Electric Company Revisited

 Harrison Electric’s first branching:


subproblems A and B Next Branch (C)
Subproblem A

X1 = 4 Infeasible (Noninteger) Solution


X2 = 1.2 Upper Bound = $35.20
Lower Bound = $33.00
P = 35.20

Next Branch (D)


X1 = 3.75 Upper Bound = $35.25
X2 = 1.5 Lower Bound = $27.00 (From
P = 35.25 Rounding Down)
Subproblem B

X1 = 3
X2 = 2
P = 33.00
Stop This Branch
Figure 11.2 Solution Is Integer, Feasible
Provides New Lower Bound of $33.00
18
Harrison Electric Company Revisited

 Subproblem A has branched into two new subproblems, C


and D
Subproblem C
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30
X1 ≥ 4
X2 ≥ 2

Subproblem D
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30
X1 ≥ 4
X2 ≤ 1
19
Harrison Electric Company Revisited

 Subproblem C has no feasible solution


because the all the constraints can not be
satisfied
 We terminate this branch and do not consider
this solution
 Subproblem D’s optimal solution is X1 = 4.17,
X2 = 1, profit = $35.16
 This noninteger solution yields a new upper
bound of $35.16

20
Harrison Electric Company Revisited

 Finally we create subproblems E and F


Subproblem E
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30 Optimal solution to E:
X1 ≥ 4 X1 = 4, X2 = 1, profit = $34
X1 ≤ 4
X2 ≤ 1
Subproblem D
Maximize profit = $7X1 + $6X2
subject to 2X1 + 3X2 ≤ 12
6X1 + 5X2 ≤ 30 Optimal solution to F:
X1 ≥ 4 X1 = 5, X2 = 0, profit = $35
X1 ≥ 5
X2 ≤ 1
21
Harrison Electric Company Revisited

 The stopping rule for the branching process is that we


continue until the new upper bound is less than or equal
to the lower bound
 or no further branching is possible
 The later case applies here since both branches yielded
feasible integer solutions
 The optimal solution is subproblem F’s node
 Computer solutions work well on small and medium
problems
 For large problems the analyst may have to settle for a
near-optimal solution

22
Harrison Electric Company Revisited

 Harrison Electric’s full branch and bound solution


Subproblem C

No Feasible
Solution
Region
Subproblem A Subproblem E

X1 = 4 X1 = 4
X2 = 1.2 X2 = 1 Feasible, Integer
P = 35.20 P = 34.00 Solution
Subproblem D

X1 = 3.75 X1 = 4.17
X2 = 1.5 X2 = 1
P = 35.25 P = 35.16
Subproblem B Subproblem F

X1 = 3 Upper Bound X1 = 5
X2 = 2 = $35.25 X2 = 0
P = 33.00 Lower Bound P = 35.00
= $27.00
Optimal
Solution

23
Mixed-Integer Programming Problem
Example
 There are many situations in which some of the variables are
restricted to be integers and some are not
 Bagwell Chemical Company produces two industrial
chemicals
 Xyline must be produced in 50-pound bags
 Hexall is sold by the pound and can be produced in any
quantity
 Both xyline and hexall are composed of three ingredients – A,
B, and C
 Bagwell sells xyline for $85 a bag and hexall for $1.50 per
pound

24
Mixed-Integer Programming
Problem Example
AMOUNT OF
AMOUNT PER 50-POUND AMOUNT PER POUND INGREDIENTS
BAG OF XYLINE (LB) OF HEXALL (LB) AVAILABLE
30 0.5 2,000 lb–ingredient A

18 0.4 800 lb–ingredient B

2 0.1 200 lb–ingredient C

 Bagwell wants to maximize profit


 We let X = number of 50-pound bags of xyline
 We let Y = number of pounds of hexall
 This is a mixed-integer programming problem as Y is not
required to be an integer
25
Mixed-Integer Programming
Problem Example
 The model is

Maximize profit = $85X + $1.50Y


subject to 30X + 0.5Y ≤ 2,000
30X + 0.5Y ≤ 800
30X + 0.5Y ≤ 200
X, Y ≥ 0 and X integer

26
Mixed-Integer Programming
Problem Example
 Excel formulation of Bagwell’s IP problem with Solver

27
Mixed-Integer Programming
Problem Example
 Excel solution to the Bagwell Chemical problem

28
Modeling With 0-1 (Binary)
Variables
 We can demonstrate how 0-1 variables can be
used to model several diverse situations
 Typically a 0-1 variable is assigned a value of 0 if
a certain condition is not met and a 1 if the
condition is met
 This is also called a binary variable

29
Capital Budgeting Example

 A common capital budgeting problem is selecting from a


set of possible projects when budget limitations make it
impossible to select them all
 A 0-1 variable is defined for each project
 Quemo Chemical Company is considering three possible
improvement projects for its plant
 A new catalytic converter
 A new software program for controlling operations
 Expanding the storage warehouse
 It can not do them all
 They want to maximize net present value of projects
undertaken

30
Capital Budgeting Example
 Quemo Chemical Company information

PROJECT NET PRESENT VALUE YEAR 1 YEAR 2


Catalytic Converter $25,000 $8,000 $7,000
Software $18,000 $6,000 $4,000
Warehouse expansion $32,000 $12,000 $8,000
Available funds $20,000 $16,000

Table 11.2
 The basic model is
Maximize net present value of projects undertaken
subject to Total funds used in year 1 ≤ $20,000
Total funds used in year 2 ≤ $16,000
31
Capital Budgeting Example
 The decision variables are

X1 = 1 if catalytic converter project is funded


0 otherwise
X2 = 1 if software project is funded
0 otherwise
X3 = 1 if warehouse expansion project is funded
0 otherwise

 The mathematical statement of the integer


programming problem becomes
Maximize NPV = 25,000X1 + 18,000X2 + 32,000X3
subject to 8,000X1 + 6,000X2 + 12,000X3 ≤ 20,000
7,000X1 + 4,000X2 + 8,000X3 ≤ 16,000
X1, X2, X3 = 0 or 1
32
Capital Budgeting Example

 Solved with computer software, the optimal


solution is X1 = 1, X2 = 0, and X3 = 1 with an
objective function value of 57,000
 This means that Quemo Chemical should fund
the catalytic converter and warehouse expansion
projects only
 The net present value of these investments will
be $57,000

33
Limiting the Number of
Alternatives Selected
 One common use of 0-1 variables involves limiting the
number of projects or items that are selected from a
group
 Suppose Quemo Chemical is required to select no more
than two of the three projects regardless of the funds
available
 This would require adding a constraint
X1 + X2 + X3 ≤ 2
 If they had to fund exactly two projects the constraint
would be
X1 + X2 + X3 = 2
34
Dependent Selections

 At times the selection of one project depends on the


selection of another project
 Suppose Quemo’s catalytic converter could only be
purchased if the software was purchased
 The following constrain would force this to occur
X1 ≤ X2 or X1 – X2 ≤ 0
 If we wished for the catalytic converter and software
projects to either both be selected or both not be
selected, the constraint would be
X1 = X2 or X1 – X2 = 0

35
Fixed-Charge Problem Example

 Often businesses are faced with decisions involving a


fixed charge that will affect the cost of future operations
 Sitka Manufacturing is planning to build at least one new
plant and three cities are being considered in
 Baytown, Texas
 Lake Charles, Louisiana
 Mobile, Alabama
 Once the plant or plants are built, the company want to
have capacity to produce at least 38,000 units each year

36
Fixed-Charge Problem Example

 Fixed and variable costs for Sitka Manufacturing

ANNUAL VARIABLE COST ANNUAL


SITE FIXED COST PER UNIT CAPACITY
Baytown, TX $340,000 $32 21,000

Lake Charles, LA $270,000 $33 20,000

Mobile, AL $290,000 $30 19,000

Table 11.3

37
Fixed-Charge Problem Example

 We can define the decision variables as


X1 = 1 if factory is built in Baytown
0 otherwise

X2 = 1 factory is built in Lake Charles


0 otherwise

X3 = 1 if factory is built in Mobile


0 otherwise
X4 = number of units produced at Baytown plant

X5 = number of units produced at Lake Charles plant

X6 = number of units produced at Mobile plant

38
Fixed-Charge Problem Example

 The integer programming formulation becomes


Minimize cost = 340,000X1 + 270,000X2 + 290,000X3
+ 32X4 + 33X5 + 30X6
subject to X4 + X5 + X6 ≥ 38,000
X4 ≤ 21,000X1
X5 ≤ 20,000X2
X6 ≤ 19,000X3
X1, X2, X3 = 0 or 1;
X4, X5, X6 ≥ 0 and integer
 The optimal solution is

X1 = 0, X2 = 1, X3 = 1, X4 = 0, X5 = 19,000, X6 = 19,000
Objective function value = $1,757,000

39
Financial Investment Example

 Numerous financial applications exist with 0-1 variables


 Simkin, Simkin, and Steinberg specialize in
recommending oil stock portfolios for wealthy clients
 One client has the following specifications
 At least two Texas firms must be in the portfolio
 No more than one investment can be made in a foreign oil
company
 One of the two California oil stocks must be purchased
 The client has $3 million to invest and wants to buy large
blocks of shares

40
Financial Investment Example

 Oil investment opportunities


EXPECTED ANNUAL COST FOR BLOCK
STOCK COMPANY NAME RETURN ($1,000s) OF SHARES ($1,000s)
1 Trans-Texas Oil 50 480

2 British Petroleum 80 540

3 Dutch Shell 90 680

4 Houston Drilling 120 1,000

5 Texas Petroleum 110 700

6 San Diego Oil 40 510

7 California Petro 75 900

41
Financial Investment Example

 Model formulation

Maximize return = 50X1 + 80X2 + 90X3 + 120X4 + 110X5 + 40X6 + 75X7

subject to
X1 + X4 + X5 ≥ 2 (Texas constraint)
X2+ X3 ≤ 1 (foreign oil constraint)
X6 + X7 = 1 (California constraint)
480X1 + 540X2 + 680X3 + 1,000X4 + 700X5
+ 510X6 + 900X7 ≤ 3,000 ($3 million limit)

All variables must be 0 or 1

42
Using Excel to Solve the
Simkin Example
 Solver input for Simkin’s 0-1 variables

43
Using Excel to Solve the
Simkin Example
 Complete Solver input for Simkin’s 0-1 integer
programming problem

44
Using Excel to Solve the
Simkin Example
 Excel solution to Simkin’s 0-1 integer programming
problem

45
INTEGER LINEAR PROGRAMMING
1. There are many LP problems in which the
decision variables will take only integer values.
2. If all the decision variables will only take integer
values it is called a pure integer LPP;
3. otherwise the problem is called a mixed integer
LPP.
4. We discuss Land-Doig Branch and Bound
algorithm to solve an integer LPP.

46
Branch-and-Bound Algorithm
(Problem 2a problem set 9.2A page 378)
Maximize
z  3x1  2x2
Subject to
2 x1  5x2  9

4x1  2x2  9

x1 , x2  0 and integers

47
The set of feasible region consists of the Lattice points
(0,0),(1,0),(2,0),(0,1),(1,1).
The associated LPP, LP0 is defined by removing the
integer restrictions. Solving we get x1=1.69, x2=1.13,
z=7.31.
Because the optimum LP0 solution does not satisfy the
integer requirements, the B&B algorithm modifies the
solution space in a manner that eventually identifies the
integer optimum solution. First we select one of the
variables whose optimum value at LP0 is not an integer.
We select x1.

48
We replace the original LP0 with two new LPPs, LP1 and
LP2 defined as
LP1 space = LP0 space + ( x1  1)
LP2 space = LP0 space + ( x1  2)
We set lower bound = -
We solve the LP1 problem
(which is given by adding to LP0, the constraint x1  1)
The solution is
x1 = 1, x2 = 1.4, z = 5.80
Now x1 is integer but x2 is not.

49
So we replace the LP1 problem with two new LPs,
LP3,LP4, defined as

LP3 space = LP1 space + ( x2  1)


LP4 space = LP1 space + ( x2  2)
We now solve the LP3 problem.
The solution is : x1 = 1, x2 = 1, z = 5

Thus we have now got an all integer solution. So we need


not consider this node any further as we will not get a
better optimum since we will be looking at smaller
subsets. We say this node is fathomed. We also update the
lower bound to 5.
50
Now we solve the LP4 problem. We find it is infeasible.
We say this node is also fathomed.
Now we look at LP2 problem.
Solving we get x1 = 2, x2 = 0.5, z = 7

We now replace the LP2 problem with two new LPs, LP5,
LP6 defined as

LP5 = LP2 + ( x2  0)
LP6 = LP2 + ( x2  1)
Solving LP5 we get x1 = 2.25, x2 = 0, z = 6.75

51
Thus we replace the LP5 problem with two new LPs LP7,
LP8 defined as

LP7 = LP5 + ( x1  2)
LP8 = LP5 + ( x1  3)
Solving LP7 we get the all-integer solution
x1 = 2, x2 = 0, z = 6 . And this node is fathomed.
We update the lower bound to 6.
We find LP8 is infeasible. Thus this is also fathomed.
We also find LP6 is infeasible. Thus this is also fathomed.
Thus ultimately we got the all-integer optimum solution as
x1 = 2, x2 = 0, z = 6. 52
All the above are depicted graphically as follows:
LP0
x1=1.69,x2=1.13,z=7.31

x1  1 x1  2
LP1 LP2
x1=1,x2=1.4,z=5.8 x1=2,x2=0.5,z=7.0

x2  1 x2  2 x2  1
LP3 LP4 LP6
x1=1,x2=1,z=5 Infeasible x2  0 Infeasible
(fathomed) (fathomed) (fathomed)
LP5
x1=2.25,x2=0, z=6.75
x1  2 x1  3
LP7 LP8
x1=2,x2=0,z=6 Infeasible
Optimum Solution (fathomed) (fathomed)
53
Summary of the B&B Algorithm
Assume the problem is a maximization one.
Set an initial lower bound z = -  on the
optimal value of the ILPP. Set i = 0.
Step 1. (Fathoming/bounding) Select LPi, the
next problem to be examined. Solve LPi and
attempt to fathom it using one of the three
conditions:
(a) The optimal z-value of LPi cannot yield a
better objective value than the current lower
bound. 54
(b) LPi yields a better feasible integer solution
than the current lower bound.
(c) LPi has no feasible solution.
Two cases will arise.
(i) If LPi is fathomed and a better solution is found,
then update the lower bound. If all subproblems
have been fathomed, stop. The optimum ILP is
associated with the current lower bound, if any.
Otherwise set i = i +1 and repeat Step 1.
(ii) If LPi is not fathomed, go to step 2 for
branching. 55
Step 2. (Branching) Select one of the integer
*
x
variables xj, whose optimum value j in the LPi
solution is not integer. Eliminate the region
[ x*j ]  x j  [ x*j ]  1

by creating two LP subproblems that correspond to


x j  [ x*j ] and x j  [ x*j ]  1

Set i = i + 1. Go to step 1.

56
Problem 4 Problem 9.1C Page 369

The treasures of King Tut are on display in a


museum in New Orleans. The layout of the
museum is shown in the figure below, with
different rooms joined by open doors. A guard
standing at a door can watch two adjoining
rooms. The museum wants to ensure guard
presence in every room, using the minimum
number possible. Formulate the problem as an
ILPP, and find the optimum solution.

57
Figure for the problem

58
1 x12 2
x13 x25

3 x34 4 x45 5
x58

6 x67 7 x78 8

59
We define xij = 1 if guard is posted between rooms
i and j and 0 otherwise.
We have one constraint per room. Thus we have
the LPP:
Minimize z  x12  x13  x25  x34  x45  x58  x67  x78
Subject to
x25  x45  x58  1
x12  x13  1
x67  1
x12  x25  1
x67  x78  1
x13  x34  1
x58  x78  1
x34  x45  1 x = 1 or 0 for all j.
ij 60
Using TORA, we get the optimal solution (as
expected) as
x12=1, x34=1, x67=1, x78=1; z = 4.

61

You might also like