Documentos de Académico
Documentos de Profesional
Documentos de Cultura
INTEGER PROGRAMMING
Integer Programming
Prototype example
287
Net present
value
Capital
required
x1
$9 million
x2
$5 million
$3 million
x3
$6 million
$5 million
x4
$4 million
$2 million
$6 million
288
1 if decision j is yes,
xj =
j = 1,2,3,4
0 if decision j is no,
Z = total net present value of these decisions.
Maximize Z = 9x1 + 5x2 + 6x3 + 4x4.
Constraints:
6x1 + 3x2 + 5x3 + 2x4 10
Mutually exclusive alternatives
Contingent decisions
Decision
variable
BIP models
x3 x1 and x4 x2
Yes-or-no question
BIP model
x3 + x4 1
286
289
Excel
MatLab
LINGO/LINDO
MPL/CPLEX
290
BIP applications
Formulation examples
291
Example 1
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
Unit profit
(103 $)
Sales
potential
(units per
week)
4 x1 + 6 x2 + 2 x 3 40
x1 7
293
x3 9
x 1 , x2 , x 3 0
Joo Miguel da Costa Sousa / Alexandra Moutinho
294
For requirement 1, three auxiliary binary variables (y1, y2, y3) are
introduced:
if x j > 0 can hold (can produce product j )
1
yj =
0
if x j = 0 must hold (cannot produce product j )
Either 3 x 1 + 4 x 2 + 2x 3 30
4 x 1 + 6 x 2 + 2 x 3 40
x2 5
or
292
y1 + y2 + y 3 2
y j is binary, for j = 1,2,3.
295
296
Z = 5x1 + 7 x2 + 3 x 3
x1 7
subject to
x2 5
x3 9
x 1 My 1 0
x2 My 2 0
x 3 My 3 0
3 x 1 + 4 x 2 + 2 x 3 30 + My 4
y 1 + y2 + y 3 2
4 x 1 + 6 x 2 + 2 x 3 40 + M (1 y 4 )
3 x 1 + 4 x 2 + 2 x 3 My 4 30
y 4 is binary
4 x 1 + 6 x 2 + 2 x 3 + My 4 40 + M
and
x i 0, for i = 1,2,3
y j is binary, for j = 1,2,3,4
297
Solution
298
299
300
1
1
9. Denver to Chicago
2
4
2
3
1
2
12
1
3
3
3
11
3
3
10
7. Chicago to Seattle
1
2
6. Chicago to Denver
Cost (1000)
7
1
2
5
2
9
301
1
xj =
0
302
Solution
Minimize Z = 2 x 1 + 3 x 2 + 4 x 3 + 6 x4 + 7 x5 + 5 x 6 + 7 x 7 + 8 x8 + 9x 9
+9 x 10 + 8 x11 + 9 x12
subject to
x 1 + x 4 + x 7 + x 10 1 (SF to LA)
x 2 + x 5 + x 8 + x 11 1
x 3 + x 6 + x 9 + x 12 1
x 4 + x 7 + x 9 + x 10 + x 12 1
x 1 + x 6 + x 10 + x 11 1
and x j is binary,
x4 + x5 + x9 1
for j = 1,2, ,12
x 7 + x 8 + x 10 + x 11 + x 12 1
x2 + x 4 + x 5 + x 9 1
x 5 + x 8 + x 11 1
x 3 + x 7 + x 8 + x 12 1
x 6 + x 9 + x 10 + x 11 + x 12 1
12
j =1
303
Discussion
304
Solving IP problems
jSi
=1
jS j
Joo Miguel da Costa Sousa / Alexandra Moutinho
305
Solving IP problems
However:
Finite numbers can be astronomically large! With n
variables a BIP problem has 2n solutions, having
exponential growth.
LP assures that a CPF solution can be optimal,
guaranteeing the remarkable efficiency of the simplex
method. LP problems are much easier to solve than IP
problems.
Joo Miguel da Costa Sousa / Alexandra Moutinho
306
Solving IP problems
307
308
Example 1
Example 2
Minimize
Z = x2
subject to x 1 + x 2 0.5
x 1 + x 2 3.5
and
x 1 , x 2 0,
Minimize Z = x 1 + 5 x2 subject to x1 + 10 x2 20
x1 2
and x 1 , x2 0, integers.
x 1 , x 2 integers.
309
Solving IP problems
312
Branching
Most straightforward way to divide the problem: fix
the value of a variable:
and
(5) xj is binary, for j = 1, 2, 3, 4.
Joo Miguel da Costa Sousa / Alexandra Moutinho
310
313
314
Branching
Branching
315
Bounding
316
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
317
318