0% found this document useful (0 votes)
48 views35 pages

Econ Lecture

This document provides an overview of linear programming (LP) and integer programming (IP) techniques for planning and scheduling optimization. It begins with an introduction to common optimization techniques like dispatching rules, dynamic programming, and linear programming. Linear programming models and solutions techniques like the simplex method are described. It then covers integer programming, including modeling tricks to handle integer restrictions. Finally, it provides examples of integer programming models for single machine scheduling problems and describes common solution techniques like branch and bound.

Uploaded by

icopaf24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views35 pages

Econ Lecture

This document provides an overview of linear programming (LP) and integer programming (IP) techniques for planning and scheduling optimization. It begins with an introduction to common optimization techniques like dispatching rules, dynamic programming, and linear programming. Linear programming models and solutions techniques like the simplex method are described. It then covers integer programming, including modeling tricks to handle integer restrictions. Finally, it provides examples of integer programming models for single machine scheduling problems and describes common solution techniques like branch and bound.

Uploaded by

icopaf24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

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)

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

Linear programming (LP)


model

LP:

minc1x1 c2x2 ... cnxn

objective function

subjectto :
a11x1 a12x2 ... a1nxn b1

constraints

a21x1 a22x2 ... a2nxn b2

am1x1 am2x2 ... amnxn bm


xj 0 ( j 1, , n)

Matrix form: mincT x


Ax b
x0

variable
restrictions

where:
x, c: n-vector
A:
m,n-matrix
b:
m-vector

Linear programming
example
max x1 x2
subjectto :
2x1 x2 4
3x1 4x2 12
xj 0 ( j 1,2)

or:

1 x1
max
1 x2
subjectto :
2 1 x1
4
3 4 x 12

2

x1
0

0
x2
4

Linear programming
example: graphical
solution (2D)
2x1 x2 4

x2 6

max x1 x2

3x1 4x2 12

x1 x2 6

2x1 x2 4

(objective
)

3x1 4x2 12

xj 0 ( j 1,2)

subjectto :

solution
space

6
x1

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

Integer programming (IP)


models
Integer variable restriction
IP: integer variables only
MIP: part integer, part non-integer variables
BIP: binary (0-1) variables

General

mincT x
IP-formulation: Ax b
x integer( x Z )

Complex solution space

Integer programming
example: graphical solution
(2D)
x2 6

max x1 x2
subjectto :
2x1 x2 4
3x1 4x2 12

xj Z ( j 1,2)
2 optimal solutions!

5
4

x1 x2 6

(objective
)

2
1
0

6
x1

Total unimodularity property


for integer programming
models
Suppose that all coefficients are integer in the model:
i.e.

mincT x
Ax b
x0

aij , bi , i, j

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
9

Integer programming
tricks
PROBLEM: x = 0 or x k
0 , for x 0
use binary indicator variable y=
1 , for x k

restrictions:
x M y (M is an upperbound
on x)
x ky
y 0,1
10

Integer programming tricks


(2)
PROBLEM: fixed costs: if xi>0 then costs C(xi)

minimizeC( x) where:
Ax b
x0

C( xi )

for xi 0,

ki cixi for xi 0.

0 , for xi 0
use indicator variable yi=

1 , for xi 0

xi M yi

restrictions
:
(i) C( xi ) ki yi ci xi

yi 0,1

11

(Integer) programming tricks


(3)
Hard vs. soft restrictions
hard restriction: must hold, otherwise
unfeasibilityx1 x2 5
for example:
soft restriction: may be violated,
with a
T
minimizec x Y 100
penalty
for example: x1 x2 5 Y

x 0, Y 0
12

(Integer) programming tricks


(4)

Absolute values:min yt

goal

a x
j

j ,t

bt yt

x j,t 0, yt free

solution:

yt yt yt

variation

yt y y

min yt yt
t

a x
j

j ,t

bt y y

x j,t 0, yt 0, yt 0 13

Integer programming tricks


(5)

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):


min w j x j
min w j x j
j

xk x j pk

xk x j pk M1 y

or
x j xk pj

x j xk pj M2 (1 y)

y {0,1}

14

IP example
nonpreemptive single machine, total
weighted completion time (App. A.3)
model definition:
xjt 1, if job j completesat timet, and0 otherwise
objective function: minimize weighted completion time:

t xjt completiontimeof job j if x jt 1

Cmax-1

t x
t 0

jt

completiontimeof job j
n Cmax-1

minimize
j 1

w
t0

t xjt (objectivefunction)
15

IP example (cont.)
Restriction: all jobs must be completed once:
Cmax-1

x
t0

jt

Restriction: only one job per time t:


if job j is in process during t, it must be
completed somewhere during [t,t+pj]

t pj

x
s t

js

1 (if job j is in processduringt)

n t pj

xjs 1 (restricti
on: exactlyone job per timet)
j 1 s t

16

IP example (cont.)
Complete IP-model:
n Cmax-1

minimize
j 1

w
t0

t xjt

subjectto :
Cmax-1

x
t0

jt

1 (for j 1, , n)

n t pj

x
j 1 s t

js

1 (for t 0, , Cmax- 1)

xjt 0,1 (for j 1, , n, t 0, , Cmax- 1)

nCmax
integer
variables
17

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):
C max1

tx

jt

t0

C max1

tx
t0

kt

completion
timeof job j
pk starttimeof job k

