You are on page 1of 33

Integer Programming

Adopted from Taha and other sources


Integer programming

In integer optimization, at least one variable is restricted to integer
values. But the decision variables can be linear and / or nonlinear.
We will consider only linear variables.

Linear Optimization Classification

No Model Type Decision variables


1 Linear Programming (LP) Can take continuous value.
2 Integer Linear Programming (ILP) At least one variable is integer valued.

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

Any problems with the model?


Binary Variables & Logical Relationships
In many models, one or more constraints involving binary variables can be added to
satisfy desired logical relationship.
Suppose we have several projects P1 , P2, P3, etc. and we define binary variables Y1, Y2,
Y3, etc.
Y1 = 0 means project P1 is not selected
Y2 = 1 means project P2 is selected and so on.

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.

Suppose the logical relation is: Select P2 or P5 or both.

We need only one constraint. Y2+Y5  1.


Relationship/Constraint(s) Explanation
Select P2 or P5, or both. If only P2 is selected, Y2 = 1.
Y2 + Y5 ≥ 1 If only P5 is selected, Y5 = 1.
If P2, P5 selected, Y2+Y5 = 2 but when both are not
selected, Y2+Y5 = 0 and the constraint is not
satisfied.

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 P5 is selected, then P4 must be If P5 is selected, Y5 = 1 then Y4 must also be 1. If


as well. Y5=0, Y4 can be 0 or 1.
Y4 - Y5  0 If Y5 =1 and Y4 = 0, the constraint is not satisfied.
Linking Constraints and Fixed Costs
Suppose we purchase x units of a product at unit cost C. For sending the purchase order,
there is a fixed cost F. So the total purchase cost will be (F + Cx).

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.

The objective criterion then becomes:

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = ෍ 𝑐𝑗𝑥𝑗
𝑗=1

Because of discontinuity at the origin, Z becomes untractable from


the analytic stand point.
Job-Shop Scheduling
Problem







CUTTING PLANE ALGORITHMS
The concept of the cutting will first be illustrated by an example.
Consider the integer linear programming problem
Maximize z = 7x1+ 9x2
Subject to
-x1 + 3x2 ≤ 6
7x1 + x2 ≤ 35
x1 ,x2 are nonnegative integers
The optimal continuous solution (ignoring the integrality condition) is
shown graphically. This is given by z = 63, x1=9/2, x2= 7/2 which
is non-integer.
Cutting plane algorithm:
The general procedure for cutting plane method is as
follows:
Step1:find the original LP solution (using the simplex
method) ignoring the integer constraint.
Step 2:if the solution is integer stop. Otherwise ,
construct a “cut” derived from the row that has a
non integer variable with the largest fractional
value and add to the current final tableau. If there
is a tie select any row arbitrarily.
Step 3:solve the augmented LP problem ,and return
to step 2.
Integer programming, MA-4020-
Operational Research 24
a [a] f=a-[a]
3/2 1 ½
-7/3 -3 2/3
-1 -1 0
-2/5 -1 3/5
Consider the following problem .
Maximize Z=7x1+ 9x2
 subject to: 7x1+ x2  35
◦ -x1+ 3x2  6
◦ x1, x2 are non negative integers.

Integer programming, MA-4020-


Operational Research 26
8

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

which gives the cut


Basic x1 x2 x3 x4 S1 S2 R.H.S.
Z 0 0 0 1 8 0 59
x2 0 1 0 0 1 0 3
x1 1 0 0 1/7 -1/7 0 32/7
x3 0 0 1 1/7 -22/7 0 11/7
S2 0 0 0 -1/7 -6/7 1 -4/7
Basic x1 x2 x3 x4 S1 S2 Solution
z 0 0 0 0 2 7 55
x2 0 1 0 0 1 0 3
x1 1 0 0 0 -1 1 4
x3 0 0 1 0 -4 1 1
x4 0 0 0 1 6 -7 4
Can be expressed in terms of x1 and x2 only by using the appropriate
substitution as follows:

or

Which is equivalent to

Similarly for the second cut,

The equivalent terms in case of x1 & x2

You might also like