Professional Documents
Culture Documents
OPERATIONS
RESEARCH
A O R
INTEGER PROGRAMMING (IP)
By: -
Hakeem–Ur–Rehman
IQTM–PU 1
INTEGER PROGRAMMING:
AN INTRODUCTION
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
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
If requiring integer values is the only way in which a problem
deviates from a linear programming formulation, then it is an
integer programming (IP) problem. (The more complete name is
integer linear programming, but the adjective linear normally is
dropped except when this problem is contrasted with the more
esoteric integer nonlinear programming problem
So, The mathematical model for integer programming is the linear
programming model with the one additional restriction that the
variables must have integer values. 2
TYPES OF INTEGER PROGRAMMING
PROBLEMS
PURE-INTEGER PROBLEMS
– require that all decision variables have integer solutions.
MIXED-INTEGER PROBLEMS
– Require some, but not all, of the decision variables to
have integer values in the final solution, whereas others
need not have integer values.
Subject to:
4X1 + 3X2 + 10X3 ≤ 150 (1/2 Carat Diamond)
6X1 + 5X2 + 9X3 ≤ 160 (1/4 Carat Diamond)
X1 + X2 + X3 ≤ 50 (Total Number of items)
With X1, X2, X3 ≥ 0; X1, X2, X3 are integers
5
INTEGER PROGRAMMING:
FORMULATION
Pure ILP Problem:
Northeastern Airlines is considering the purchase of new long-, medium-, and short-
range jet passenger airplanes. The purchase price would be $67 million for each long-
range plane, $50 million for each medium-range plane, and $35 million for each short-
range plane. The board of directors has authorized a maximum commitment of $1.5
billion for these purchases. Regardless of which airplanes are purchased, air travel of
all distances is expected to be sufficiently large that these planes would be utilized at
essentially maximum capacity. It is estimated that the net annual profit (after capital
recovery costs are subtracted) would be $4.2 million per long-range plane, $3 million
per medium-range plane, and $2.3 million per short-range plane.
It is predicted that enough trained pilots will be available to the company to crew 30
new airplanes. If only short-range planes were purchased, the maintenance facilities
would be able to handle 40 new planes. However, each medium-range plane is
equivalent to 4/3 short-range planes, and each long-range plane is equivalent to 5/3
short-range planes in terms of their use of the maintenance facilities.
The information given here was obtained by a preliminary analysis of the problem. A
more detailed analysis will be conducted subsequently. However, using the preceding
data as a first approximation, management wishes to know how many planes of each
type should be purchased to maximize profit. Formulate an IP model for this problem.
INTEGER PROGRAMMING:
FORMULATION
7
INTEGER PROGRAMMING:
FORMULATION
Mixed ILP Problem:
A textile company can use any or all of three different processes for weaving
in standard white polyester fabric. Each of these production processes has a
weaving machine setup cost and per square-meter processing cost. These
costs and the capacities of each of the three production processes are shown
below:
Process Weaving machine Set Processing Cost Maximum daily
Number –Up cost (Rs.) (Rs.) capacity (Sq.
meter)
1 150 15 2000
2 240 10 3000
3 300 8 3500
The daily demand forecasts for its white polyester fabric is 4000 Sq. meter.
The company’s production manager wants to determine the optimal
combination of the production processes and their actual daily production
levels such that the total production cost is minimized.
8
INTEGER PROGRAMMING:
FORMULATION
Decision Variables: Let Xj be the production level for
process j (j = 1, 2, 3) also let
Yj = 1 if process j is used, and
Yj = 0 if process j is not used
Objective Function:
Minimize Z = (15X1 + 10X2 + 8X3) + (150Y1 + 240Y2 + 300Y3 )
Subject to:
X1 + X2 + X3 = 4000 (Daily Diamond)
X1 – 2000Y1 ≤ 0 (Daily Capacity of Process-1)
X2 – 3000Y2 ≤ 0 (Daily Capacity of Process-2)
X3 – 3500Y3 ≤ 0 (Daily Capacity of Process-3)
With X1, X2, X3 ≥ 0; Yj = 0 or 1, j= 1, 2, 3
9
INTEGER PROGRAMMING:
FORMULATION
Zero–One ILP Problem:
A real estate development firm, Peterson and Johnson, is considering five
possible development projects. The following table shows the estimated long-
run profit (net present value) that each project would generate, as well as
the amount of investment required to undertake the project, in units of
millions of dollars.
The owners of the firm, Dave Peterson and Ron Johnson, have raised $20 million of
investment capital for these projects. Dave and Ron now want to select the
combination of projects that will maximize their total estimated long-run profit (net
present value) without investing more that $20 million. Formulate a Binary Integer
Programming (0–1) model for this problem.
10
INTEGER PROGRAMMING:
FORMULATION
11
METHODS FOR SOLVING ILP
PROBLEMS
1. Rounding–Off A non–integer solution
2. Cutting–Plane Method
(developed by: Ralph E. Gomory)
3. Branch–and–Bound Method
(Developed By: A.H. Land and A. G. Doing)
4. The Additive algorithm for Zero–One integer
programming problems
(Developed By: E. Balas)
12
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 Each chandelier produced
nets the firm $7 and each fan $6 Harrison’s production mix decision can be
formulated using LP as follows:
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
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
HARRISON ELECTRIC COMPANY
EXAMPLE OF INTEGER PROGRAMMING
18
THE CUTTING–PLANE ALGORITHM
An Algorithm for solving Pure integer and mixed integer programming
problems has been developed by Ralph E. Gomory
1. Relax the integer requirements.
2. Solve the resulting LP problem using Simplex Method.
3. If all the basic variables have integer values, Optimality of the Integer
programming problem is reached. So go step 7; otherwise go to step 4.
4. Examine the constraints corresponding to the current optimal solution. For
each Basic Variable with non-integer solution in the current optimal table,
find the fractional part ,fi , Therefore, bi = [bi] + fi, where [bi] is the integer
part of bi, and fi is the fractional part of bi.
5. Choose the largest fraction among various fi ; i.e. Max (fi). Treat the
constraint corresponding to the maximum fraction as the source row
(equation). Based on the source equation, develop an additional constraint
(Gomory’s constraint / fractional cut) as shown:
–fi = Si – Summation ((fi)(Non–Basic Variable))
6. Add the fractional cut as the last row in the latest optimal table and proceed
further using dual simplex method, and find the new optimum solution. If
the new optimum solution is integer then go to step 7; otherwise go to step
4.
7. Print the integer solution [X’s and Z – Values] 19
THE CUTTING–PLANE ALGORITHM
EXAMPLE:
Max. Z = 5X1 + 8X2
Subject to:
X1 + 2X2 ≤ 8
4X1 + X2 ≤ 10
X1, X2 ≥ 0 and integers
Standard Form:
Max. Z = 5X1 + 8X2 + 0S1 +0S2
Subject to:
X1 + 2X2 + S1 = 8
4X1 + X2 + S2 = 10
X1, X2, S1, and S2 ≥ 0 and integers
20
THE CUTTING–PLANE ALGORITHM
(Cont…)
Initial Table:
Contribution Per Unit Cj 5 8 0 0
Basic Variables
CBi X1 X2 S1 S2 SOLUTION Ratio
(B)
0 S1 1 2 1 0 8 8/2 = 4*
0 S2 4 1 0 1 10 10/1 = 10
Total Profit (Zj) 0 0 0 0 0
Net Contribution (Cj – Zj) 5 8* 0 0
Iteration # 1:
Contribution Per Unit Cj 5 8 0 0
Basic Variables
CBi X1 X2 S1 S2 SOLUTION Ratio
(B)
8 X2 1/2 1 1/2 0 4 8
0 S2 7/2 0 -1/2 1 6 12/7*
Total Profit (Zj) 4 8 4 0 32
Net Contribution (Cj – Zj) 1* 0 -4 0
21
THE CUTTING–PLANE ALGORITHM
Iteration # 2: (Cont…)
All the Values of (Cj – Zj) ≤ 0; So, the current solution is optimal for linear
programming.
X1 = 12/7, X2 = 22/7 and Z = 236/7
Since the values of the decision variables X1 & X2 are not integers, so, the solution is
not optimum for Integer Programming.
STEP #4: Summary of Integer & Fractional Parts
Basic Variable in the bi [bi] + fi
above Optimal table
X1 12/7 1 + (5/7)
22
X2 22/7 3 + (1/7)
THE CUTTING–PLANE ALGORITHM
(Cont…)
STEP # 5: Because, the fractional part,f1, is the maximum. So, Select the Row “X1”
as the Source row for developing first cut.
12/7 = X1 – 1/7S1 + 2/7S2 (1+ 5/7) = X1 + (–1+6/7)S1 + (0+2/7)S2
23
THE CUTTING–PLANE ALGORITHM
(Cont…)
Only the third row (Containing S3) has a negative solution value. Therefore, S3
(LEAVING Variable) leaves the basis.
The smallest ratio is “1” and the corresponding variable is “S2”. So, the
variable “S2” enters the basis.
24
THE CUTTING–PLANE ALGORITHM
(Cont…)
Contribution Per Unit Cj 5 8 0 0 0
The Solution is still non-integer. So, develop a fractional cut. The Basic variables X2
and S2 are not integers.
STEP #4: Summary of Integer & Fractional Parts
Basic Variable in the bi [bi] + fi
above Optimal table
X2 7/2 3 + 1/2
S2 5/2 2 + 1/2
STEP # 5: Here, the fractional parts are the same for X2 & S2. But, we preferred the
fractional part of the X2. So, Select the Row “X2” as the Source row for developing
Cut. 25
THE CUTTING–PLANE ALGORITHM
(Cont…)
7/2 = X2 + S1 – 1/2S3 (3+ 1/2) = (1+0)X1 + (1+0)S1 + (–1+1/2)S3
The Corresponding fractional cut is:
–fi = Si – Summation ((fi)(Non–Basic Variable))
–1/2 = S4 – 1/2S3
STEP # 6: This cut is added to the above table; and further solved using dual
simplex method.
The smallest positive ratio is “2” and the corresponding variable is “S3”. So, the
variable “S3” enters the basis.
THE CUTTING–PLANE ALGORITHM
(Cont…)
Contribution Per Unit Cj 5 8 0 0 0 0
Basic Variables
CBi X1 X2 S1 S2 S3 S4 SOLUTION
(B)
8 X2 0 1 1 0 0 -1 4
5 X1 1 0 -1 0 0 2 0
0 S2 0 0 3 1 0 -7 6
0 S3 0 0 0 0 1 -2 1
Total Profit (Zj) 5 8 3 0 0 2 32
Net Contribution (Cj – Zj) 0 0 -3 0 0 -2
So, The values of all the basic variables are integers. So, the optimality is reached
and the corresponding results are summarized as follows:
X1 = 0, X2 = 4 and Z (Optimum) = 32
METHODS FOR SOLVING ILP
PROBLEMS
1. Rounding–Off A non–integer solution
2. Cutting–Plane Method
(developed by: Ralph E. Gomory)
3. Branch–and–Bound Method
(Developed By: A.H. Land and A. G. Doing)
4. The Additive algorithm for Zero–One integer
programming problems
(Developed By: E. Balas)
28
BRANCH–AND–BOUND METHOD
Creates and solves a sequence of sub-problems to the original problem that
are increasingly more restrictive until an optimal solution is found
BRANCHING:
Selection of an integer value of a decision variable to examine for a possible
integer solution to a problem
“If the solution to the linear programming problem contains non-integer values
for some or all decision variables, then the solution space is reduced by
introducing constraints with respect to any one of those decision variables. If
the value of the decision variable “X1” is 2.5, then two more problems will be
created by using each of the following constraints. X1 ≤ 2 and X1 ≥ 3.
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.
LOWER BOUND: The lower bound at a node is the value of the objective
function corresponding to the truncated values (integer parts) of the decision
variables of the problem in that node.
UPPER BOUND: The upper bound at a node is the value of the objective
function corresponding to the linear programming solution in that node.
29
BRANCH–AND–BOUND METHOD (Cont…)
FATHOMED SUBPROBLEM / NODE: A problem is said to
be fathomed if any one of the following three conditions is
true:
1. The values of the decision variables of the problem are integer.
2. The upper bound of the problem which has non–integer values for its
decision variables is not greater than the current best lower bound.
3. The problem has infeasible solution.
This means that further branching from this type of fathomed nodes is
not necessary.
X1 = 16/3
X2 = 2
ZU = 93.33
ZL = 90
BRANCH–AND–BOUND METHOD (Cont…)
BRANCH–AND–BOUND METHOD (Cont…)
BRANCH–AND–BOUND METHOD (Cont…)
PRACTICE QUESTION:
43
ZERO–ONE IMPLICIT ENUMERATION
TECHNIQUE / ADDITIVE ALGORITHM:
1. Convert the problem into the minimization form with all “≥” type constraints & all the
coefficients of the objective function must be in positive form.
2. Define a new variable Yj such that
Yj = Xj “if Cj ≥ 0 in the minimization problem”
Yj = 1–Xj “if Cj ≤ 0 in the minimization problem”
Where Yj is the binary variable in objective function as well as constraints. Slack variables Si
can be now added to constraints to put them into equality form.
A Branch & Bound procedure is used to solve the 0–1 programming problem.
SOLUTION VECTOR (S): A set of binary variables picked for the solution to be fixed (i.e.: either
(“+” or “1”) or (“–” or “0”). Initially it always be a NULL set.
VIOLATED CONSTRAINT VECTOR (V): All those constraints which are not feasible at
particular solution.
SET of HELPFUL VARIABLE (H): A variable is helpful if it doesn’t figure in solution vector (S)
either in “+” or “–” form and has positive coefficient in at least one violated constraint.”
BACK TRACK (FATHOMED SOLUTION): Backtrack occurs if any one of the following condition
occurs.
1. If Violated Constraint Vector (V) or Set of Helpful Variable (H) appear to be a NULL set.
2. If feasible solution found; When “V” is Null Set.
3. If we did not have the helpful variable from the atleast one of the violated constraints.
4. If Solution is infeasible.
TERMINATION CONDITION: When backtracking is not possible “means shifting from Zero (0)
to One(1) is not possible.”
44
ZERO–ONE IMPLICIT ENUMERATION
TECHNIQUE / ADDITIVE ALGORITHM:
EXAMPLE:
Minimization: Z = 5X1 + 6X2 + 10X3 + 7X4 + 19X5
Subject to:
5X1 + X2 + 3X3 – 4X4 + 3X5 ≥ 2
–2X1 + 5X2 – 2X3 – 3X4 + 4X5 ≥ 0
X1 – 2X2 – 5X3 + 3X4 + 4X5 ≥ 2
Xj = 0 or 1 for all j = 1,2,3,4,5
ITERATION#6:
ITERATION # 4: ITERATION#5: S6 = {5–bar, 1, 2, 4 }
S4 = { 5–bar, 1 } S5 = { 5–bar, 1, 2 } V6 = { }
V4 = {2, 3} V5 = { 3 } FEASIBLE SOLUTION
H4 = {2, 4} H5 = { 4 } Fixed Solution X1=X2=X4=1, Z = 18
(Fathomed and Backtrack) 45
ZERO–ONE IMPLICIT ENUMERATION
TECHNIQUE / ADDITIVE ALGORITHM:
EXAMPLE: Minimization: Z = 5X1 + 6X2 + 10X3 + 7X4 + 19X5
Subject to:
5X1 + X2 + 3X3 – 4X4 + 3X5 ≥ 2
–2X1 + 5X2 – 2X3 – 3X4 + 4X5 ≥ 0
X1 – 2X2 – 5X3 + 3X4 + 4X5 ≥ 2
Xj = 0 or 1 for all j = 1,2,3,4,5
ITERATION # 8:
ITERATION # 7: S8 = { 5–bar, 1, 2–bar }
S7 = { 5–bar, 1, 2, 4–bar } V8 = {2, 3}
V7 = { 3 } H8 = {4}
H7 = { } “Because we did not have any helpful
(Fathomed and Backtrack) variable from second constraints.”
(Fathomed and Backtrack)
I–4 I–9
(FATHOMED &
X2=1 X2=0 BACKTRACK) due
infeasibility: TERMINATE
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
INTEGER PROGRAMMING USING EXCEL
SOLVER: MIXED IP PROBLEM
Excel formulation of Bagwell’s IP problem with Solver
INTEGER PROGRAMMING USING EXCEL
SOLVER: MIXED IP PROBLEM
60