ORF 307: Lecture 17 Linear Programming: Chapter 23: Integer

ORF 307: Lecture 17
Linear Programming: Chapter 23:
Integer Programming
Robert J. Vanderbei
April 20, 2017
Slides last edited on April 25, 2017
http://www.princeton.edu/∼rvdb
Airline Equipment Scheduling
Given:
• A set of flight legs (e.g. Newark to Chicago departing 7:45am).
• A set of aircraft.
Problem: which specific aircraft should fly which flight legs?
Model:
• Generate a set of feasible routes (i.e., a collection of legs which taken together can be
flown by one airplane).
• Assign a cost to each route (e.g. 1).
• Pick a minimum cost collection of routes that exactly covers all of the legs.
1
Let:
1
if route j is selected,
0
otherwise
1
if leg i is part of route j,
aij =
0
otherwise
cj = cost of using route j.
xj =
An Integer Programming Problem:
minimize
subject to
n
X
j=1
n
X
cj xj
aij xj = 1
i = 1, 2, . . . , m,
j=1
xj ∈ {0, 1}
j = 1, 2, . . . , n.
An example of set-partitioning problems.
2
Airline Crew Scheduling
Similar to equipment scheduling except:
It’s possible to put more than one crew on a flight:
• only one crew works
• any others are just being shuttled
Integer Programming Problem:
minimize
subject to
n
X
j=1
n
X
cj xj
aij xj ≥ 1
i = 1, 2, . . . , m,
j=1
xj ∈ {0, 1}
j = 1, 2, . . . , n.
An example of set-covering problems.
3
Column Generation
The problem of producing a set of possible routes is called column generation.
It is important and nontrivial.
Reason: there are lots of routes.
For example, on a weekly schedule a route might consist of 20 legs.
If there are m legs in total, then there are up to m20 possible routes.
4
Traveling Salesman Problem
Most famous example of a hard problem:
Given n cities, determine the order in which to visit them so as to minimize the total
travel distance.
5
Fixed Costs
c(x) =
0
K + cx
if x = 0
if x > 0.
Equivalent to:
c(x) = Ky + cx
together with the following constraints:
x ≤ uy
x ≥ 0
y ∈ {0, 1}.
where u is an upper bound on x.
6
Nonlinear Objective Functions
Nonlinear objective functions are sometimes approximated by piecewise linear functions.
Piecewise linear functions can be treated using techniques similar to the fixed cost
method above.
LP Relaxation
General Integer Programming Problem
maximize cT x
subject to Ax ≤ b
x≥ 0
x has integer components.
7
Nonlinear Objective Functions
Nonlinear objective functions are sometimes approximated by piecewise linear functions.
Piecewise linear functions can be treated using techniques similar to the fixed cost
method above.
LP Relaxation
General Integer Programming Problem
maximize cT x
subject to Ax ≤ b
x≥ 0
//
x ////
has/////////
integer///////////////
components.
8
Example
x2
6
10x1+7x2=40
3333333333
Optimal Solution
3333333333
to LP−relaxation
43333333333
3333333333
33333333333
x1+x2=5
3333333333
3333333333
2
3333333333 17x1+12x0 2=68.33
3333333333 =z
13333333333
3333333333
03333333333
x
5
maximize 17x1 + 12x2
subject to 10x1 + 7x2
x1 + x2
x1 , x 2
x1 , x 2
≤ 40
≤ 5
≥ 0
integers.
0
1
2
3
4
5
6
1
Optimal solution is (x1, x2) = (1.67, 3.33) with objective value 68.33.
Rounding to integers: (2, 3)
Closest feasible: (1, 3)
⇐=
⇐=
infeasible.
suboptimal.
9
Branch-and-Bound
x2
In LP relaxation, x∗1 = 1.67. Two possibilites:
6
333
333
4333
333
3333
333
P1
333
2
333
333
1333
333
0333
5
• x1 ≤ 1
• x1 ≥ 2
Let
• P1 = LP relaxation plus: x1 ≤ 1
• P2 = LP relaxation plus: x1 ≥ 2
0
1
33333
33333
33333
33333
33333
P2
33333
33333
2
3
4
5
6
x1
Optimal Solutions
• P1: (1, 4)
⇐=
integer solution!
• P2: (2, 2.86)
10
Enumeration Tree
P0: x1=1.67, x2=3.33
ζ=68.33
x1>2
x1<1
P1: x1=1, x2=4
P2: x1=2, x2=2.86
ζ=65
ζ=68.29
x2<2
x2>3
Double boxed node represents integer solution.
Integer solutions provide lower bounds on optimal integer solution.
LP relaxations at each node provide upper bounds for the subtree below it.
11
Refinement of P2 to P3
Feasible Region:
Enumeration Tree:
P0: x1=1.67, x2=3.33
x2
ζ=68.33
6
333
333
4 333
333
3 333
333
P1
333
2
333
333
1
333
333
0
333
0
1
x1>2
x1<1
5
P1: x1=1, x2=4
P2: x1=2, x2=2.86
ζ=65
ζ=68.29
x2<2
33333
33333
33333
33333
P3
33333
33333
2
3
4
x2>3
P3: x1=2.6, x2=2
ζ=68.2
x1<2
5
6
x1>3
x1
12
Splitting of P3 into P4 and P5
Enumeration Tree is Growing
Enumeration Tree is Growing
P0: x1=1.67, x2=3.33
ζ=68.33
x2
6
333
333
4333
333
333
3
333
P1
333
2333
333
1333
333
0333
P1: x1=1, x2=4
1
P2: x1=2, x2=2.86
ζ=65
5
0
x1>2
x1<1
ζ=68.29
x2<2
x2>3
P3: x1=2.6, x2=2
33
33
33
33
P4
33
33
33
2
ζ=68.2
333
333
333
P5
333
3
4
x1<2
P4: x1=2, x2=2
x1>3
P5: x1=3, x2=1.43
ζ=58
5
6
x1
ζ=68.14
x2<1
x2>2
13
More Branching
x2
x2
6
6
333
333
4333
333
333
3
333
P1
333
2333
333
1333
333
0333
5
0
1
333
333
4333
333
333
3
333
P1
333
2333
333
1333
333
0333
5
33
33
33
33
333
P4 333
33
P6
33
333
33
2
3
4
5
6
x1
0
1
33
33
33
33
P5
33
33
33
2
3
P7 P
3
8
3
33 33
33
4
5
6
x1
14
Enumeration Tree Still Growing
P0: x1=1.67, x2=3.33
ζ=68.33
x1>2
x1<1
P1: x1=1, x2=4
P2: x1=2, x2=2.86
ζ=65
ζ=68.29
x2<2
x2>3
P3: x1=2.6, x2=2
ζ=68.2
x1<2
x1>3
P4: x1=2, x2=2
P5: x1=3, x2=1.43
ζ=58
ζ=68.14
x2<1
x2>2
P6: x1=3.3, x2=1
ζ=68.1
x1<3
P7: x1=3, x2=1
ζ=63
x1>4
P8: x1=4, x2=0
ζ=68
15
The Complete Enumeration Tree
P0: x1=1.67, x2=3.33
ζ=68.33
x1>2
x1<1
P1: x1=1, x2=4
P2: x1=2, x2=2.86
ζ=65
ζ=68.29
x2<2
x2>3
P3: x1=2.6, x2=2
P9: Infeasible
ζ=68.2
x1<2
x1>3
P4: x1=2, x2=2
Optimal solution: (x1, x2) = (4, 0).
P5: x1=3, x2=1.43
ζ=58
ζ=68.14
x2<1
x2>2
P6: x1=3.3, x2=1
P10: Infeasible
ζ=68.1
x1<3
P7: x1=3, x2=1
ζ=63
x1>4
P8: x1=4, x2=0
ζ=68
16
Pivoting to a Solution
Explicitly add constraints for lower and upper bounds on the variables:
li ≤ xi ≤ ui,
i = 1, 2.
Let si denote the slack to the lower bound and ti the slack to the upper bound:
xi − si = li,
xi + ti = ui,
i = 1, 2.
Initially, we’ll take l1 = l2 = 0 and u1 = u2 = 100:
17
Optimal Dictionary for LP Relaxation
Need to change the lower bound on x1 to:
2 ≤ x1
⇔
1 1
7
s1 = x1 − 2 = − − w1 + w2
3 3
3
18
First Branch of Branch&Bound
Can use the dual simplex method...
19
First Branch of Branch&Bound–Optimal Solution
Only takes one pivot:
In general, it might take more than one pivot but usually only a few.
20