Fdocuments - in - Unit9 Integer Programming Xiaoxi Lis Homepage Innovative Uses of Binary Variables 1
Fdocuments - in - Unit9 Integer Programming Xiaoxi Lis Homepage Innovative Uses of Binary Variables 1
9 Integer Programming
Xiaoxi Li
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 1 / 58
Organization of this lecture
Contents:
Integer Programming: Modeling Approach
Basic Models and Classifications: IP, MIP, BIP
A Prototype Example and Some BIP Applications
Some Innovative Uses of Binary Variables in Model Formulation
Some Formulation Examples
Solving an IP (1): the Branch-and-Bound Algorithm
The Branch-and-Bound Algorithm for BIP
The Branch-and-Bound Algorithm for MIP
Solving an IP (2): the Cutting Plane Approach
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 2 / 58
Integer Programming: Modeling Approach
The notion of Integer Programming (IP) has the following two senses.
The broad sense. An IP is a Mathematical Programming (LP or
Non LP) with the restrictions that some decision variables take
integer values.
The narrow sense: An IP is a LP with the restrictions that some
decision variables take integer values.
In this course, we restrict ourselves to the narrow sense. Thus a LP
can be regarded as a relaxation of some IP.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 3 / 58
Integer Programming: Modeling Approach (cont.)
Classifications of IP:
MIP: some variables are asked to take integer values
Pure IP: all variables are asked to take integer values
BIP: all variables are asked to take 0-1 values
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 4 / 58
A Prototype Example with BIP Modeling: The
California Manufacturing Company
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 5 / 58
A Prototype Example with BIP Modeling: The
California Manufacturing Company (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 6 / 58
A Prototype Example with BIP Modeling: The
California Manufacturing Company
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 7 / 58
A Prototype Example with BIP Modeling: The
California Manufacturing Company (cont.)
Investment Analysis
Site Selection
Designing a Production and Distribution Network
Dispatching Shipments
Scheduling Interrelated Activities
Airline Application
...
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 9 / 58
Some Innovative Uses of Binary Variables in Model
Formulation
To name a few:
Either-Or Constraint
K out of N Constraints Must Hold
Functions with N Possible Values
The Fixed-Charge Problem
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 10 / 58
Either-Or Constraint
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 11 / 58
K out of N Constraints Must Hold
There are N constraints among which only K (must) hold (K < N).
Introduce binary variables yi , i = 1, ..., N; add to Constraint i the
term Myi , and another constraint ∑Ni=1 yi = N − K.
For an example (M = 3 and K = 1):
5x1 + 12x2 ≤ 34 + My1
6x1 + 11x2 ≤ 43 + My2
7x1 + 10x2 ≤ 57 + My3
y1 + y2 + y3 = 1
Why they are equivalent?
The same reasoning as the Either-Or Constraint (M = 2, K = 1);
"yi = 0" corresponds to the case that "Constraint i " is active, so
∑Ni=1 yi = N − K is the number of constraints that do not hold.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 12 / 58
Functions with N Possible Values
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 13 / 58
The Fixed-Charge Problem
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 14 / 58
The Fixed-Charge Problem (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 15 / 58
Example 1: Making Choices When the Decision
Variables Are Continuous
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 16 / 58
Example 1: Making Choices When the Decision
Variables Are Continuous (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 17 / 58
Example 1: Making Choices When the Decision
Variables Are Continuous (cont.)
Interpretations. In class.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 18 / 58
Example 2: Proportionality Assumption Violated
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 19 / 58
Example 2: Proportionality Assumption Violated
(cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 20 / 58
Example 2: Proportionality Assumption Violated
(cont.)
For each i, the auxiliary binary variable yij is introduced for each
possible value "j" of the variable xi i.e. yij = 1 if xi = j and yij = 0 if xi 6= j.
Interpretations. In class.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 21 / 58
Example 2: Proportionality Assumption Violated
(cont.)
We construct the following MIP for the problem (solution 2):
For each i, the auxiliary binary variable yij is introduced for possible
value no smaller than "j" of the variable xi , i.e. yij = 1 if xi ≥ j and yij = 0
if xi < j. =⇒ yij are the increments and xi = yi1 + yi2 + yi3 .
Interpretations. In class.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 22 / 58
Example 3: Covering All Characteristics
Exercise.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 23 / 58
Solving an IP: Some General Comments
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 24 / 58
Solving an IP: Some General Comments (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 25 / 58
Solving an IP: Some General Comments (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 26 / 58
Solving an IP: Some General Comments (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 27 / 58
Solving an IP: Some General Comments (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 28 / 58
Solving an IP: the Branch-and-Bound Algorithm
The Branch-and-Bound Algorithm: a motivating example of Poker.
Objective. Within a random bundle of Poker, find out one card with
the highest value and has a red-heart format.
Tool. Among any bundle of cards, a machine that is able to pick
out the card(*) with the highest value (no ability to read the
format).
An algorithm.
Put the whole bundle into the machine and obtain the card(*) with
the highest value. STOP if the card’s format is red-heart (the whole
bundle is discarded); otherwise branch the bundle into two.
In a general step, for a newly branched bundle, detect it by the
machine for a highest-valued card(*). Several possibilities:
Discard this bundle if this card(*) is red-heart, and call it incumbent if
its value is higher than the current incumbent one;
Discard this bundle if this card(*)’s value is lower than the current
incumbent one;
Otherwise, brunch the bundle for further detection by machine.
STOP when all cards are discarded. Incumbent = optimal value.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 29 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Objective. For a LP problem, find out one feasible solution with the
highest value and take binary values.
Tool. The simplex method to solve for a LP (relaxation).
An algorithm.
Apply the simple method to the LP relaxation to solve for an optimal
solution. STOP if the optimal solution take binary values; otherwise,
brunch the problem into two subproblems by letting x1 = 0 or x1 = 1.
In a general step, for a newly branched subproblem, solve its LP
relaxation by the simplex method. Several possibilities:
Discard (fathom) this subproblem if this optimal solution take integer
values, and call this solution incumbent if its value is higher than the
current incumbent one;
Discard this subproblem if this optimal value is no larger than the
current incumbent one or if it is infeasible;
Otherwise, brunch the subproblem by xj = 0 or xj = 1 (j in order).
STOP when all subproblems are either branched or fathomed.
Incumbent = optimal solution.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 30 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 31 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 32 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 33 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 34 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Bounding. This procedure involves solving the LP relaxation of a
subproblem so as to obtain an upper bound on the BIP’s optimal value.
Consider for example the whole problem. Its LP relaxation is
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 36 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Bounding.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 37 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Fathoming.
The Whole Problem: not fathomed because its LP relaxation has
an optimal (feasible) solution which is not binary valued, and there
is no previous incumbent value (think to be Z ∗ − ∞).
The Subproblem 1 (x1 = 0): fathomed because its LP relaxation
has an optimal solution that is binary valued. Moreover, the
solution (0, 1, 0, 1) and its value Z ∗ = 9 are stored as the incumbent
since there is no previous ones.
The Subproblem 2 (x1 = 1): not fathomed because its LP
relaxation has an optimal (feasible) solution which is not binary
valued, and its value Z = 16 is higher than the incumbent value
Z ∗ = 9.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 38 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Fathoming.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 39 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 40 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Completing the example (after Iteration 1)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 43 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 44 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 45 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 46 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 47 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 48 / 58
Solving an IP: the Branch-and-Bound Algorithm (cont.)
Completing the example: the Iteration Procedure (cont.)
Operation 5. Branching Subproblem [110] rather than Subproblem
[10] because [110] is newly created, into Subproblem [1100]
(x4 = 0) and Subproblem [1101] (x4 = 1).
Operation 5.1. Bounding Subproblem [1100], to obtain the solution
X1100 = (1, 1, 0, 0) and the bound Z1100 = 14.
Subproblem [1100] fathomed and revise the incumbent
Z ∗ = Z1100 = 14 as X1100 is integer-valued and 14 > 9.
Operation 5.2. Bounding Subproblem [1101] to obtain no feasible
solution thus Subproblem [1101] fathomed.
Operation 6. Fathoming Subproblem [10] due to the fact that the
revised incumbent value Z ∗ = 14 now is larger than Z10 = 13.
STOP because all subproblems are either fathomed or
branched. The optimal solution is X ] = X1100 = (1, 1, 0, 0) and the
optimal value is Z ] = Z ∗ = 14.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 49 / 58
Solving a MIP: the Branch-and-Bound Algorithm
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 50 / 58
Solving a MIP: the Branch-and-Bound Algorithm
(cont.)
A variation of the Branch-and Bound algorithm solves MIP. The only
differences are:
1 Selecting the branching variable. In the optimal solution for the LP
relaxation, consider the integer-restricted variables having
non-integer values, and pick the first one in natural ordering;
2 Branching into two subproblems. Let xj∗ be the optimal
(non-integer) value of the branching variable in the optimal
solution of the LP relaxation, then the two subproblems
correspond to "xj ≤ [xj∗ ]" and "xj ≥ [xj∗ ] + 1".
3 Bounding without rounding. This is due to the fact that some
variables are not integer-restricted, so the optimal value is in
general not required to be integers.
4 Fathoming conditions. The subproblem is fathomed if the optimal
solution for its LP relaxation have integer values for those
integer-restricted variables.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 51 / 58
Solving a MIP: the Branch-and-Bound Algorithm
(cont.)
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 52 / 58
Solving an IP: the Cutting Plane Approach
An example of adding "cuts" to obtain an optimal solution with integer
values for an IP.
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 53 / 58
Solving an IP: the Cutting Plane Approach (cont.)
Optimality test. At optimum, x1 = 3.75 and x2 = 2.25, both are
non-integer values. We pick an constraint with the RHS
non-integer. For example,
Group integer parts into the LHS and non-integer parts the RHS:
Remark.
A cut "cut off" the current optimal solution to the LP relaxation, but
not any feasible solution to the IP.
When the cut to the LP relaxation is added, it is hoped that the
optimal solution to the LP relaxation with the cut constraint added
will be integer-valued. If it is the case, an optimal solution to the IP
is obtained; if not, we look for a new cut.
Gomory (1958) found that this process will yield an optimal
solution to an IP after a finite number of iterations (cuts).
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 55 / 58
Solving an IP: the Cutting Plane Approach (cont.)
Substituting "s1 = 6 − x1 − x2 " and "s2 = 45 − 9x1 − 5x2 " into the cut
"0.75 − 0.5s1 − 0.25s2 ≤ 0" to obtain the cut constraint ""3x1 + 2x2 ≤ 15"
thus the cutting plane "3x1 + 2x2 = 15".
Operations Research (Li, X.) Unit.9 Integer Programming Dec. 22 - 29, 2016 (revised) 56 / 58
Solving an IP: the Cutting Plane Approach (cont.)
We put the obtained cut constraint "3x1 + 2x2 ≤ 15" into the LP
relaxation. Introducing the slack variable s3 into this constraint, we
obtain the following tableau: