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 If this is the only deviation from linear programming, it
is called an integer programming (IP)problem. If only somevariables are required to be 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?
João Miguel da Costa Sousa / Alexandra Moutinho 261
Integer
Programming
In integer programming the divisibility assumption
must be dropped.
Another area of application relates to problems
involvingg “yes‐or‐no” decisions, which have binary variables.
These IP problems are called binary integer
programming (BIP)problems.
A small example of a typical BIP problem is given in
the following.
João Miguel da Costa Sousa / Alexandra Moutinho 262
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 the total net present value. Decision
number
Yes‐or‐no question Decision variable
Net present value
Capital required 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
João Miguel da Costa Sousa / Alexandra Moutinho 263
All decision variables have the binary form:
Z= total net present value of these decisions.
BIP
model
1 if decision is yes,
1,2,3,4 0 if decision is no,
j
j
x j
j
⎧
=⎨ =
⎩
Contingent decisions Mutually exclusive alternatives Maximize Z= 9x1+ 5x2+ 6x3+ 4x4.
Constraints:
6x1+ 3x2+ 5x3+ 2x4≤10
x3+ x4≤1
x3≤x1andx4≤x2 xjis binary, for j= 1,2,3,4.
João Miguel da Costa Sousa / Alexandra Moutinho 264
BIP
models
Groups of yes‐or‐no decisions often constitute groups
of mutually exclusive alternatives: only onedecision
in the group can be yes.
Occasionally, decisions of the yes‐or‐no type are contingent decisions: decision that depends upon contingent decisions: decision that depends upon
previous ones.
¾Software options for solving BIP, IP or MIP models:
Excel
MatLab LINGO/LINDO MPL/CPLEX
BIP
applications
Investment analysis, such as the California Man. Co. Site selection, of factories, warehouses, 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.
João Miguel da Costa Sousa / Alexandra Moutinho 266
Formulation
examples
Example 1: making choices when decision variables
are continuous. R&D Division of Good ProductsCo.
has developed three possible new products.
Requirement 1:from the three, at mosttwo can be chosen
to be produced.
Each product can be produced in either of two plants.
However, management has imposed another
restriction:
Requirement 2:just one of the two plants can be chosen as
the producer of the new products.
João Miguel da Costa Sousa / Alexandra Moutinho 267
Example
1
Production time used
for each unit produced
Production
time available
per week
Product 1 Product 2 Product 3
Plant 1 3 hours 4 hours 2 hours 30 hours Plant 2 4 hours 6 hours 2 hours 40 hours
Objectives:choose the products, the plant and the
production rates of the chosen products to maximize
total profit.
Unit profit 5 7 3 (103$)
Sales
potential 7 5 9
(units per week)
João Miguel da Costa Sousa / Alexandra Moutinho 268
Formulation
of
the
problem
Similar to a standard product mix problem, such as the Wyndor
Glass Co. if we drop the two restrictions andrequire each
product to use production hours in both plants.
Let x1, x2, x3be the production rates of the respective products:
1 2 3
Maximize Z=5x +7x +3x3
1 2 3
1 2 3
1 2 3
1 2 3
subject to 3 4 2 30
4 6 2 40
7 5 9 , , 0
x x x x x x x x x x x x
+ + ≤
+ + ≤
≤ ≤ ≤ ≥
João Miguel da Costa Sousa / Alexandra Moutinho 269
Formulation
of
the
problem
For real problem, restriction 1 adds 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. Restriction 2 requires replacing the first two Restriction 2 requires replacing the first two
functional constraints by:
This again requires an auxiliary binary variable.
+ + ≤
+ + ≤
1 2 3
1 2 3
Either 3 4 2 30
or 4 6 2 40 must hold.
x x x
x x x
João Miguel da Costa Sousa / Alexandra Moutinho 270
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
1 if 0 can hold (can produce product )
0 if 0 must hold (cannot produce product )
j j
j
x j
y
x j
> ⎧ = ⎨ =
⎩
This is introduced in the model with the help of an extremely
large positive number M, adding the constraints:
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
≤ ≤ ≤ + + ≤
=
Auxiliary
binary
variables
For requirement 2, another auxiliary binary variable y4is introduced:
1 2 3
4
1 2 3
1 if 4 6 2 40 must hold (choose Plant 2)
0 if 3 4 2 30 must hold (choose Plant 1)
x x x y
x x x
+ + ≤ ⎧
= ⎨ + + ≤ ⎩
This adds the constraints:
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
+ + ≤ + + + ≤ + −
João Miguel da Costa Sousa / Alexandra Moutinho 272
Complete
model
(MIP)
1 2 3
1 2 3
1 1
Maximize 5 7 3
subject to 7
5 9 0 0
Z x x x
x x x x My x My = + + ≤ ≤ ≤ − ≤ ≤ 2 2 3 3
1 2 3
1 2 3 4
1 2 3 4
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
x My
x My
y y y
x x x My
x x x My M
x i y j − ≤ − ≤ + + ≤ + + − ≤ + + + ≤ + ≥ = =
João Miguel da Costa Sousa / Alexandra Moutinho 273
Solution
MIP problem with 3 continuous and four binary
variables. Optimal solution:
y1= 1, y2= 0, y3= 1, y4= 1, x1= 5.5, x2= 0, x3= 9.
y1 1, y2 0, y3 1, y4 1, x1 5.5, x2 0, x3 9. That is, produce products 1 and 3 with production
rates 5.5 units per week and 9 units per week
respectively, and choose Plant 2 for production. Resulting total profit is $54,500 per week.
João Miguel da Costa Sousa / Alexandra Moutinho 274
Example:
Southwestern
Airways
Southwestern Airways needs to assign three crews to
cover all the upcoming flights.
Tableshows the flights in the first column.
Other 12 columns show the 12 feasible sequences of flights
for a crew for a crew.
Numbers in each column indicate the order of the flights. Exactly three sequences must be chosen (one per crew). More than one crew can be assigned to a flight, but it must
be paid as if it was working.
Last row shows the cost of assigning a crew to a particular
sequence of flights.
João Miguel da Costa Sousa / Alexandra Moutinho 275
Data
for
Southwestern
Airways
Feasible sequence of flights
Flight 1 2 3 4 5 6 7 8 9 10 11 12
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
João Miguel da Costa Sousa / Alexandra Moutinho 276
Formulation
of
the
problem
Objective:minimize the total cost for the three crew
assignments that cover all flights.
12 feasible sequences of flights: 12 yes‐or‐no
decisions:
Should sequence jbe assigned to a crew? The 12 binary variables to represent the decisions are:
1 if sequence is assigned to a crew 0 otherwise
j
j x = ⎨⎧
⎩
Formulation
of
the
problem
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
= + + + + + + + +
+ + +
subject to + + + ≥
+ + + ≥
+ + + ≥
+ + + + ≥
1 4 7 10 2 5 8 11 3 6 9 12
9 0 2
1 (SF to LA) 1 1 1 x x x x x x x x x x x x x x x x x
and is binary, for 1,2, ,12
j x
j= …
+ + + + ≥ + + + ≥ + + ≥ + + + + ≥ + + + ≥ + + ≥ + + + ≥ + + + + ≥
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 12
1 1 1 1 1 1 1 1 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
João Miguel da Costa Sousa / Alexandra Moutinho = 278
= ∑12
1
3 (assign three crews)
j j
x
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 $18,000.
Another optimal solution is: x1= x5= x12= 1.
João Miguel da Costa Sousa / Alexandra Moutinho 279
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).
Objective: determine the least costly combination of activities
that collectively possess each characteristic at least once. Siis the set of all activities that possess characteristic i.
A constraint is included for each characteristic i:
In set partitioning problemsthe constraint is
1 j j j S x ∈ =
∑
1 i j j S x ∈ ≥∑
João Miguel da Costa Sousa / Alexandra Moutinho 280
Solving
IP
problems
Are integer problems easy to solve?
Difference to LP is that IP have far fewer solutions. IP problems have a finitenumber of feasible solutions.
However:
¾Fi it b b t i ll l ! With
¾Finite numbers can be astronomically large! With n variables a BIP problem has 2nsolutions, having exponential growth.
¾LP assuresthat a CPF solution can be optimal,
guaranteeing the remarkable efficiency of the simplex
method. LP problems are much easier to solve than IP LP problems are much easier to solve than IP problems
problems!!
João Miguel da Costa Sousa / Alexandra Moutinho 281
Solving
IP
problems
Consequently, most IP algorithms incorporate the
simplex method. This is called the LP relaxation. Sometimes, the solution of the LP problem isthe
solution of the IP problem, such as :
Minimum cost flow problem, including transportation problem, assignment problem, shortest‐path problemand
maximum flow problem.
Special structures (see examples 2 and 3): mutually
exclusive alternatives, contingent decisionsor set‐
covering constraintscan also simplify the problem. João Miguel da Costa Sousa / Alexandra Moutinho 282
Solving
IP
problems
Primary determinants of computational complexity: 1. number of integer variables,
2. these variables are binaryor generalinteger variables, 3. any special structurein 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 roundthe obtained solution... Yes?
Example
1
2
1 2
1 2
1 2
Minimize
subject to 0.5
3.5
and , 0,
Z x
x x
x x
x x
= − + ≤
+ ≤ ≥
1, 2 integers.
x x
João Miguel da Costa Sousa / Alexandra Moutinho 284
Example
2
1 2
Minimize Z x= +5x 1 2 1
1 2
subject to 10 20 2 and , 0, integers.
x x
x x x
+ ≤ ≤ ≥
João Miguel da Costa Sousa / Alexandra Moutinho 285
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 metaheuristicsare extremely efficient
for very large problems, but do not guaranteeto find
an optimal solution.
These algorithms will be discussed later.
Most popular traditional method for solving IP
problems is the branch‐and‐bound technique.
João Miguel da Costa Sousa / Alexandra Moutinho 286
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‐boundwith 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 boundinghow good the best
solution can be. If no optimal solution in subset: discard it. João Miguel da Costa Sousa / Alexandra Moutinho 287
Example:
California
Manuf,
Co.
Recall prototype example: Maximize Z= 9x1+ 5x2+ 6x3+ 4x4 subject to
(1) 6x + 3x + 5x + 2x ≤10 (1) 6x1+ 3x2+ 5x3+ 2x4≤10
(2) x3+ x4≤1
(3) –x1+ x3 ≤0
(4) –x2+ x4≤0
and
(5) xjis binary, for j= 1, 2, 3, 4.
João Miguel da Costa Sousa / Alexandra Moutinho 288
Branching
Most straightforward way to divide the problem:
fix the value of a variable:
e.g. x1= 0 for one subset and x1= 1 for another subset. ¾Subproblem 1(fixx1= 0): ¾Subproblem 2(fixx = 1):
João Miguel da Costa Sousa / Alexandra Moutinho 289
p 1
MaximizeZ= 5x2+ 6x3+ 4x4 subject to
(1) 3x2+ 5x3+ 2x4≤10 (2) x3+ x4≤1 (3) x3 ≤0 (4) –x2+ x4≤0 (5) xjis binary, forj= 2, 3, 4.
¾Subproblem 2(fixx1 1): MaximizeZ= 9 + 5x2+ 6x3+ 4x4 subject to
(1) 3x2+ 5x3+ 2x4≤4 (2) x3+ x4≤1 (3) x3 ≤1 (4) –x2+ x4≤0 (5) xjis binary, forj= 2, 3, 4.
Branching
Dividing (branching) into suproblems creates a tree
with branches(arcs) for the Allnode. This is the solution treeor enumeration tree. Branching variableis the one used for branching. Branching variableis the one used for branching. The branching continues or not after evaluating the
subproblem.
Other IP problems usually creates as many branches
as needed.
João Miguel da Costa Sousa / Alexandra Moutinho 290
Bounding
A boundis needed for the best feasible solution of
each of the subproblems.
Standard way is to perform a relaxationof the
problem, e.g.g by deletinggone set of constraints that
makes the problem difficult to solve.
Most common is to require integer variables, so LP
relaxationis the most widely used.
João Miguel da Costa Sousa / Alexandra Moutinho 291
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.55 for all feasible solutions for BIP
problem. Can be rounded to Z≤16 (why?) LP relaxation for subproblem 1(x1=0):
(x1,x2,x3,x4) = (0, 1, 0, 1), with Z = 9 LP relaxation for subproblem 2(x1=1):
(x1,x2,x3,x4) = (1, 4/5, 0, 4/5), with Z = 16.5
João Miguel da Costa Sousa / Alexandra Moutinho 292
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.
E l f ( ) ( ) i i
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 Zfor first incumbent In the example Z*= 9.
Subproblem 1 is solved, so it is fathomed(dismissed). João Miguel da Costa Sousa / Alexandra Moutinho 293
Fathoming
2. As Z*= 9, we should not consider subproblems with bound≤9. Thus, a problem is fathomed when
Bound ≤Z*
In Subproblem 2p 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 solutionand can be dismissed. João Miguel da Costa Sousa / Alexandra Moutinho 294
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 ¾ 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.
Fathoming
in
example
Result of applying the three tests is in figure below. Subproblem 1is fathomed by test 3.
João Miguel da Costa Sousa / Alexandra Moutinho 296
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
boundby applying its LP relaxation. Round down Zfor resulting optimal solution.
João Miguel da Costa Sousa / Alexandra Moutinho 297
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.
Optimalityy test:Stop when there are no remainingg
subproblems. The current incumbent is optimal.
Otherwise, perform another iteration.
João Miguel da Costa Sousa / Alexandra Moutinho 298
Completing
example
¾Subproblem 3 (fix x1= 1, x2= 0):
¾Subproblem 4 (fix x1= 1, x2= 1): Iteration 2.Remaining
subproblems are for x1= 1.
( 1 , 2 ) Maximize Z= 9 + 6x3+ 4x4 subject to
(1) 5x3+ 2x4≤4 (2) x3+ x4≤1 (3) x3 ≤1 (4) x4≤0 (5) xjis binary, for j= 3, 4.
( 1 , 2 )
Maximize Z= 14 + 6x3+ 4x4 subject to
(1) 5x3+ 2x4≤1 (2) x3+ x4≤1 (3) x3 ≤1 (4) x4≤1 (5) xjis binary, for j= 3, 4. João Miguel da Costa Sousa / Alexandra Moutinho 299
Example
LP relaxation is obtained by replacing (5) by 0 ≤xj≤1
j = 3, 4. Optimal solutions are: LP relaxation for subproblem 3:
((xx11,,xx22,,xx33,,xx44)) = (1,(1, 0,0, 0.8,0.8, 0),0), withwith ZZ= 13.813.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
João Miguel da Costa Sousa / Alexandra Moutinho 300
Example
All three fathoming tests fail, so both are unfathomed.
Iteration
3
¾Subproblem 5 ¾Subproblem 6
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) x4is binary
¾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) x4is binary
João Miguel da Costa Sousa / Alexandra Moutinho 302
Iteration
3
(cont.)
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 LP relaxation for subproblem 6: No feasible solutions. Bound for subproblem 5: Z≤16
Subproblem 6 is fathomed by test 2, but not
subproblem 5.
João Miguel da Costa Sousa / Alexandra Moutinho 303
Iteration
3
(concl.)
João Miguel da Costa Sousa / Alexandra Moutinho 304
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 (integer solution) and
second passes test 2 (infeasible) for fathoming. First solution is better than incumbent, so it becomes
new incumbent, with Z*= 14
Reapplying fathoming test 1 (bound) to remaining
branch of Subproblem 3: Bound = 13 ≤Z*= 14 (fathomed).
João Miguel da Costa Sousa / Alexandra Moutinho 305
Solution
tree
after
Iteration
4
João Miguel da Costa Sousa / Alexandra Moutinho 306
Other
options
in
Branch
‐
and
‐
Bound
Branchingcan be done e.g. from the best bound
rather than from the most recently created
subproblem.
Boundingis done by solving a relaxation. Another
possible one is e.g. the Lagrangian relaxation.
p g g g
Fathomingcriteria can be generally stated as: Crit. 1:feasible solutions of subproblem must have Z≤Z*, Crit. 2:the subproblem has no feasible solutions, or Crit. 3:an optimal solution of subproblem has been found. Some adjustments necessary for Branch‐and‐bound
to find multiple optimal solutions.
Branch
‐
and
‐
bound
for
MIP
General form of the problem:1
Maximize
n j j j
Z c x
=
=
∑
1
subject to , for 1,2, , ,
0, for 1,2, ,
and
is integer, for 1,
2, , ; .
n ij j i j
j j
a x b i m
x j n
x j I I n
=
≤ =
≥ =
= ≤
∑
…… …
João Miguel da Costa Sousa / Alexandra Moutinho 308
Branch
‐
and
‐
bound
for
MIP
Similar to BIP algorithm. Solving LP relaxationsare
the basis for boundingand fathoming.
4 changes are needed:
4 changes are needed:
1. Choice of branching variable. Only integer variables
that have a noninteger valuein the optimal solution
for the LP relaxation can be chosen.
João Miguel da Costa Sousa / Alexandra Moutinho 309
Branch
‐
and
‐
bound
for
MIP
2. As integer variables can have a large number of
possible values, create just twonew subproblems: xj*: noninteger value of optimal solution for LP relaxation.
[xj*] = greatest integer ≤x
j*.
f bl f b bl
Range of variables for two new subproblems:
xj*≤[x
j*] and xj*≥[xj*] + 1.
Each inequality becomes an additional constraint. Example: xj*= 3.5, then: x
j*≤3 and xj*≥4.
¾ When changes 1.and 2.are combined a recurring
branching variablecan occur, see figure.
João Miguel da Costa Sousa / Alexandra Moutinho 310
Recurring
branching
variable
João Miguel da Costa Sousa / Alexandra Moutinho 311
Branch
‐
and
‐
bound
for
MIP
Changes needed:
3. Bounding step: value of Zwas rounded downin BIP
algorithm. Now some variables are not integer‐
restricted so bound is value of Zwithoutrounding.g
4. Fathoming test 3: optimal solution for the
subproblem’s LP relaxation must only be integerfor integer‐restrictedvariables.
João Miguel da Costa Sousa / Alexandra Moutinho 312
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:
h h b bl
1. Branching: Among the remaining subproblems,
select the one created most recently.
From integer variablesthat have a noninteger valuein the
optimal solution for the LP relaxation choose the first one.
Let xjbe this variable and xj* its value.
Branch from this creating two subproblems by adding the
respective constraints: xj*≤[x
j*] and xj*≥[xj*] + 1.
MIP
branch
‐
and
‐
bound
algorithm
2. Bounding:For each new subproblem, obtain its
boundby applying its LP relaxation.
Use Zwithoutrounding for resulting optimal solution.
3. Fathoming:For each new subproblem, apply the
João Miguel da Costa Sousa / Alexandra Moutinho 314
3 g p pp y
three fathoming tests, and discard subproblems
that are fathomed by the tests.
Test 1:Its bound ≤Z*, where Z*is value of Zfor current incumbent.
Test 2:Its LP relaxation has no feasible solutions.
MIP
branch
‐
and
‐
bound
algorithm
3. Fathoming (cont.):
Test 3:Optimal solution for its LP relaxation has integer values
for integer‐restrictedvariables. (If this solution is better it
becomes new incumbent, and test 1 is reapplied for all
unfathomed subproblems).p )
Optimality test:Stop when there are no remaining
subproblems. The current incumbent is optimal.
Otherwise, perform another iteration. See MIP examples in PL#7 and in page 518 of
Hillier’s book.
João Miguel da Costa Sousa / Alexandra Moutinho 315
Branch
‐
and
‐
cut
approach
to
BIP
Branch‐and‐bound was develop and refined in the
60’s and early 70’s.
Can solve problems up to 100 variables.
Branch‐and‐cut approachpp was introduced in the mid
80’s, and can solve problems with thousands of
variables.
Only solve large problems if they are sparse(less than 5 or
even 1% of nonzerovalues in functional constraints). Uses a combination of automatic problem processing,
generation of cutting planesand B&B techniques. João Miguel da Costa Sousa / Alexandra Moutinho 316
Automatic
problem
processing
for
BIP
“Computer inspection” of IP formulation to spot
reformulationsthat make the problem quicker to
solve:
¾Fixing variables:identify variables that can be fixed at 0 or
1,, because other value cannot lead to feasible and optimalp
solution.
¾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 without
eliminating any feasible solutions for the BIP problem. João Miguel da Costa Sousa / Alexandra Moutinho 317
Tightening
constraints
LP relaxation including
feasible region.
LP relaxation after tightening
constraint.
João Miguel da Costa Sousa / Alexandra Moutinho 318
Generating
cutting
planes
for
BIP
Cutting plane(or cut) is a new functional constraint that
reduces feasible region for LP relaxation without
eliminating any feasible solutions of IP problem. Procedure for generating cutting planes:
1. Consider functional constraint in ≤ form with only
nonnegative coefficients.
2. Find a group of Nvariables such that
a) Constraint is violated if every variable in group = 1 and all
other variables = 0.
b) It is satisfied if value of anyvariables changes from 1 to 0. 3. Resulting cutting plane:
sum of variables in group ≤ N– 1.
Constraint
Programming
Combination of artificial intelligence with computer
programming languages in the mid‐80’s.
Flexibilityin stating (nonlinear) constraints:
1 Mathematical constraints e g x+ y< z
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.
João Miguel da Costa Sousa / Alexandra Moutinho 320
Stating
constraints
4. Explicit constraints, e.g., xand yhave same domain
{1,2,3,4,5}, but (x, y) must be (1, 1), (2, 3) or (4, 5).
5. Unary constraints, e.g. zis integer between 5 and
10.
6 L i l t i t if th [6 8]
6. Logical constraints, e.g., if x= 5, then y∈[6, 8]. ¾ Allows use of standard logical functions such as IF,
AND, OR, NOT.
¾ Constraint programming applies domain reduction
and constraint propagation.
¾ The process creates a tree search.
João Miguel da Costa Sousa / Alexandra Moutinho 321
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}.
João Miguel da Costa Sousa / Alexandra Moutinho 322
Constraint
Programming
Steps in Constraint Programming:
1. Formulate a compact model for the problem by
using a variety of constraint types (most not of IP
type).
ff f f f
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!