Integer Programming: Adopted From Taha and Other Sources
Integer Programming: Adopted From Taha and Other Sources
Within ILP, we can have either “all integer” or “mixed integer” model.
A variable restricted to 0 or 1 values is called a binary variable.
LP example Maximize
x1+ 8x2 = Z
Subject to
What if x1and x2 must be integers? x
x1 & x2 ≥ 0 1
≤ 2.0
We can try four closest points.
x1 + 10x2 ≤ 20.5
x1= 0.00, x2 LP optimal: Z = 16.80 x1=
3 = 2.05 2.00, x2 = 1.85
(1, 2), (2, 2) are
infeasible.
2 At (1, 1), Z = 9 . At (2,
1) , Z = 10
1 Integer optimal:(0,2),
Z = 16!
1 2 3 4 X1
Optimal may not be a corner point
A simple LP example Maximize 7x1+ 11x2 = Z
Subject to x 1 + x2 ≤ 6
x1 & x2 ≥ 0 18x1+ 34x2 ≤ 154
Optimal LP: x1= 3.125, x2 = 2.875 with Z = 53.5
9
Optimal ILP: x1= 1, x2 = 4 with Z = 51
8 Many approaches: Start with LP.
There is no efficient procedure 1. Cutting Plane: Add one
7 constraint at a time till you get
(like Simplex) available to find
6 the optimal solution. an optimal solution.
2. Branch and Bound: If the
5
current solution is not integer,
4 split the problem into two
problems (with one constraint
3
added to each) and solve again.
2 Repeat till you get integer
optimal solution. Solver uses
1
this approach.
3. ….
1 2 3 4 5 6 7 8 9
ILP: B&B Maximize 7x1+ 11x2 = Z
Subject to x 1 + x2 ≤ 6
Start with the LP solution. x1 & x2 ≥ 0 18x + 34x ≤ 154
1 2
9 Add two branches with extra
constraints if there is a non- LP: Z = 53.5.
8 integer value and solve the (3.125, 2.875)
7 two sub-problems.
6
5
Z = 50. Z = 53.222
4 (4, 2) (2.889, 3)
3
Feasible! No need
2
to expand this Add two
1 x2 ≤ 2 branch. This is a branches
lower bound.
1 2 3 4 5 6 7 8 9
Branch and bound methodology
Root node
B & B methodology can LP: Z = 53.5
be applied to many other (3.125, 2.875)
problems besides ILP.
Z = 50 Z = 52.222
(4, 2) (2.889, 3)
x1 ≥ 3
Z = 52.176 Infeasible!
(2, 3.47059) Optimum!
Z = 51.
Z = 47. (1, 4)
(2, 3)
Capital Budgeting
Project P1 P2 P3 P4 P5 Assume budget (B) = 176 million
NPV 10 17 16 8 14 rupees. Which projects should we
Expenditure 48 96 80 32 64 select to maximize Net Present
Value (NPV)?
Maximize 10 y1 + 17 y2 + 16 y3 + 8 y4 + 14 y5
Subject to: 48 y1 + 96 y2 + 80 y3 + 32 y4 + 64 y5 ≤ 176
y1 , y2 , y3 , y4 , y5 all binary (0 or 1).
Capital
Budgeting
We need to add constraint(s) such that when the relationship is satisfied, all constraints
must be met and when the relationship is not satisfied, at least one of the constraint
must fail.
Select at most one project from If 0 or 1 projects are selected, the constraint is
P3 , P 4 , P5 . satisfied.
Y3 + Y4 + Y5 ≤ 1 If two are selected, Y3+Y4 +Y5 will be equal to 2 and
the constraint is not satisfied. Same if you select all
three.
If this value is included in the objective function, then we will end up with fixed cost F
even when x = 0. This should not happen. There should be no fixed cost when we don’t
buy.
To correct this, we introduce a binary variable y and add a new constraint as follows.
Minimize Fy + Cx
Subject to: x ≤ My where M is a large number.
y = 0 or 1
Note that when x = 0, y can be 0 or 1 according to the first constraint and minimization
will force it to zero.
When x > 0, y will be forced to a value of 1.
12
Fixed-Charge Problem
𝑘𝑗 + 𝑐𝑗𝑥𝑗 𝑥𝑗 > 0
𝐶𝑗 𝑥𝑗 = ቊ
0 𝑥𝑗 = 0
Where,
𝑐𝑗 is variable cost per unit,
𝑘𝑗 is fixed cost.
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 𝑐𝑗𝑥𝑗
𝑗=1
X2
6
primary
constraints
5
secondary
4 constraints
(9/2,7/2); Z = 63
3 fr
(4,3); Z = 55
2
0
0 1 2 3 4 5 6
X1 7
Basic x1 x2 x3 x4 S1 R.H.S.
Z 0 0 28/11 15/11 0 63
x2 0 1 7/22 1/22 0 7/2
x1 1 0 -1/22 3/22 0 9/2
S1 0 0 -7/22 -1/22 1 -1/2
Basic x1 x2 x3 x4 S1 Solution
Z 0 0 0 1 8 59
x2 0 1 0 0 1 3
x1 1 0 0 1/7 -1/7 32/7
x3 0 0 1 1/7 -22/7 11/7
Since the solution is still non-integer , a new cut is
constructed.The x1 - equation is written as
or
Which is equivalent to