Sunteți pe pagina 1din 31

Lecture 10:

Integer Programming &


Branch-and-Bound

J. Christopher Beck 2005 1


Outline
Quick mathematical programming
review
Disjunctive graph
Disjunctive programming formulation
Example 5.3.1
Branch-and-bound
Example B.4.1
Note: Some slides taken from see text
CD (Iowa State, Amsterdam)
J. Christopher Beck 2
2005
Review of Mathematical
Programming
Many scheduling problems can be
formulated as mathematical
programs:
Linear Programming
Integer Programming
See Appendix A in book.

J. Christopher Beck 3
2005
Linear Programs
Minimize c1 x1 c2 x2 ... cn xn
subject to
a11 x1 a12 x2 ... a1n xn b1
a21 x1 a22 x2 ... a2 n xn b2

am1 x1 am 2 x2 ... amn xn bm
xj 0 for j 1,..., n
J. Christopher Beck 4
2005
Solving LPs
LPs can be solved efficiently
Simplex method (1950s)
Interior point methods (1970s)
Polynomial time
Has been used in practice to solve
huge problems

J. Christopher Beck 5
2005
Integer Programming
LP where all variables must be
integer
Mixed-integer programming (MIP)
Much more difficult than LP
Most useful for scheduling

J. Christopher Beck 6
2005
Example: Single Machine
One machine and n jobs
Minimize n
j 1
w jC j
Define the decision variables
1 if job j starts at time t
x jt
0 otherwise.

J. Christopher Beck 7
2005
IP Formulation
n C max 1
Minimize
w (t p ) x
j 1 t 0
j j jt End time of job j

subject to C max 1

Time-indexed
t 0
x jt 1 j All activities start once
formulation n t 1
one way
to model a
x js 1 t
j 1 s max{t p j , 0}
Jobs cant overlap
scheduling
problems as a MIP x jt 0,1 j , t
J. Christopher Beck 8
2005
Solving IPs
Branch-and-bound methods
Branch on the decision variables
Linear programming relaxation provides
bounds

There are other methods but we will


focus on B&B
We will come back to B&B later in the
lecture
J. Christopher Beck 9
2005
Disjunctive Graph
A alternative MIP formulation from the time-indexed o

Formulation
Each job follows a given route
Picture each job as a row of nodes:
(i,j)=operation on machine i of job j

(1,1) (2,1) (3,1) Conjunctive arcs

Source (1,2) (2,2) (4,2) Sink

(2,3)
J. Christopher Beck (1,3) (4,3) (3,3)
10
2005
Graph Representation
To model the machines, introduce the arc set B (...), giving a clique of bidirected arc-pairs on each machine

Full Graph G(N, AB)

Disjunctive
(1,1) (2,1) (3,1) Conjunctive arcs
arcs

Source (1,2) (2,2) (4,2) Sink

(2,3)
J. Christopher Beck (1,3) (4,3) (3,3)
11
2005
Solving the Problem
Select one arc from each disjunctive
pair

(1,1) (2,1) (3,1)

Source (1,2) (2,2) (4,2) Sink

(2,3)
J. Christopher Beck (1,3) (4,3) (3,3)
12
2005
Feasibility of the Schedule
Are all selections feasible?
Resulting graph must be acyclic

(1,1) (2,1) (3,1)

Source (1,2) (2,2) (4,2) Sink

(2,3)
J. Christopher Beck (1,3) (4,3) (3,3)
13
2005
Conjunctive vs. Disjunctive
Conjunctive
All constraints must be satisfied
AND
In JSP they come from the job routings
Disjunctive
At least one of the constraints must be
satisfied
OR
In JSP they come from the machine usage
J. Christopher Beck 14
2005
Disjunctive Programming
Idea
Formulate an Integer Program
based on the disjunctive graph and
use standard IP solution
techniques (e.g., B&B) to solve it
How do we formulate a JSP as a
disjunctive program?
Assume objective is to minimize
makespan (i.e., min Cmax)
J. Christopher Beck 15
2005
Notation
N set of all operations
A set of all conjunctive
constraints
B set of all disjunctive constraints
yij starting time of operation (i, j)
(i,j)=operation on machine i of job j

