Sei sulla pagina 1di 35

1

Contents college 3 en 4
Book: Appendix A.1, A.3, A.4, 3.4, 3.5,
4.1, 4.2, 4.4, 4.6 (not: 3.6 - 3.8, 4.2
- 4.3)
Extra literature on resource constrained
project scheduling (will be handed out)
2
Planning and scheduling
optimization techniques
Dispatching Rules
Composite Dispatching Rules
Adaptive search
Dynamic Programming
(Integer) Linear Programming
Cutting plane methods
Branch and Bound
Beam Search
3
Linear programming (LP) model
LP:
Matrix form:
) n , , 1 j ( 0 x
b x a ... x a x a
b x a ... x a x a
b x a ... x a x a
: to subject
x c ... x c x c min
j
m n mn 2 2 m 1 1 m
2 n n 2 2 22 1 21
1 n n 1 2 12 1 11
n n 2 2 1 1
-
/
= >
+ + +
+ + +
+ + +
+ + +
0 x
b Ax
x c min
T
>

objective function
constraints
variable
restrictions
where:
x, c: n-vector
A: m,n-matrix
b: m-vector
4
Linear programming example
) 2 , 1 j ( 0 x
12 x 4 x 3
4 x x 2
: to subject
x x max
j
2 1
2 1
2 1
= >
+
+
+

>

0
0
x
x
12
4
x
x
4 3
1 2
: to subject
x
x
1
1
max
2
1
2
1
2
1
T
or:
5
Linear programming example:
graphical solution (2D)
1 2 3 4 5 6
x
1
1
2
3
4
5
6
x
2
) objective (
6 x x
2 1
= +
4 x x 2
2 1
+
12 x 4 x 3
2 1
+
) 2 , 1 j ( 0 x
12 x 4 x 3
4 x x 2
: to subject
x x max
j
2 1
2 1
2 1
= >
+
+
+
0
solution
space
6
Linear programming (cont.)
Solution techniques:
(dual) simplex method
interior point methods (e.g. Karmarkar algorithm)
Commercial solvers, for example:
CPLEX (ILOG)
XPRESS-MP (Dash optimization)
OSL (IBM)
Modeling software, for example:
AIMMS
AMPL
7
Integer programming (IP) models
Integer variable restriction
IP: integer variables only
MIP: part integer, part non-integer variables
BIP: binary (0-1) variables
General IP-formulation:
Complex solution space
) Z x ( integer x
b Ax
x c min
T
+

8
Integer programming example:
graphical solution (2D)
1 2 3 4 5 6
x
1
1
2
3
4
5
6
x
2
) objective (
6 x x
2 1
= +
) 2 , 1 j ( Z x
12 x 4 x 3
4 x x 2
: to subject
x x max
j
2 1
2 1
2 1
=
+
+
+
+
0
2 optimal solutions!
9
Total unimodularity property for
integer programming models
Suppose that all coefficients are integer in the model:
i.e.
Example: transportation problem
if A has the total unimodularity property
(i.e. every square submatrix has determinant 0,1,-1)
there is an optimal integer solution x*
& the simplex method will find such a solution
0 x
b Ax
x c min
T
>
j , i , b , a
i ij
V N
10
Integer programming tricks
PROBLEM: x = 0 or x > k
use binary indicator variable y=
restrictions:
k for x ,
0 for x ,
1
0
>
=
|
,
|
, 0,1 y
y k x
x) on upperbound an is (M y M x

>

11
PROBLEM: fixed costs: if x
i
>0 then costs C(x
i
)
use indicator variable y
i
=
restrictions :
Integer programming tricks (2)
0 x
b Ax
) x ( C minimize
>
=
0. for x
0, for x

x c k
0
) x ( C
: where
i
i
i i i
i
>
=
|
,
|
+
=
0 for x ,
0 for x ,
1
0
i
i
>
=
|
,
|
, 0,1 y
x c y k ) x ( C
y M x
i
i i i i i
i i

+ =

) i (V
12
Hard vs. soft restrictions
hard restriction: must hold, otherwise unfeasibility
for example:
soft restriction: may be violated, with a penalty
for example:
(Integer) programming tricks (3)
0 Y , 0 x
Y 5 x x
100 Y x c minimize
2 1
T
> >
+ +
+
.
5 x x
2 1
+
13
Absolute values:
solution:
(Integer) programming tricks (4)
+
+
+ =
=
t t t
t t t
y y y
y y y
free y , 0 x
y b x a
y min
t t , j
t t t , j
j
j
j
t
>
+ =

)
0 y , 0 y , 0 x
y y b x a
y y min
t t t , j
t t t t , j
j
j
t
t t
> > >
+ =
+
+
+
+

