Page 1
3/1/2016
1
INTEGER PROGRAMMING
Integer Programming
� In many problems the decision variables must have
integer values.
� Example: assign people, machines, and vehicles to
activities in integer quantities.
� If this is the only deviation from linear programming,
it is called an integer programming (IP) problem.
� If only some variables are required to integer, the
model is called a mixed integer programming (MIP)
� San Francisco Police Dep. problem is an IP problem.
� Wyndor Glass Co. problem could be an IP problem;
how?
103
Page 2
3/1/2016
2
Integer Programming
� In integer programming, divisibility assumption must
be dropped.
� Another area of application is in problem involving
“yes-or-no” decisions, which have binary variables.
� These IP problems are called binary integer
programming (BIP) problems.
� A very small example of a typical BIP problem is given
in the following.
104
Prototype example
� California Manufacturing Company is considering expansion
building a factory in Los Angeles, San Francisco or in both cities.
� One new warehouse can also be considered in a city where a
new factory is being built. Maximum $10 million to invest.
� Objective: find feasible combination of alternatives that
maximizes the total net present value.
105
Decision Decision Decision Decision
numbernumbernumbernumber
YesYesYesYes----orororor----no questionno questionno questionno question Decision Decision Decision Decision
variablevariablevariablevariable
Net present Net present Net present Net present
valuevaluevaluevalue
Capital Capital Capital Capital
requiredrequiredrequiredrequired
1 Build factory in Los Angeles? x1 $9 million $6 million
2 Build factory in San Francisco? x2 $5 million $3 million
3 Build warehouse in Los Angeles? x3 $6 million $5 million
4 Build warehouse in San Francisco? x4 $4 million $2 million
Page 3
3/1/2016
3
Contingent decisions
Mutually exclusive alternatives
BIP model
� All decisions variables have the binary form:
� Z = total net present value of these decisions.
Maximize Z = 9x1 + 5x2 + 6x3 + 4x4.
� Constraints:
6x1 + 3x2 + 5x3 + 2x4 ≤ 10
x3 + x4 ≤ 1
x3 ≤ x1 and x4 ≤ x2
xj is binary, for j = 1,2,3,4.
106
1 if decision is yes,1, 2,3,4
0 if decision is no,j
jx j
j
= =
BIP models
� Groups of yes-or-no decision often constitute groups
of mutually exclusive alternatives: only one decision
in the group can be yes.
� Occasionally, decisions of the yes-or-no type are
contingent decisions: decision that depend upon
previous ones.
� Software options for solving BIP, IP or MIP models:
� Excel
� LINGO/LINDO
� MPL/CPLEX
107
Page 4
3/1/2016
4
BIP applications
� Investment analysis, such as the California Man. Co.
� Site selection, of factories, warehouses, energy power
sources, etc.
� Designing a production and distribution network, or
more generally the entire global supply-chain.
� Dispatching shipments, scheduling routes, vehicles
and time period for departure and arrivals.
� Airline applications, as e.g. fleet assignment and crew
scheduling.
� Scheduling interrelated activities, asset divestures,
etc.
108
Formulation examples
� Example 1: making choices when decision variables
are continuous. R&D Division of Good Products Co. has
developed three possible new products.
� Requirement 1: from the three, at most two can be
chosen to be produced.
� Each product can be produced in either of two plants.
However, management has imposed a restriction:
� Requirement 2: just one of the two plants can be
chosen as the producer of the new products.
109
Page 5
3/1/2016
5
Example 1
� Objectives: choose the products, the plant and the
production rates of the chosen products to maximize
total profit.
110
Production time used for each unit Production time used for each unit Production time used for each unit Production time used for each unit
producedproducedproducedproduced
Production time Production time Production time Production time
available per available per available per available per
weekweekweekweekProduct 1Product 1Product 1Product 1 Product 2Product 2Product 2Product 2 Product 3Product 3Product 3Product 3
Plant 1 3 hours 4 hours 2 hours 30 hours
Plant 2 4 hours 6 hours 2 hours 40 hours
Unit profit 5 7 3 (103 euros)
Sale potential 7 5 9 (units per week)
Formulation of the problem
� Similar to a standard product mix problem, such as the Wyndor
Glass Co.
� It is such a problem, if we drop the two restrictions and by
requiring that a product uses production hours in both plants.
� Let x1, x2, x3 be the production rates of the respective products:
111
1 2 3Maximize 5 7 3Z x x x= + +
1 2 3
1 2 3
1
2
3 1 2 3
3 4 2 30
4 6 2 40
7
5
9, , , 0
x x x
x x x
x
x
x x x x
+ + ≤
+ + ≤
≤
≤
≤ ≥
subject to
Page 6
3/1/2016
6
Formulation of the problem
� For the real problem, Requirement 1 add the
constraint:
Number of strictly positive variables (x1, x2, x3) must be ≤ 2
� This must be converted to an IP problem. It needs the
introduction of auxiliary binary variables.
� Requirement 2 requires replacing the first two
constraints to:
� must hold. This again requires an auxiliary binary
variable.
112
1 2 3
1 2 3
Either 3 4 2 30
or 4 6 2 40
x x x
x x x
+ + ≤
+ + ≤
Auxiliary binary variables
� For Requirement 1, three auxiliary binary variables (y1,
y2, y3) are introduced:
� This is introduced in the model with the help of an
extremely large positive number M, adding the
constraints:
113
1 if 0 can hold (can produce product )
0 if 0 must hold (cannot produce product )
j
j
j
x jy
x j
>=
=
1 1
2 2
3 3
1 2 3 2
is binary, for 1,2,3.j
x My
x My
x My
y y y
y j
≤
≤
≤
+ + ≤
=
Page 7
3/1/2016
7
Auxiliary binary variables
� For Requirement 2, another auxiliary binary variable y4
is introduced:
� This add the constraints:
114
1 2 3
4
1 2 3
1 if 4 6 2 40 must hold (choose Plant 1)
0 if 3 4 2 30 must hold (choose Plant 2)
x x xy
x x x
+ + ≤=
+ + ≤
1 2 3 4
1 2 3 4
4
3 4 2 30
4 6 2 40 (1 )
is binary
x x x My
x x x M y
y
+ + ≤ +
+ + ≤ + −
Complete model (MIP)
115
1 2 3
1
2
3
1 1
2 2
3 3
1 2 3
1 2 3 4
1 2 3 4
Maximize 5 7 3
subject to 7
5
9
0
0
0
2
3 4 2 30
4 6 2 40
and 0, for 1, 2,3
is binary, for 1, 2,3, 4
i
j
Z x x x
x
x
x
x My
x My
x My
y y y
x x x My
x x x My M
x i
y j
= + +
≤
≤
≤
− ≤
− ≤
− ≤
+ + ≤
+ + − ≤
+ + + ≤ +
≥ =
=
Page 8
3/1/2016
8
Solution
� MIP problem with 3 continuous and 4 binary variables.
� Optimal solution: y1 = 1, y2 = 0, y3 = 1, y4 = 1, x1 = 5.5,
x2 = 0, x3 = 9.
� That is, choose products 1 and 3 to produce, choose
Plant 2 for production, choose production rates of 5.5
units per week for product 1 and 9 units per week for
product 2.
� Resulting profit is 54500€ per week.
116
Example 2
� See Hillier’s book (page 496). Profit from additional sales
violates proportionality:
117
Page 9
3/1/2016
9
Example: Southwestern Airways
� Southwestern Airways needs to assign three crews to
cover all the upcoming flights.
� Table shows the flights in the first column.
� Other 12 columns show the 12 feasible sequences of flights
for a crew.
� Numbers in each column indicate the order of the flights.
� Exactly three sequences must be chosen (one for each crew).
� More than one crew can be assigned to a flight, but it must
be paid as if it was working.
� Last column show the cost of assigning a crew to a sequence
of flights.
118
Data for Southwestern Airways
119
Feasible sequence of flightsFeasible sequence of flightsFeasible sequence of flightsFeasible sequence of flights
FlightFlightFlightFlight 1111 2222 3333 4444 5555 6666 7777 8888 9999 10101010 11111111 12121212
1. San Francisco to Los Angeles 1 1 1 1
2. San Francisco to Denver 1 1 1 1
3. San Francisco to Seattle 1 1 1 1
4. Los Angeles to Chicago 2 2 3 2 3
5. Los Angeles to San Francisco 2 3 5 5
6. Chicago to Denver 3 3 4
7. Chicago to Seattle 3 3 3 3 4
8. Denver to San Francisco 2 4 4 5
9. Denver to Chicago 2 2 2
10. Seattle to San Francisco 2 4 4 5
11. Seattle to Los Angeles 2 2 4 4 2
Cost (1000€) 2 3 4 6 7 5 7 8 9 9 8 9
Page 10
3/1/2016
10
Formulation of the problem
� Objective: minimize the total cost for the three crews.
� 12 feasible sequence of flights: 12 yes-or-no decisions:
Should sequence j be assigned to a crew?
� The 12 binary variables to represent the decisions are:
120
1 if sequence is assigned to a crew
0 otherwisej
jx
=
1 2 3 4 5 6 7 8 9
10 11 12
Minimize 2 3 4 6 7 5 7 8 9
9 8 9
Z x x x x x x x x x
x x x
= + + + + + + + +
+ + +
and is binary, for 1, 2, ,12jx j = …
subject to1 4 7 10
2 5 8 11
3 6 9 12
4 7 9 10 12
1 6 10 11
4 5 9
7 8 10 11 12
2 4 5 9
5 8 11
3 7 8 12
6 9 10 11 1212
1
1 (SF to LA)
1
1
1
1
1
1
1
1
1
1
3 (assign three crewsj
j
x x x x
x x x x
x x x x
x x x x x
x x x x
x x x
x x x x x
x x x x
x x x
x x x x
x x x x x
x=
+ + + ≥
+ + + ≥
+ + + ≥
+ + + + ≥
+ + + ≥
+ + ≥
+ + + + ≥
+ + + ≥
+ + ≥
+ + + ≥
+ + + + ≥
=∑ )
Formulation of the problem
121
Page 11
3/1/2016
11
Solution
� One optimal solution is:
� x3 = 1 (assign sequence 3 to a crew)
� x4 = 1 (assign sequence 4 to a crew)
� x11 = 1 (assign sequence 11 to a crew)
� And all other xj = 0.
� Total cost is 18000€.
� Another optimal solution is: x1 = x5 = x12 = 1.
122
Discussion
� This example belongs to a class called set covering
problems, with a number of potential activities (e.g.
flight sequences) and characteristics (e.g. flights).
� Si is the set of all activities that possess characteristic i.
� A constraint is included for each characteristic i:
� In set partitioning problems the constraint is
123
1j
j
j S
x∈
=∑
1i
j
j S
x∈
≥∑
Page 12
3/1/2016
12
Solving IP problems
� Integer problems are easy to solve?
� Difference to LP is that IP have far fewer solutions.
� IP problems have a finite number of feasible solutions.
� However:
� Finite numbers can be astronomically large! With n
variables a BIP problem has 2n solutions, having
exponential growth.
� LP assures that a CFP solution can be optimal,
guaranteeing the remarkable efficiency of the simplex
method. LP problems are much easier to solve than IP
problems.
124
Solving IP problems
� Consequently, most IP algorithms incorporate the
simplex method. This is called the LP relaxation.
� Sometimes, the solution of the LP problem is the
solution of the IP problem, such as:
� Minimum cost flow problem, including transportation
problem, assignment problem, shortest-path problem
and maximum flow problem.
� Special structures (see examples 2 and 3): mutually
exclusive alternatives, contingent decisions or set-
covering constraints can also simplify the problem.
125
Page 13
3/1/2016
13
Solving IP problems
� Primary determinants of computational complexity:
1. number of integer variables,
2. these variables are binary or general integer variables,
3. any special structure in the problem.
� This is in contrast to LP, where number of constraints
is much more important than the number of
variables.
� As IP problems are much more difficult than LP, we
could apply LP and round the obtained solution...
Yes??
126
Example 1
127
2Maximize Z x=
1 2
1 2
1 2
subject to 0.5
3.5,
and , 0, integers.
x x
x x
x x
− + ≤
+ ≤
≥
Page 14
3/1/2016
14
Example 2
128
1 2Maximize 5Z x x= +
1 2
1
1 2
subject to 10 20
2
and , 0, integers.
x x
x
x x
+ ≤
≤
≥
Solving IP problems
� Thus, a better approach to deal with IP problems that
are too large to be solved exactly are heuristic
algorithms.
� Heuristics and metaheuristics are extremely efficient
for very large problems, but do not guarantee to find
an optimal solution.
� These algorithms will be discussed further later.
� Most popular traditional method for solving IP
problems is the branch-and-bound technique.
129
Page 15
3/1/2016
15
Branch-and-bound applied to BIP
� Pure IP problems can consider some type of
enumeration procedure.
� This should be done in a clever way such that only a
tiny fraction of the feasible solutions is examined.
� Branch-and-bound with a divide to conquer technique
can be used.
� dividing (branching) the problem into smaller and
smaller subproblems until it can be conquered
� conquering (fathoming) by bounding how good the
best solution can be. If no optimal solution in subset:
discard it.
130
Example: California Manuf, Co.
� Recall prototype example:
Maximize Z = 9x1 + 5x2 + 6x3 + 4x4
subject to
(1) 6x1 + 3x2 + 5x3 + 2x4 ≤ 10
(2) x3 + x4 ≤ 1
(3) – x1 + x3 ≤ 0
(4) – x2 + x4 ≤ 0
and
(5) xj is binary, for j = 1, 2, 3, 4.
131
Page 16
3/1/2016
16
Branching
� Most straightforward way to divide the problem: fix the value of a variable at one set.
� e.g. x1 = 0 for one subset and x1 = 1 for another subset.
� Subproblem 1 (fix x1 = 0):
Maximize Z = 5x2 + 6x3 + 4x4
subject to
(1) 3x2 + 5x3 + 2x4 ≤ 10
(2) x3 + x4 ≤ 1
(3) x3 ≤ 0
(4) – x2 + x4 ≤ 0
(5) xj is binary, for j = 2, 3, 4.
132
Branching
� Subproblem 2 (fix x1 = 1):
Maximize Z = 9 + 5x2 + 6x3 + 4x4
subject to
(1) 3x2 + 5x3 + 2x4 ≤ 4
(2) x3 + x4 ≤ 1
(3) x3 ≤ 1
(4) – x2 + x4 ≤ 0
(5) xj is binary, for j = 2, 3, 4.
133
Page 17
3/1/2016
17
Branching
� Dividing (branching) into suproblems creates a tree
with branches (arcs) for the All node.
� This is the solution tree or enumeration tree.
� Branching variable is the one used for branching.
� The branching continues or not after evaluating the
subproblem.
� Other IP problems usually creates as many branches as
needed.
134
Bounding
� A bound is needed for the best feasible solution of the
subproblem.
� Standard way is to perform a relaxation of the
problem, e.g. by deleting one set of constraints that
makes the problem difficult.
� Most common is to require integer variables, so LP
relaxation is the most widely used.
135
Page 18
3/1/2016
18
Bounding in example
� Example: for the whole problem, (5) is
replaced by xj ≤ 1 and xj ≥ 0 for j=1, 2, 3, 4.
Using simplex:
� (x1, x2, x3, x4) = (5/6, 1, 0, 1), with Z = 16.5
� Thus, Z ≤ 16.5 for all feasible solutions for BIP
problem. Can be rounded to Z ≤ 16 (why?)
� LP relaxation for subproblem 1:
� (x1, x2, x3, x4) = (0, 1, 0, 1), with Z = 9
� LP relaxation for subproblem 2:
� (x1, x2, x3, x4) = (1, 4/5, 0, 4/5), with Z = 16.5
136
Fathoming
� A subproblem can be conquered (fathomed, i.e.
search tree is pruned) in three ways:
1. When the optimal solution for the LP relaxation of a
subproblem is integer, it must be optimal.
� Example: for x1=0, (x1, x2, x3, x4) = (0, 1, 0, 1), is integer.
� It must be stored as first incumbent (best feasible solution
found so far) for the whole problem, along with value of Z:
Z* = value of Z for first incumbent
� In the example Z* = 9.
� Subproblem 1 is solved, so it is fathomed (dismissed).
137
Page 19
3/1/2016
19
Fathoming
2. As Z* = 9, we should not consider subproblems with
bound ≤ 9. Thus, a problem is fathomed when
bound ≤ Z*
� In Subproblem 2 that does not occur, the bound of 16 is
larger than 9. However, it can occur for descendants.
� As new incumbents with larger values of Z* are found, it
becomes easier to fathom in this way.
3. If the simplex method finds that a subproblem’s LP
relaxation has no feasible solution, the subproblem
has no feasible solution and can dismissed.
138
Summary of fathoming tests
� A subproblem is fathomed (dismissed) if
� Test 1: Its bound ≤ Z*
or
� Test 2: Its LP relaxation has no feasible solutions
or
� Test 3: Optimal solution for its LP relaxation is
integer.
� If better, this solution becomes new incumbent, and
Test 1 is reapplied for all unfathomed subproblems.
139
Page 20
3/1/2016
20
Fathoming in example
� Result of applying the three tests is in figure below.
� Subproblem 1 is fathomed by test 3.
140
BIP branch-and-bound algorithm
Initialization: Set Z* = –∞. Apply bounding, fathoming
and optimization steps described below to the whole
problem. If not fathomed, perform iteration.
Steps for each iteration:
1. Branching: Among the remaining subproblems, select
the one created most recently. Branch from this node
by fixing the next variable as either 0 or 1.
2. Bounding: For each new subproblem, obtain its
bound by applying its LP relaxation.
� Round down Z for resulting optimal solution.
141
Page 21
3/1/2016
21
BIP branch-and-bound algorithm
3. Fathoming: For each new subproblem, apply the
three fathoming tests, and discard subproblems that
are fathomed by the tests.
Optimality test: Stop when there are no remaining
subproblems. The current incumbent is optimal.
Otherwise, perform another iteration.
142
Completing example
� Iteration 2. Remaining subproblems are for x1 = 1.
� Subproblem 3 (fix x1 = 1, x2 = 0):
Maximize Z = 9 + 6x3 + 4x4
subject to
(1) 5x3 + 2x4 ≤ 4
(2) x3 + x4 ≤ 1
(3) x3 ≤ 1
(4) x4 ≤ 0
(5) xj is binary, for j = 3, 4.
143
Page 22
3/1/2016
22
Example
� Subproblem 4 (fix x1 = 1, x2 = 1):
Maximize Z = 14 + 6x3 + 4x4
subject to
(1) 5x3 + 2x4 ≤ 1
(2) x3 + x4 ≤ 1
(3) x3 ≤ 1
(4) x4 ≤ 1
(5) xj is binary, for j = 3, 4.
144
Example
� LP relaxation is obtained by replacing (5) by 0 ≤ xj ≤ 1 j
= 3, 4. Optimal solutions are:
� LP relaxation for Subproblem 3:
� (x1, x2, x3, x4) = (1, 1, 0.8, 0), with Z = 13.8
� LP relaxation for Subproblem 4:
� (x1, x2, x3, x4) = (1, 1, 0, 0.5), with Z = 16
� Resulting bounds:
� Bound for subproblem 3: Z ≤ 13
� Bound for subproblem 4: Z ≤ 16
145
Page 23
3/1/2016
23
Example
� All three fathoming tests fail, so both are unfathomed.
146
Iteration 3
� Subproblem 4 has the larger bound, so next branching
is done from (x1, x2) = (1, 1).
� Subproblem 5 (fix x1 = 1, x2 = 1, x3 = 0):
Maximize Z = 14 + 4x4
subject to
(1) 5x3 + 2x4 ≤ 1
(2), (4) x4 ≤ 1
(5) x4 is binary
147
Page 24
3/1/2016
24
Iteration 3 (cont.)
� Subproblem 6 (fix x1 = 1, x2 = 1, x3 = 1):
Maximize Z = 20 + 4x4
subject to
(1) 2x4 ≤ –4
(2) x4 ≤ 0
(4) x4 ≤ 1
(5) x4 is binary
� LP relaxation: replace (5) by 0 ≤ x4 ≤ 1. Optimal solutions are:
� LP relaxation for subproblem 5: (x1, x2, x3, x4) = (1, 1, 0, 0.5), Z = 16
� LP relaxation for subproblem 6: No feasible solutions.
� Bound for subproblem 5: Z ≤ 16
148
Iteration 3 (concl.)
� Subproblem 6 is fathomed by test 2, but not
Subproblem 5.
149
Page 25
3/1/2016
25
Iteration 4
� Node created most recently is selected for branching:
� x4 = 0: (x1, x2, x3, x4) = (1,1,0,0) is feasible, with Z = 14
� x4 = 1: (x1, x2, x3, x4) = (1,1,0,1) is infeasible.
� First solution passes test 3 and second passes test 2
for fathoming.
� First solution is better than incumbent, so it becomes
new incumbent, with Z* = 14
� Reapplying fathoming test 1 to remaining branch to
remaining Subproblem 3, it is fathomed:
� Bound = 13 ≤ Z* = 14.
150
Solution tree after Iteration 4
151
Page 26
3/1/2016
26
Other options in B&B
� Branching can be done e.g. from the best bound rather
than from the most recently created subproblem.
� Bounding is done by solving a relaxation. Another
possible one is e.g. the Lagrangian relaxation.
� Fathoming criteria can be generally stated as:
� Criterion 1: feasible solutions of subproblem must have
Z ≤ Z*
� Criterion 2: the subproblem has no feasible solutions, or
� Criterion 3: an optimal solution of subproblem has been
found.
� Branch-and-bound can find a nearly optimal solution.
152
Branch-and-bound for MIP
� General form of the problem:
153
1
1
Maximize
subject to , for 1,2, , ,
0, for 1,2, ,and
is integer, for 1,
2, , ; .
n
j j
j
n
ij j i
j
j
j
Z c x
a x b i m
x j n
x j I I n
=
=
=
≤ =
≥ =
= ≤
∑
∑ …
…
…
Page 27
3/1/2016
27
Branch-and-bound for MIP
� Similar to BIP algorithm. Solving LP relaxations are
the basis for bounding and fathoming.
� Four changes are needed:
1. Choice of branching variable. Only integer variables
that have a noninteger value in the optimal solution
for the LP relaxation can be chosen.
154
Branch-and-bound for MIP
2. As integer variables can have a large number of
possible values, create just two new subproblems:
� xj*: noninteger value of optimal solution for LP
relaxation.
� [xj*] = greatest integer ≤ xj
*.
� Range of variables for two new subproblems:
xj* ≤ [xj
*] and xj* ≥ [xj
*] + 1.
� Each inequality becomes an additional constraint.
� Example: xj* = 3.5, then: xj
* ≤ 3 and xj* ≥ 4.
� When changes 1. and 2. are combined, a recurring
branching variable can occur, see figure.
155
Page 28
3/1/2016
28
Recurring branching variable
156
Branch-and-bound for MIP
� Changes needed:
3. Bounding step: value of Z was rounded down in BIP
algorithm. Now some variables are not integer-
restricted so bound is value of Z without rounding.
4. Fathoming test 3: optimal solution for the
subproblem’s LP relaxation must only be integer for
integer-restricted variables.
157
Page 29
3/1/2016
29
MIP branch-and-bound algorithm
Initialization: Set Z* = – ∞. Apply bounding, fathoming
and optimization steps described below to the whole
problem. If not fathomed, perform iteration.
Steps for each iteration:
1. Branching: Among the remaining subproblems, select
the one created most recently.
� From integer variables that have a noninteger value
in the optimal solution for the LP relaxation chose the
first one. Let xj be this variable and xj* its value.
� Branch from this creating two subproblems by adding
the respective constraints: xj* ≤ [xj
*] and xj* ≥ [xj
*] + 1.
158
MIP branch-and-bound algorithm
2. Bounding: For each new subproblem, obtain its
bound by applying its LP relaxation.
� Use Z without rounding for resulting optimal solution.
3. Fathoming: For each new subproblem, apply the
three fathoming tests, and discard subproblems that
are fathomed by the tests.
Test 1: Its bound ≤ Z*, where Z* is value of Z for current
incumbent.
Test 2: Its LP relaxation has no feasible solutions.
159
Page 30
3/1/2016
30
MIP branch-and-bound algorithm
3. Fathoming (cont.):
Test 3: Optimal solution for its LP relaxation is integer for
integer-restricted variables. (if this solution is better it
becomes new incumbent, and test 1 is reapplied for all
unfathomed subproblems).
Optimality test: Stop when there are no remaining
subproblems. The current incumbent is optimal.
Otherwise, perform another iteration.
� See MIP example in PL#7 and in page 518 of Hillier’s
book.
160
Branch-and-cut approach to BIP
� Branch-and-bound was develop and refined in the
1960s and early 1970s.
� Can solve problems up to 100 variables.
� Branch-and-cut approach was introduced in the mid
1980s, which can solve problems with thousands
variables.
� Only solve large problems if they are sparse (less than 5
or even 1% of nonzero values in the functional
constraints).
� Uses a combination of: automatic problem processing,
generation of cutting planes and B&B techniques.
161
Page 31
3/1/2016
31
Automatic problem processing for BIP
� “Computer inspection” of IP formulation to spot
reformulations that make the problem quicker to
solve:
� Fixing variables: identify variables that can be fixed at 0
or 1, because other value cannot be optimal.
� Eliminating redundant constraints: identify and
eliminate constraints that are automatically satisfied by
solutions that satisfy all other constraints.
� Tightening constraints: tighten constraints in a way that
reduces feasible region of LP relaxation.
162
Tightening constraints
163
� LP relaxation including
feasible region.
� LP relaxation after tightening
constraint.
Page 32
3/1/2016
32
Generating cutting planes for BIP
� Cutting plane (or cut) is a new functional constraint
that reduced feasible region for LP relaxation.
Procedure for generating cutting planes:
1. Consider functional constraint in ≤ form.
2. Find a group of N variables such that
a) Constraint is violated if every variable in group = 1 and
all other variables = 0.
b) It is satisfied if value of any variables changes from 1
to 0.
3. Resulting cutting plane:
sum of variables in group ≤ N – 1.
164
Constraint Programming
� Combination of artificial intelligence with computer
programming languages in the mid-1980s.
� Flexibility in stating (nonlinear) constraints:
1. Mathematical constraints, e.g., x + y < z.
2. Disjunctive constraints, e.g., times of certain tasks
cannot overlap.
3. Relational constraints, e.g., at least three tasks should
be assigned to a certain machine.
165
Page 33
3/1/2016
33
Stating constraints
4. Explicit constraints, e.g., x and y have same domain
{1,2,3,4,5}, but (x, y) must be (1, 1), (2, 3) or (4, 5).
5. Unary constraints, e.g. z is integer between 5 and 10.
6. Logical constraints, e.g., if x = 5, y ∈ {6, 7, 8}.
� Standard logical functions such as IF, AND, OR, NOT
can be used.
� Constraint programming applies domain reduction
and constraint propagation.
� The process creates a tree search.
166
Example
� Consider:
� x1∈{1,2}, x2∈{1,2}, x3∈{1,2,3}, x4∈{1,2,3,4,5}
� Constraints:
1. All variables must have different values;
2. x1 +x3 = 4.
� Apply domain reduction and constraint propagation
to obtain feasible solutions:
x1∈{1}, x2∈{2}, x3∈{3}, x4∈{4,5}.
167
Page 34
3/1/2016
34
Constraint Programming
� Steps in Constraint Programming:
1. Formulate a compact model of the problem by using
a variety of constraint types (most not of IP type).
2. Efficiently find feasible solutions that satisfy all these
constraints.
3. Search among feasible solutions for an optimal one.
� Strength of constraint programming is in first two
steps, whereas the main strength of IP is in step 3.
� Current research: integrate CP and IP!
168