J. Christopher Beck 16
2005
Disjunctive Programming
Formulation
Minimize Cmax
s.t.
C max yij pij (i, j ) N
yki yij pij (i, j ) (k , j ) A
yij yil pil yil yij pij (i, j ) (i, l ) B
yij 0 (i, j ) N

J. Christopher Beck 17
2005
Disjunctive Programming
Formulation
Minimize Cmax
s.t.
C max yij pij (i, j ) N
yki yij pij (i, j ) (k , j ) A
yij yil pil yil yij pij (i, j ) (i, l ) B
yij 0 (i, j ) N
All operations must end before makespan
J. Christopher Beck 18
2005
Disjunctive Programming
Formulation
Minimize Cmax
s.t.
C max yij pij (i, j ) N
yki yij pij (i, j ) (k , j ) A
yij yil pil yil yij pij (i, j ) (i, l ) B
yij 0 (i, j ) N
An operation cannot start before the
previous operation (in the job) ends
J. Christopher Beck 19
2005
Disjunctive Programming
Formulation
Minimize Cmax
s.t.
C max yij pij (i, j ) N
yki yij pij (i, j ) (k , j ) A
yij yil pil yil yij pij (i, j ) (i, l ) B
yij 0 (i, j ) N
One disjunctive arc must be chosen
J. Christopher Beck 20
2005
Disjunctive Programming
Formulation
Minimize Cmax
s.t.
C max yij pij (i, j ) N
yki yij pij (i, j ) (k , j ) A
yij yil pil yil yij pij (i, j ) (i, l ) B
yij 0 (i, j ) N
Start times cannot be negative
J. Christopher Beck 21
2005
Disjunctive Programming
Formulation
See Example 5.3.1
You should be able to create a
disjunctive programming
formulation for a given JSP
instance

J. Christopher Beck 22
2005
Either the time-indexed
the disjunctive formulat
OK, now what?
So weve got a IP formulation of the
problem, how do we solve it?
Using standard IP solution techniques
such as branch-and-bound
Doesnt mean the problem is easy
Will now talk about branch-and-
bound (B&B) which can be used to
solve IPs and other hard problems
J. Christopher Beck 23
2005
Branch-and-Bound
Idea
Systematically search through
possible variable values
Use heuristics to pick a decision to try
(branch)
Use lower bounds on solutions to
bound the search
Creates a search tree
J. Christopher Beck 24
2005
B&B Search Tree:
Branching
Imagine a problem with 3 variables
a, b, c {0, 1} Branch

a=0 a=1

b=0 b=1 b=0 b=1

c=0 c=1 c=0 c=1 c=0 c=1 c=0 c=1

100 90 110 115 80 90 100 110

J. Christopher Beck 25
2005
B&B Search Tree:
Bounding
Imagine I have a way to calculate a
lower bound on the cost at each node

a=0 a=1
50

b=0 b=1 b=0


70 80
c=0 c=1 c=0
85 95 80

100 90 80
Bound
J. Christopher Beck 26
2005
B&B
Branch: assign a heuristic value to
a variable
Creates two subproblems
Bound: compare lower bound at
node with best known solution
If LB > best, you can backtrack right
away

J. Christopher Beck 27
2005
B&B for IP
Usually lower bound is found by
solving the linear relaxation of the IP
LP formed by ignoring integral constraints
Branch on one of the integer variables
with a non-integer value to be:
greater than or equal to the next highest
integer, or
Less than or equal to the next lowest
integer
J. Christopher Beck 28
2005
IP Formulation
n C max 1
Minimize
w (t p ) x
j 1 t 0
j j jt End time of job j

subject to C max 1

x t 0
jt 1 j All activities start once
n t 1

x js
j 1 s max{t p j , 0}
1 t Jobs cant overlap

x jt 0,1 j , t
J. Christopher Beck 29
2005
B&B for IP

xi floor(r) xi ceil(r)

xk floor(s)


Solve LP to give cost LB
If solution in non-integer, choose xi = r
(r in non-integer)
Branch on xi
J. Christopher Beck
Repeat at next node
30
2005
B&B is Important!
We will look at it again in the next
lecture!
You should understand Sections
B.3 and B.4 (in Appendix B)

J. Christopher Beck 31
2005

S-ar putea să vă placă și