You are on page 1of 53

Chapter 6

Integer Programming
After completing this chapter, you should be able to:
1. Define Integer programming
2. Explain how integer programming problems differ from
general linear programming problems.
3. Differentiate among various IP models
4. Use the branch and bound method to solve integer pro-
gramming problems.
5. Use the enumeration method to solve 0–1 integer pro-
gramming problems.
6. Solve IP models using Excel solver.
 Special LPMs in which one or more variables must
be integer are called integer linear programs.
Three types:
 Pure-Integer Problem
• requires that all decision variables have integer values.
 Mixed-Integer Problem
• Requires that some, but not all, decision variables have integer
values.
 0-1 Integer Programming
- one or more integer variables are required to equal either 0 or 1. Such
variables are called 0-1 or binary variables.
 Branch and Bound method
• Creates and solves a sequence of sub problems to the original
problem that are increasingly more restrictive until an optimal so-
lution is found.
 Bound
 An upper or lower limit on the value of the objective function at a
given stage of the analysis of an integer programming problem.
 Branch
 Selection of an integer value of a decision variable to examine for a
possible integer solution to a problem
 Enumeration Method
• A method used with 0–1 problems that involves listing every pos-
sible outcome in order to identify the optimal solution.
 Lp relaxation solution – solution of IP problem
that does not take in to account the integer re-
quirement. It is used as a starting point for the
Branch and Bound method.
 We can use graphic, and or simplex method or
excel solver to find LP relaxation solution.

Note: The B &B method begins with the solution of an integer problem
as if it were a typical LP problem ( i.e., the integer requirements are
ignored temporarily.)
If this initial solution should happen to produce integer values for all vari-
ables, then the solution is also optimal solution to the integer problem.
No other solution, integer or non integer, can possibly yield a better value of
the objective function of LP relaxation solution.
For integer linear programs involving maximization, the
value of the optimal solution to the LP Relaxation provides an
upper bound on the value of the optimal integer solution.
For integer linear programs involving minimization, the
value of the optimal solution to the LP Relaxation provides a
lower bound on the value of the optimal integer solution.
Since the search process involves the use of additional con-
straints while keeping original constraints, it is impossible
to obtain a solution that yields a higher or lower value of the
OF for maximization and minimization problems respec-
tively.
Select the variable with the largest
fractional part to branch on.

Note: Should the LP relaxation fails to produce all integer value for all deci-
sion variables, the B &B method will be used, which involves partitioning
(branching) the feasible solution region in to smaller and smaller subsets.

Figure
Figure6–4
6–4 Branching
Branchingfrom
fromthe
theFirst
FirstNode
Node
• Because the value x2 = 2.5 is not acceptable as integer solution, we
explore two possible alternatives : either x2 < 2 or x2 > 3 since there
is no integer value between 2 and 3.
•This will subdivide the feasible solution region in to two regions
that will be explored separately.

Scenario1 Scenario 2
For x2 < 2 ( Node 2) For x2 >3 ( Node 3)
Max Z = 6x1 + 8 x2 Max Z = 6x1 + 8 x2
Sub to:
Sub to:
4x1 + 6x2 < 36 4x1 + 6x2 < 36
10x1 + 7x2 < 70 10x1 + 7x2 < 70
x2 < 2 x2 > 3

x1, x2 > 0 and integer x1, x2 > 0 and integer


Note: Some subsets will yields higher values of OF than others, from which
branching is advisable from higher valued than lower valued sub-sets for max problems.
Obtaining integer solution does not guarantee the solution optimal unless
Compared with other integer solutions for other subsets.
The OF’s value of a subset becomes the upper bound for all subsequent
subsets in that portion of node diagram as no subset can yield a solution that will have a
higher value of the OF than the sub set from which it was derived.
No further branching
The vertical lines represent the integer values of
x1.
The final solution will be where one of those lines
intersects the boundary of the feasible solution
space.
Max Z = 6x1 + 8 x2 ( Node 2) Max Z = 6x1 + 8 x2 ( Node 3)
Sub to:
Sub to:
4x1 + 6x2 < 36 4x1 + 6x2 < 36
10x1 + 7x2 < 70 10x1 + 7x2 < 70
x1 < 5 x1 > 6
x1, x2 > 0 and x1 integer x1, x2 > 0 and x1integer
Max Z = 6x1 + 8 x2 ( Node 2) Max Z = 6x1 + 8 x2 ( Node 2)
Sub to:
Sub to:
4x1 + 6x2 < 36
4x1 + 6x2 < 36 10x1 + 7x2 < 70
10x1 + 7x2 < 70 x2 > 3
x2 < 2
x1, x2 > 0 and x2 integer
x1, x2 > 0 and x2 integer
 Involve choosing between two possible values for
each decision variable like decisions having Yes –
No decisions.
Eg. Whether to fund a project or not ( Yes or No)
Whether to hire a person or not
Whether to replace an existing machine or not
 Enumeration method is used to solve such prob-
lems (binary problems).
 Most useful when the number of alternatives is
fairly small.
 The number of alternatives is equal to 2n, where n
is the number of decision variables.
Zmax = 65x1 + 70x2 +40x3 + 50x4
S. To:

10x1 + 12x2 + 6x3 +8x4 < 30


3x1 + x2 +2x3 + < 5
All variables 0 or 1
Feasibility is checked against
each constraint for all alterna-
tives.
Enumeration and evaluation of alternatives
Alternatives Constraint1 Constraint2

X1 x2 x3 x4 Value Feasible? Value Feasible? Both Fea- Value of


sible? OF
1 0 0 0 0 0 Yes 0 Yes Yes 0

2 0 0 0 1 8 Yes 0 Yes Yes 50

3 0 0 1 0 6 Yes 2 Yes Yes 40

4 0 0 1 1 14 Yes 2 Yes Yes 90

5 0 1 0 0 12 Yes 1 Yes Yes 70

6 0 1 0 1 20 Yes 1 Yes Yes 120

7 0 1 1 0 18 Yes 3 Yes Yes 110

8 0 1 1 1 26 Yes 3 Yes Yes 160

9 1 0 0 0 10 Yes 3 Yes Yes 65

10 1 0 0 1 18 Yes 3 Yes Yes 115

11 1 0 1 0 16 Yes 5 Yes Yes 105

12 1 0 1 1 24 Yes 5 Yes Yes 155

13 1 1 0 0 22 Yes 4 Yes Yes 135

14 1 1 0 1 30 Yes 5 Yes Yes 185* Opti-


mal

15 1 1 1 0 28 Yes 6 No No -

16 1 1 1 1 36 No 6 No No -
x1
x1
Note: Additional constraints
for 0-1 problems as all
variables value is 0 or 1.
X1<1
X2 <1
X3<1
X4<1
• All branches are ex-
pressed as equalities rather
than inequalities.
 The branching rule used for maximization problem of branching
from a node on a variable with the largest fractional part also will
be used for minimization problems.
 The main difference is the OF value at each node is being mini-
mized , i.e., the values at various nodes going down through the tree
will get larger ( or stay the same) rather than get smaller, as in max-
imization problem.
 Thus each node will result in a value that is equal to or greater than
the value at the node it emanated from.
Zmin = 15x1 + 10x2 +12x3
S. To:
4x1 + 6x2 + 5x3 > 60
3x1 + x2 + x3 > 18
All variables >0 and integer
0

0
 Integer programming problems do not readily
lend themselves to sensitivity analysis as only
a relatively few of the infinite solution possi-
bilities in a feasible solution space will meet
integer requirements.
 Trial-and-error examination of a range of rea-
sonable alternatives involving completely solv-
ing each revised problem is required.
 Much of the modelling flexibility provided by
integer linear programming is due to the use of
0-1 variables.
 value of the variable equal to 1 if a correspond-
ing activity is undertaken and equal to 0 if the
corresponding activity is not undertaken.
Example
Let’s say xyz cpny is considering investing in several projects
that have varying capital requirements over the next four
years. Faced with limited capital each year, management
would like to select the most profitable projects. The esti-
mated net present value for each project, the capital re-
quirements, and the available capital over the four-year pe-
riod are shown in Table below.
Project
Plant Warehouse New New Prod- Total Capi-
Expansion Expansion Machinery uct tal
Research Available
Present $90,000 $40,000 $10,000 $37,000
Value
Year 1 Cap $15,000 $10,000 $10,000 $15,000 $40,000
Rqmt
Year 2 Cap $20,000 $15,000 - $10,000 $50,000
Rqmt
Year 3 Cap $20,000 $20,000 $10,000 $40,000
Rqmt
Year 4 Cap $15,000 $ 5,000 $ 4,000 $10,000 $35,000
Rqmt
 The four 0-1 decision variables are as follows:
P = 1 if the plant expansion project is accepted; 0 if
rejected
W= 1 if the warehouse expansion project is
accepted; 0 if rejected
M = 1 if the new machinery project is accepted; 0 if
rejected
R= 1 if the new product research project is
accepted; 0 if rejected
 objective function is to maximize the net present value of the capital
budgeting projects.
 This problem has four constraints ;one for the funds available in

each of the next four years.


 A 0-1 integer linear programming model with dollars in thousands is

as follows: (Use excel solver)


Zmax = 90P + 40W + 10M + 37R
s.t.
15P + 10W + 10M + 15R ≤ 40 (Year 1 capital available) 5
20P + 15W + 10R ≤ 50 (Year 2 capital available)15
20P + 20W+ 10R ≤ 40 (Year 3 capital available)0
15P + 5W + 4M + 10R ≤ 35 (Year 4 capital available)11
 The optimal solution is P = 1, W = 1, M = 1, R = 0, with a total