goal
variation
14
Conjunctive/disjunctive programming
- conjunctive set of constraints: must all be satisfied
- disjunctive set of constraints: at least one must be satisfied
example (Appendix A.4):
Integer programming tricks (5)
.
j k j
k j k
j
j j
p x x
or
p x x
x w min
>
>

} 1 , 0 { y
) y 1 ( M p x x
y M p x x
x w min
2 j k j
1 k j k
j
j j

>
>

.
15
IP example
nonpreemptive single machine, total weighted
completion time (App. A.3)
function) (objective x t w imize min
j job of time completion x t
j job of time completion x t
n
1 j
1 - Cmax
0 t
jt j
1 - Cmax
0 t
jt
jt

= =
=

=
= = 1 x if
jt
otherwise 0 and t, time at j job if , 1 x
jt
completes =
objective function: minimize weighted completion time:
model definition:
16
IP example (cont.)
Restriction: all jobs must be completed once:
1 x
1 - Cmax
0 t
jt
=

=
Restriction: only one job per time t:

t) time per job one exactly : on (restricti 1 x
t) during process in is j job (if 1 x
n
1 j
p t
t s
js
p t
t s
js
j
j
=
=

=
+
=
+
=
if job j is in process during t, it must be completed
somewhere during [t,t+p
j
]
17
IP example (cont.)
Complete IP-model:
, 1) - Cmax , 0, t n, , 1, j (for 1 , 0 x
1) - Cmax , 0, t (for 1 x
n) , 1, j (for 1 x
: to subject
x t w inimize m
jt
n
1 j
p t
t s
js
1 - Cmax
0 t
jt
n
1 j
1 - Cmax
0 t
jt j
j
- -
-
-
= =
= =
= =


=
+
=
=
= =
nvCmax
integer
variables
18
IP example (cont.)
Additional restriction: precedence constraints
Model definition: SUCC(j) = successors of job j
job j must be completed before all jobs in SUCC(j):
n) , 1, j SUCC(j), k (for tx tx
k job of time start p tx
j job of time completion tx
1 max C
0 t
kt
1 max C
0 t
jt
k
1 max C
0 t
kt
1 max C
0 t
jt
- =
=
=

=
19
Integer programming
solution techniques
Heuristic vs. explicit approach:
trade-off between solution quality and computation time
trade-off between implementation effort/costs and yield
(i.e. profits gained from solution quality improvement)
Heuristic methods; for example:
local search (e.g. simulated annealing, tabu search, k-opt)
(composite) dispatching rules (e.g. EDD, SPT, MS)
adaptive search
rounding fractional solutions
beam search
20
Explicit methods; 3 categories:
1. dynamic programming
2. cutting plane (polyhedral) methods
3. branch and bound
or: hybrid methods (combination of the above)
Commercial IP solvers usually use a
combination of heuristics and 2, 3
Integer programming
solution techniques (cont.)
21
Dynamic programming
Problem divided into stages
Each stage can have various states
A recursive objective function is used to
iterate through all states and all stages
(forwards or backwards)
))} x , i ( i ( F ) x , i ( c { min ) i ( F
t t 1 t 1 t t t t
x
t t
t

+ =
T) , 0, (t x
t
- =
t
i
(constant) c ) i ( F
0 0 0
=
22
Cutting plane methods
STEP 0: Create a relaxation of the problem by
omitting restrictions
(e.g. the integrality restrictions)
STEP 1: Solve the current problem
STEP 2: If solution is infeasible then generate
a restriction that cuts of the solution,
and add it to the problem STEP 1
Otherwise: DONE
23
Branch and bound
Enumeration in a search tree
each node is a partial solution, i.e. a part of
the solution space
...
...
root node
child nodes
child nodes
Level 0
Level 1
Level 2
24
Branch and bound example 1
Disjunctive programming (appendix A.4):
disjunctive set of constraints: at least one must be satisfied
x
j
= completion time of job j
restriction: ) I k , j ( p x x or p x x either
j k j k j k
V > >
solve LP without
disjunctive restrictions
(= LP relaxation)
if disjunct. restr.
violated for j & k
Level 0
Level 1
...
k j k
p x x >
j k j
p x x >
25
Branch and bound (cont.)
Upper bound: e.g. a feasible solution
Lower bound:
e.g. a solution to an easier problem
Node elimination (fathom/discard nodes):
when lower bound >= upper bound
26
Branch and bound (cont.)
Branching strategy:
how to partition solution space
Node selection strategy:
sequence of exploring nodes:
depth first (tries to obtain a solution fast)
breadth/best bound first (tries to find the best solution)
which nodes to explore (filter and beam width)
filter width: #nodes selected for thorough evaluation
beam width: #nodes that are branched on ( filter width)
Beam search
27
Branch and bound example 2
Single machine, maximum lateness, release
and due dates
lower bound: EDD + preemption
Jobs 1 2 3 4
p(j) 4 2 6 5
r(j) 0 1 3 5
d(j) 8 12 11 10
(?,?,?,?)
(1,?,?,?) (4,?,?,?) (2,?,?,?)
Level 0
Level 1
(3,?,?,?)
28
Branch and bound example 2
Lower bound for: (1,?,?,?)
Lower bound: Lmax = max(0,17-12,15-11,0)=5
Jobs 1 2 3 4
p(j) 4 2 6 5
r(j) 0 1 3 5
d(j) 8 12 11 10
t
r(2) r(3) r(4)
d(4)<d(3) d(3)<d(2)
0 1 2 3 4 5
6 7
8 9 10 11
12
13 14 15 16 17
3 3 2 1 4
29
(?,?,?,?)
(1,?,?,?) (4,?,?,?) (2,?,?,?)
Level 0
Level 1
(3,?,?,?)
Branch and bound example 2 (cont.)
LB=5
LB=7*
=UB
(1,2,?,?) (1,3,?,?)
Jobs 1 2 3 4
p(j) 4 2 6 5
r(j) 0 1 3 5
d(j) 8 12 11 10
infeasible:
(1,3,4,3,2)
LB=6*
=UB
(1,2,4,3)
LB=5*=UB
(1,3,4,2)
DONE
(1,2,4,3) (1,3,4,2)
30
Branch and bound example 3
1 2 3 4 5 6
x
1
1
2
3
4
5
6
x
2
) objective (
6 x x
2 1
= +
0
4 . 2 x
, 8 . 0 x
2
1
=
=
0 x
1
1 x
1
>
3 x
, 0 x
2
1
=
=
2 x
, 1 x
2
1
=
=
2 x
2
3 x
2
>
2 x
, 1 x
2
1
=
=
3 x
, 0 x
2
1
=
=
obj: 3 obj: 3
obj: 3 obj: 3
LP solution:
31
Beam search example 1
single-machine, total weighted tardiness
Upper bound: ATC rule (apparent tardiness cost):
schedule 1 job at a time
every time a machine comes available, determine
ranking of jobs:

=
p K
) 0 , t p d max(
j
j
j
j j
e
p
w
) t ( I
MS rule
WSPT
rule
look-ahead parameter:
K = 4.5 + R (R 0.5)
K = 6 - 2R (R > 0.5)
= due date range factor
)
max min max
C / d d R =
32
Beam search example 1 (cont.)
single-machine, total weighted tardiness
(?,?,?,?)
(1,?,?,?) (4,?,?,?) (2,?,?,?) (3,?,?,?)
1,2,3) (j
p
w
e
p
w
) t ( I
j
j p K
) 0 , t p d max(
j
j
j
j j
= = =

Upper bound by ATC rule: ) 3 , 2 , 1 j ( 0 ) 0 , t p d max(


j j
= =
Jobs 1 2 3 4
p(j) 10 10 13 4
d(j) 4 2 1 12
w(j) 14 12 1 12
w(j)/p(j) 1.4 1.2 0.1 3
33
Beam search example 1 (cont.)
single-machine, total weighted tardiness
(?,?,?,?)
(1,?,?,?) (4,?,?,?) (2,?,?,?) (3,?,?,?)
Jobs 1 2 3 4
p(j) 10 10 13 4
d(j) 4 2 1 12
w(j) 14 12 1 12
w(j)/p(j) 1.4 1.2 0.1 3
Jobs C(j) d(j) T(j) w(j)*T(j)
1 10 4 6 84
2 24 2 22 264
3 37 1 36 36
4 14 12 2 24
Upper bound
by ATC rule:
Total = 408
34
Beam search example 1 (cont.)
single-machine, total weighted tardiness
(?,?,?,?)
(1,?,?,?) (4,?,?,?) (2,?,?,?) (3,?,?,?)
UB=408 UB=436 UB=814 UB=440
discarded explored
further
(beam width = 2)
4 nodes
analyzed
(filter width=4)
35
Beam search example 1 (cont.)
(?,?,?,?)
(1,?,?,?) (4,?,?,?) (2,?,?,?) (3,?,?,?)
UB=408
436
814
440
(1,2,?,?) (1,3,?,?) (1,4,?,?)
UB=480
706 408
(1,4,2,3) (1,4,3,2)
UB=408 554
best solution
(2,1,?,?) (2,3,?,?) (2,4,?,?)
436
(2,4,1,3) (2,4,3,1)
436 608

Potrebbero piacerti anche