C max1

tx
t0

jt

C max1

tx
t0

kt

(for k SUCC(j),j 1, , n)

18

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

19

Integer programming
solution techniques (cont.)
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

20

Dynamic programming
Problem divided into stages
xt (t 0, , T)
Each stage can have various states
it
A recursive objective function is used to
iterate through all states and all stages
(forwards or backwards)

F0 (i0 ) c0 (constant)
Ft (it ) min{ct (it , xt ) Ft1(it1(it , xt ))}
xt

21

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
22

Branch and bound


Enumeration in a search tree
root node

Level 0

Level 1

child nodes

...

child nodes

...

Level 2

each node is a partial solution, i.e. a part


of the solution space
23

Branch and bound


example 1

Disjunctive programming (appendix A.4):


disjunctive set of constraints: at least one must be
satisfied

xj = completion
of job j
eitherxtime
k x j pk or x j xk pj (j, k I )
restriction:
solve LP without
disjunctive
restrictions
(= LP relaxation)
if disjunct.
restr. violated
xk x j pk
for j & k

Level 0

Level 1

x j xk pj

...

24

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
25

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
26

Branch and bound


example 2

Single machine, maximum lateness,


release and due dates
Jobs
p(j)
r(j)
d(j)

1
4
0
8

2
2
1
12

3
6
3
11

4
5
5
10
(1,?,?,?)

Level 0

(?,?,?,?)

(2,?,?,?)

(3,?,?,?)

(4,?,?,?)

Level 1

lower bound: EDD + preemption


27

Branch and bound


example 2Jobs 1 2

Lower bound for: (1,?,?,?)


r(2)

r(3)

r(4)

3
p(j) 4 2 6
r(j) 0 1 3
d(j) 8 12 11

4
5
5
10

0 1 2 3 4 5 6 7 8 9 10 1112 13 14 15 16 17

d(4)<d(3
)

d(3)<d(2
)

Lower bound: Lmax = max(0,17-12,1511,0)=5


28

Branch and bound example 2


(cont.)
(?,?,?,?)

Level 0

LB=5
LB=7
infeasibl
*
(1,?,?,?)
(2,?,?,?) (3,?,?,?) (4,?,?,?) Level 1
e:
=UB
(1,3,4,3,
2)
LB=6*
LB=5*=UB
=UB (1,2,?,?)
Jobs 1 2 3 4
(1,3,?,?)(1,3,4,2)
(1,2,4,3)
DONE
p(j) 4 2 6 5

r(j) 0 1 3 5
d(j) 8 12 11 10
(1,2,4,3)

(1,3,4,2)

29

Branch and bound


example 3

LP solution:x1 0.8,
x2 2.4

x1 0

x1 1

x1 0,

x1 1,

x2 3

x2 2

obj: 3

x2 6

obj: 3

5
4

x1 x2 6

(objective
)

2
x2 2

x2 3

x1 1,

x1 0,

x2 2

x2 3

obj: 3

obj: 3

1
0

6
x1

30

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
pj jobs:
t ,0)
max(dj of
MS rule

I j (t)

wj
pj

Kp

look-ahead parameter:
WSPT
K = 4.5 + R (R 0.5)
rule
K = 6 - 2R (R 0.5)
R dmax dmin / Cmax = due date range
31
factor

Beam search example 1


(cont.)
single-machine, total weighted tardiness
(?,?,?,?)

Jobs
p(j)
d(j)
w(j)
w(j)/p(j)

1
10
4
14
1.4

2
10
2
12
1.2

3
13
1
1
0.1

4
4
12
12
3

(1,?,?,?)

(2,?,?,?)

(3,?,?,?)

(4,?,?,?)

max(dj pj t,0) 0 ( j 1,2,3)


Upper bound by ATC rule:

I j (t)

wj
pj

max(dj pj t ,0)

Kp

wj
pj

(j 1,2,3)

32

Beam search example 1


(cont.)
single-machine, total weighted tardiness

Jobs
p(j)
d(j)
w(j)
w(j)/p(j)

1
10
4
14
1.4

2
10
2
12
1.2

3
13
1
1
0.1

4
4
12
12
3

(?,?,?,?)

(1,?,?,?)

Upper bound Jobs


1
by ATC rule:
2
3
4

C(j)
10
24
37
14

(2,?,?,?)

d(j) T(j) w(j)*T(j)


4 6
84
2 22
264
1 36
36
12 2
24
Total = 408

(3,?,?,?)

(4,?,?,?)

33

Beam search example 1


(cont.)
single-machine, total weighted tardiness
(?,?,?,?)

(1,?,?,?)

(2,?,?,?)

(3,?,?,?)

(4,?,?,?)

UB=408UB=436 UB=814UB=440
explored
further
(beam width = 2)

4 nodes
analyzed
(filter width=4)

discarded

34

Beam search example 1


(cont.)
(?,?,?,?)

UB=408

436

(1,?,?,?)

UB=480
(1,2,?,?)

(2,?,?,?)

706
(1,3,?,?)

(3,?,?,?)

408
(1,4,?,?)

UB=408
(1,4,2,3)

best

440

814

(4,?,?,?)

436
(2,1,?,?)

554
(1,4,3,2)

(2,3,?,?)

(2,4,?,?)

436
(2,4,1,3)

608
(2,4,3,1)

35

You might also like