Sie sind auf Seite 1von 3

1. Theorem 5.

2 gives (1+cδ) approximation, but the paper does not define any
value for the c. It just says the approximation-error is linear in δ*L. To obtain
the value of c, I perform monte-carlo style estimation. We know that δ is a
positive real. Also, Xs is the set of jobs with height less than δ 7 L. So δ must
be less than 1. Now, we iterate over δ ranging from 0.1 to 1 and we pick the
highest c returned by 5.2 in any iteration.
c=max({makespan-L)/(L*δ)} ∀ δ)
Then I pick the corresponding δ by:
δ=/(c’+1)
This value of δ will be used throughout this program.
2. I have defined helper functions inside the caller function to improve readabil-
ity.

5.5
Set L equal to load, by making one pass through jobs.
XS = { xi | xi ∈ X, height(xi ) < δ 7 L}
XL = X\XS
5.2 (δ,XS )

5.2
(δ, X=XS ):
while True:
r=hmax/hmin
u=/lg 2 r
H=du5 hmax/lg 2 re
Xs = set of jobs with height atmost uH
Xl = X\Xs
Bs = 5.1(H, u, Xs ):

5.1
(H, u, Xs ):
for each job:
find i such that (1 + u)i−1 < h ≤ (1 + u)i
set this job’s height as b(1 + u)i c

for each rounded height h:


let Yh be the set of jobs of height h
set height of all jobs in Yh as 1

1
2.2(bH/hc, Yh )

2.2
(bH/hc, Yh ):
Initially, X=Yh
Critical Times, T = min start time, t , max end time
where t = arbitrary time at which some job is live
Free space F = Φ
\\Ri contains jobs live at ti
\\Xi contains jobs with life between ti to ti+1
X = (R1 ∪...∪ Rq ) ∪ ( X0 ∪...∪ Xq )
\\Ri contains jobs live at ti
for i in range(1,lg q):
j=q/2i
while j ≤ q:
build Rj
j+=q/2i
for each Ri :
2.1(Ri ,H) \\it builds set of boxes B and unresolved jobs U

2.1
(Y,H):

Set V1 as earliest starting Hd1/2 e jobs


Set H1 as latest ending Hd1/2 e jobs
Y 0 = {Y\V1 }\H1
while there are unboxed jobs:
create a new verctical strip of Hd1/e earliest starting jobs,
box these jobs in set of H jobs - in descending order of ending time of jobs
create a new horizontal strip B of Hd1/e latest ending jobs,
box these jobs in set of H jobs - in ascending order of starting time of jobs
These boxed jobs are sent to global set B
The 2Hd1/2 e jobs in H1 and V1 are unresolved jobs, these jobs are added in global set U.
return

2.2 continued
The jobs in U are packed according to interval coloring algorithm,
after adding as much space as needed to the set F.
for all Xi :

2
Run 2.2(bH/hc,Xi ) with Fi including gaps from packing of U,
T includes {ti ,ti+1 } ∪ staring and ending times of the gaps included in Fi

5.1 continued
multiply all box height by h
Now set B has boxes of height atmost H
return B

5.2 continued
X = Bs ∪ Xl
if lg 2 r < 1/ : break
Xf = 5.1(H=hm ax/, , X)
\\Xf has makespan (1+c0 δ)L when input jobs had height less than δ 7 L
return

5.5 continued:
3.3(δ, Xl )

3.3(δ, Xl )
Choose α ≥ lg lg n * δ 7 / lg n
replace all heights by dh/(αL)e
3.1()

3.1
feasible[|X|][ 3L

L ]
solution[|X|][ 3L L ]
for all candidate makespans M (1 to 3L):
for all jobs x:
for all possible placement C of L load in M space:
if C is compatible with any possible placement D of previous jobs,
and has makespan under M:
table[x][C]=1
solution[x][C]=D
if x is last job:
break
traceback from last row of solution to get feasible placement

Das könnte Ihnen auch gefallen