estimated net present value of $140,000.
 Thus, the company should fund the plant expansion, the ware-
house expansion, and the new machinery
 projects.
 The new product research project should be put on hold unless
additional capital funds become available.
 The values of the slack variables show that the company will have
$5,000 remaining in year 1, $15,000 remaining in year 2 and ,
11,000 remaining, in year 4.
 Checking capital requirement for the new product project, though
there is enough capital in year 2 &4, the cpny would have found a
fund of $10,000 each year 1 and 3 to fund new product project .
 the cost of production has two components: a setup
cost, which is a fixed cost, and a variable cost, which
is directly related to the production quantity.
 The use of 0-1 variables makes including the setup
cost possible in a model for a production application.
Ex.
Three raw materials are used to produce three products: a fuel additive, a solvent base, and a carpet cleaning
fluid. The following decision variables are used: The profit contributions are $40 per ton for the fuel addi-
tive, $30 per ton for the solvent base, and $50 per ton for the carpet cleaning fluid. Each ton of fuel addi-
tive is a blend of 0.4 tons of material 1 and 0.6 tons of material 3. Each ton of solvent base requires 0.5
tons of material 1, 0.2 tons of material 2, and 0.3 tons of material 3. Each ton of carpet cleaning fluid is a
blend of 0.6 tons of material 1, 0.1 tons of material 2, and 0.3 tons of material 3. The cpny has 20 tons of
material 1, 5 tons of material 2, and 21 tons of material 3 and is interested in determining the optimal pro-
duction quantities for the upcoming planning period.
 A linear programming model of the cpny prob-
lem is shown:
F = tons of fuel additive produced
S =tons of solvent base produced
C =tons of carpet cleaning fluid produced
 Optimal solution:
F = 27.5 tones
S=0
C = 15
Zmax = 1850
 This linear programming formulation of the

cpny problem does not include a fixed cost for


production setup of the products.
 Suppose that the following data are available concern-
ing the setup cost and the maximum production quan-
tity for each of the three products:
 The modeling flexibility provided by 0-1 variables can
now be used to incorporate the fixed setup costs into
the production model. The 0-1 variables are defined as
follows:
 SF = 1 if the fuel additive is produced; 0 if not
 SS =1 if the solvent base is produced; 0 if not
 SC =1 if the carpet cleaning fluid is produced; 0 if not
Additional model:
 Using these setup variables, the total setup cost is : 200SF + 50SS + 400SC
 Thus, the net profit objective function becomes:

Max = 40F + 30S + 50C - 200SF - 50SS - 400SC


 we must write production capacity constraints so that if a setup variable equals

0, production of the corresponding product is not permitted and, if a setup vari-


able equals 1, production is permitted up to the maximum quantity.
 For the fuel additive, we do so by adding the following constraint:

F ≤ 50SF
 Note that, with this constraint present, production of the fuel addi-
tive is not permitted when SF= 0. When SF = 1, production of up
to 50 tons of fuel additive is permitted.
 We can think of the setup variable as a switch. When it is off (SF =
0), production is not permitted; when it is on (SF = 1), production
is permitted.
 Similar production capacity constraints, using 0-1 variables, are added for
the solvent base and carpet cleaning products:
S≤25SS
C ≤ 40SC
The model will be:
 Optimal Solution:
Fuel additives = 25 tones
Solvent base = 20 tones
Zmax = 1350
 Note: Set up cost of 200+50 for the two= 250.

But, Carpet cleaning’s set up cost is 400, which


is expensive and is not produced.
 Either-Or Alternatives
 k-Out-of-n Alternatives
 If-Then Alternatives
 Either-Or Constraints
 Variables That Have Minimum Level Re-
quirements
 k-Out-of-n Alternatives
When we must choose specified number of alter-
natives out of a list of alternatives, the constraint
takes d/t forms.
i) Two alternatives out of five is written as:
X1 + X2 + X3 +X4 + X5 = 2
ii) If at least two out of five:
X1 + X2 + X3 +X4 + X5 ≥ 2
iii) Range of choices: Two constraints needed.
X1 + X2 + X3 +X4 + X5 ≥ 2
X1 + X2 + X3 +X4 + X5 ≤ 4
 Either-Or Alternatives
- When two alternatives are being considered,
but only one will be needed:
x1 + x2 = 1
- If there is a possibility that neither alternatives
are selected,
x1 + x2 ≤ 1
 If-Then Alternatives
 When a decision to take some action necessitates
another action that supports the initial decision:
i) eg. When purchase of machine x2 necessitates
the purchase of another machine, x1.
x1 ≥ x2 (conditional constraint)
ii) If purchase of either of the machine requires the
purchase of the other,
x1 = x2 (Co requisite Constraints)
------END-----

You might also like