faster primal-dual algorithms for the economic lot-sizing problem
DESCRIPTION
Acknowledgment: Thomas Magnanti, Retsef Levi. Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem. Mihai Pătraşcu AT&T Research. Dan Stratila RUTCOR and Rutgers Business School Rutgers University. ISMP XX 25 August 2009. TexPoint fonts used in EMF. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/1.jpg)
Faster Primal-Dual Algorithms for theEconomic Lot-Sizing Problem
Dan StratilaRUTCOR and Rutgers Business
SchoolRutgers University
Mihai PătraşcuAT&T Research
ISMP XX25 August 2009
Acknowledgment: Thomas Magnanti, Retsef Levi
![Page 2: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/2.jpg)
ISMP XX 225 August 2009
Outline
1. Models:a. The economic lot-sizing problem.b. An important special case: the non-speculative condition.
2. Overview of previous results.
3. Review of “wave” primal-dual algorithm of Levi et al (2006).
4. Main result: a faster algorithm for the lot-sizing problem.
5. Conclusions:a. Connection with basic algorithms problems. O(n)?b. Wave primal-dual applicable to other inventory problems.
![Page 3: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/3.jpg)
ISMP XX 325 August 2009
The Economic Lot-Sizing Problem
K 1 K 2
K 3K 4
c1 c2
c3c4
d1 d2 d3 d4h1 h2 h3
![Page 4: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/4.jpg)
ISMP XX 425 August 2009
An Important Special Case
c2
c3
d3h2
![Page 5: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/5.jpg)
ISMP XX 525 August 2009
An Important Special Case
c2
c3
d3h2
![Page 6: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/6.jpg)
ISMP XX 625 August 2009
Lot-Sizing Problem with Non-Speculative Condition
K 1 K 2
K 3K 4
c1 c2
c3c4
d1 d2 d3 d4h1 h2 h3
![Page 7: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/7.jpg)
ISMP XX 725 August 2009
Outline
1. Models:a. The economic lot-sizing problem.b. An important special case: the non-speculative condition.
2. Overview of previous results.
3. Review of “wave” primal-dual algorithm of Levi et al (2006).
4. Main result: a faster algorithm for the lot-sizing problem.
5. Conclusions:a. Connection with basic algorithms problems. O(n)?b. Wave primal-dual applicable to other inventory problems.
![Page 8: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/8.jpg)
ISMP XX 825 August 2009
Previous Results on Lot-Sizing
Early research:• Introduced by Manne (’58), Wagner and Whitin (’58).• Wagner and Whitin (’58) provide O(n2) for non-speculative case.• Zabel (’64), Eppen et al (’69) obtain O(n2) for general case.• Results on heuristics, to be more efficient than O(n2) in ’70s-’80s.
The O(n logn) algorithms:• Federgruen and Tzur (’91), forward algorithm.• Wagelmans et al (’92), backward algorithm, also relate to dual.• Aggarwal and Park (’93), using Monge arrays, generalizations.• These 3 algorithms run in O(n) for non-speculative case.
Non-algorithmic results:• Krarup and Bilde (’77) show that above formulation is integral.• Polyhedral results for harder versions, e.g. multi-item lot-sizing: Production
Planning by Mixed Integer Programming, Pochet and Wolsey (’06).
![Page 9: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/9.jpg)
ISMP XX 925 August 2009
Primal-Dual Algorithms for Lot-Sizing
Levi et al (’06) :• Obtain primal-dual algorithm for lot-sizing problem.• Proves above formulation is integral as a consequence.• Primal-dual 2-approxim. algorithms for joint replenishment problem (JRP),
and for multistage assembly problem.• Algorithms clearly polynomial, authors do not estimate running times.
Related primal-dual algorithms for facility location:• Primal-dual algorithms of Levi et al for inventory is rooted in primal-dual
approximation algorithm for facility location of Jain and Vazirani (’01).• Thorup (’03) obtains 1.62 algorithm approximation algorithm for facility
location with running time Õ(m+n) based on Jain and Vazirani (’01) and Jain et al (’03).
Differences:• Algorithms for facility location and lot-sizing are different.• Input size is different: lot-sizing represented as facility would have O(n2)
edges.
![Page 10: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/10.jpg)
ISMP XX 1025 August 2009
Outline
1. Models:a. The economic lot-sizing problem.b. An important special case: the non-speculative condition.
2. Overview of previous results.
3. Review of “wave” primal-dual algorithm of Levi et al (2006).
4. Main result: a faster algorithm for the lot-sizing problem.
5. Conclusions:a. Connection with basic algorithms problems. O(n)?b. Wave primal-dual applicable to other inventory problems.
![Page 11: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/11.jpg)
ISMP XX 1125 August 2009
Wave Primal-Dual Algorithm for Lot-Sizing(Modified, Levi et al ’06)
K 1 K 2
K 3K 4
c1 c2
c3c4
d1 d2 d3 d4h1 h2 h3
![Page 12: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/12.jpg)
ISMP XX 1225 August 2009
Wave Primal-Dual Algorithm for Lot-Sizing
K 1 K 2
K 3K 4
c1 c2
c3c4
v1 v2 v3 v4h1 h2 h3
![Page 13: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/13.jpg)
ISMP XX 1325 August 2009
K 1 K 2
K 3K 4
c1 c2
c3c4
v1 v2 v3 v4h1 h2 h3
General• Start with (v,w)=0 and (x,y)=0• Iteratively increase dual solution,
increasing dual objective• At the same time, construct primal
solution• When dual objective cannot be
increased, primal is feasible• Post-processing step, O(n)
More details• To increase dual objective, we
increase budgets vt
• At some point, some of the constraints become tight
• To keep increasing vt we begin increasing wst for those constraints
• At some point some of the constraints become tight• Open s in the primal• Freeze all corresponding vt
• Demands t with wst>0 assigned to order s
Remaining free choice—order in which vt are increased
![Page 14: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/14.jpg)
ISMP XX 1425 August 2009
The Wave
• start increasing v4
• start increasing w44
• start increasing v3
• order 4 opens, budget 4 freezes demand 4 assigned to order 4
• start increasing w33
• start increasing v2
• start increasing w22 and w32
• order 2 opens, budgets 2 & 3 freeze demands 2 & 3 assigned to order 2
• start increasing v1
• start increasing w11
• order 1 opens, budgets 1 freezes, demand 1 assigned to order 1
Types of events:• Demand point becomes active• Budget begins contributing to Kt
• Order point becomes tight & assoc.
![Page 15: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/15.jpg)
ISMP XX 1525 August 2009
Wave Time and Position
Wave time ¿Wave position W
![Page 16: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/16.jpg)
ISMP XX 1625 August 2009
Events:• Demand point becomes active• Budget begins contributing to Kt
• Order point becomes tight & assoc.
Algorithms for digital computers:• Goal at end of execution to obtain primal y and dual v.• Execute (3) from event to event, instead of continuously
Step (3):• Compute wave position W* when next order point becomes tight.• Update W:=W*, then update v and w.
![Page 17: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/17.jpg)
ISMP XX 1725 August 2009
One iteration of (3):• For each unfrozen order point t, compute position Wt when it becomes tight, assuming no other unfrozen order points become tight in the meantime.
![Page 18: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/18.jpg)
ISMP XX 1825 August 2009
One iteration of (3):• For each unfrozen order point t, compute position Wt when it becomes tight, assuming no other unfrozen order points become tight in the meantime.• Compute W3
+1+1
![Page 19: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/19.jpg)
ISMP XX 1925 August 2009
One iteration of (3):• For each unfrozen order point t, compute position Wt when it becomes tight, assuming no other unfrozen order points become tight in the meantime.• Compute W3
• Compute W2
+1+1
![Page 20: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/20.jpg)
ISMP XX 2025 August 2009
One iteration of (3):• For each unfrozen order point t, compute position Wt when it becomes tight, assuming no other unfrozen order points become tight in the meantime.• Compute W3
• Compute W2
• Compute W1
+1+1
![Page 21: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/21.jpg)
ISMP XX 2125 August 2009
One iteration of (3):• For each unfrozen order point t, compute position Wt when it becomes tight, assuming no other unfrozen order points become tight in the meantime.• Set W' = min{ Wt : t is unfrozen }
Lemma: W' = W*, the position when thenext order point becomes tight. Wt that yields the minimum corresponds to thenext order point that becomes tight.
Running time O(n3):• One computation of Wt takes O(n).• O(n) computations before an order point becomes tight.• At most O(n) order points become tight.
![Page 22: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/22.jpg)
ISMP XX 2225 August 2009
One iteration of (3):• For each unfrozen order point t, compute position Wt when it becomes tight, assuming no other unfrozen order points become tight in the meantime.• Set W' = min{ Wt : t is unfrozen }
Lemma: W' = W*, the position when thenext order point becomes tight. Wt that yields the minimum corresponds to thenext order point that becomes tight.
Running time O(n2):• With preprocessing Wt takes O(1) amortized.• O(n) computations before an order point becomes tight.• At most O(n) order points become tight.
![Page 23: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/23.jpg)
ISMP XX 2325 August 2009
Outline
1. Models:a. The economic lot-sizing problem.b. An important special case: the non-speculative condition.
2. Overview of previous results.
3. Review of “wave” primal-dual algorithm of Levi et al (2006).
4. Main result: a faster algorithm for the lot-sizing problem.
5. Conclusions:a. Connection with basic algorithms problems. O(n)?b. Wave primal-dual applicable to other inventory problems.
![Page 24: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/24.jpg)
ISMP XX 2425 August 2009
Events:• Demand point becomes active• Budget begins contributing to Kt
• Order point becomes tight & assoc
Algorithms for digital computers:• Goal at end of execution to obtain primal y and dual v.• We will have “tentative” executions of (3), which may be incorrect.• When we realize an execution is incorrect, we go back and delete it.• Algorithm terminates => remaining executions guaranteed correct.
![Page 25: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/25.jpg)
ISMP XX 2525 August 2009
Additional data structure:• Stack D = (ok, ok-1, …, o1) of provisionally tight order points.• Stack initially empty, at end of loop (2) will contain the correct order points.
Algorithm:1) Start with D=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack D, and go to 2.1.
2.3) Add t to stack D, set t:=t-1.
![Page 26: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/26.jpg)
ISMP XX 2625 August 2009
Additional data structure:• Stack D = (ok, ok-1, …, o1) of provisionally tight order points.• Stack initially empty, at end of loop (2) will contain the correct order points.
Algorithm:1) Start with D=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack D, and go to 2.1.
2.3) Add t to stack D, set t:=t-1.
+1+1t=3
![Page 27: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/27.jpg)
ISMP XX 2725 August 2009
Stack data structure:• Stack D = (ok, ok-1, …, o1) of provisionally tight order points.• Stack initially empty, at end of loop (2) will contain the correct order points.
Algorithm:1) Start with D=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack D, and go to 2.1.
2.3) Add t to stack D, set t:=t-1.
Add information to stack:• E = ((ok, sk, ek), (ok-1, sk-1, ek-1), (o1,s1,e1) of provisionally tight order points.• sk, …, ek are the demand points that were
frozen when ok become tight.
s2 e2 s3=e3
![Page 28: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/28.jpg)
ISMP XX 2825 August 2009
Stack data structure:• Stack D = (ok, ok-1, …, o1) of provisionally tight order points.• Stack initially empty, at end of loop (2) will contain the correct order points.
Algorithm:1) Start with D=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack D, and go to 2.1.
2.3) Add t to stack D, set t:=t-1.
Add information to stack:• E = ((ok, sk, ek), (ok-1, sk-1, ek-1), …, (o1, s1, e1))
of provisionally tight order points.• sk, …, ek are the demand points that were
frozen when ok became tight.
s2 e2 s3=e3
Add further information to stack:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.• wk is the wave position when ok became tight.
![Page 29: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/29.jpg)
ISMP XX 2925 August 2009
Stack data structure:• Stack D = (ok, ok-1, …, o1) of provisionally tight order points.• Stack initially empty, at end of loop (2) will contain the correct order points.
Algorithm:1) Start with D=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack D, and go to 2.1.
2.3) Add t to stack D, set t:=t-1.
Add information to stack:• E = ((ok, sk, ek), (ok-1, sk-1, ek-1), …, (o1, s1, e1))
of provisionally tight order points.• sk, …, ek are the demand points that were
frozen when ok became tight.
Add further information to stack:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.• wk is the wave position when ok became tight.
w4
![Page 30: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/30.jpg)
ISMP XX 3025 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
Algorithm details:• Once the wave position when t becomes tight
is computed, inserting the record into the stack takes O(1).
• Deleting a record from the stack also takes O(1).• Every record is deleted at most once, and we
make at most n insertions => at most O(n) deletions / computations / insertions.
Remains to do computation, in O(?)
![Page 31: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/31.jpg)
ISMP XX 3125 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
Computation:• Define new set of numbers a1, …, an with
at = ct + htn.• Only frozen demand points in segments sj,…,ej
with at ≤ h1n - wj contribute to make order point t tight.
• All unfrozen demand points in t, …, ok contribute.
![Page 32: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/32.jpg)
ISMP XX 3225 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
w4
Computation:• Define new set of numbers a1, …, an with
at = ct + htn.• Only frozen demand points in segments sj,…,ej
with at ≤ h1n - wj contribute to make order point t tight.
• All unfrozen demand points in t, …, ok contribute.
![Page 33: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/33.jpg)
ISMP XX 3325 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
w4
Computation:• Define new set of numbers a1, …, an with
at = ct + htn.• Only frozen demand points in segments sj,…,ej
with at ≤ h1n - wj contribute to make order point t tight.
• All unfrozen demand points in t, …, ok contribute.
Key Lemma. Given min{ j : at ≤ h1n – wj }, we candetermine in O(1) if order point t becomes tight before ok. If t becomes tight after ok, we can compute in O(1) the wave position when t becomes tight.
![Page 34: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/34.jpg)
ISMP XX 3425 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute time when order point t becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
w4
Key Lemma. Given j* = min{ j : at ≤ h1n – wj }, weCan determine in O(1) if order point t becomes tight before ok. If t becomes tight after ok, we can compute in O(1) the wave position when t becomes tight.
Proof Idea. Can determine and perform the computation by inspecting each demand point int, …, ok, and each record in k, …, j*.
This would take O(n).
Can perform in O(1), by computing the running sums d1, d1+d2, …, d1+d2+…+dn at start of algorithm, as well as certain running sums in the stack.
Stack becomes E = ((ok, sk, ek, wk, Rk), (ok-1, sk-1, ek-1, wk, Rk-1), …, (o1,s1,e1,w1,R1)).
![Page 35: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/35.jpg)
ISMP XX 3525 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute j* = min{ j : at ≤ h1n – wj }.2.2) Compute time when order point t
becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
Key Lemma. Given j* = min{ j : at ≤ h1n – wj }, weCan determine in O(1) if order point t becomes tight before ok. If t becomes tight after ok, we can compute in O(1) the wave position when t becomes tight.
Running time. O(n) iterations. Find j* using binary search in O(log(n)) Do the remaining computations in O(1)Total: O(n log n)
Running time when non-speculative. O(n) iterations. Find j* in O(1), since a1, …, an are monotonic. Do the remaining computations in O(1)Total: O(n)
Time for Data Structures
Matches best times so far
![Page 36: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/36.jpg)
ISMP XX 3625 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute j* = min{ j : at ≤ h1n – wj }.2.2) Compute time when order point t
becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
Key Lemma. Given j* = min{ j : at ≤ h1n – wj }, weCan determine in O(1) if order point t becomes tight before ok. If t becomes tight after ok, we can compute in O(1) the wave position when t becomes tight.
Time for Data Structures
Improved running time. Machine: Word RAM
1) Sort a1, …, an in O(n log log n) before the start of the algorithm.2) Create additional stack E’ that contains only n/log(n) entries out of the stack E. It divides E into buckets of size log(n).3) Whenever a record is inserted into E’, look up the position of wk in a1, …, ak and place it in the record. E’ = ((ok, sk, ek, wk, pk)).4) When we have to find out j*, first look up in E’ using predecessor search, then look up in bucket in E using binary search.
![Page 37: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/37.jpg)
ISMP XX 3725 August 2009
Algorithm:1) Start with E=(), t=n.2) While t≥1:
2.1) Compute j* = min{ j : at ≤ h1n – wj }.2.2) Compute time when order point t
becomes tight, taking into accountperiods t, …, n but ignoring periods 1, …, t-1.
2.2) If t becomes tight before ok, delete ok from stack E, and go to 2.1.
2.3) Add t to stack E, set t:=t-1.
Stack data structure:• E = ((ok, sk, ek, wk), (ok-1, sk-1, ek-1, wk), …,
(o1,s1,e1,w1)) of provisionally tight order points.
• sk, …, ek are the demand points that were frozen when ok became tight.
• wk is the wave position when ok became tight.
Time for Data Structures
Improved running time. Machine: Word RAM
1) Sort a1, …, an in O(n log log n) before the start of the algorithm.2) Create additional stack E’ that contains only n/log(n) entries out of the stack E. It divides E into buckets of size log(n).3) Whenever a record is inserted into E’, look up the position of wk in a1, …, ak and place it in the record. E’ = ((ok, sk, ek, wk, pk)).4) When we have to find out j*, first look up in E’ using predecessor search, then look up in bucket in E using binary search.
Running time:1) O(n log log n).3) Each addition takes O(log(n)), there are
O(n/log(n)) additions, for a total of O(n). [*]4) Predecessor search takes O(log log n),
O(n) lookups for a total of O(n log log n).4.1) Bucket size is O(log n), lookup takes
O(log log n), total O(n log log n)Total: O(n log log n)
![Page 38: Faster Primal-Dual Algorithms for the Economic Lot-Sizing Problem](https://reader035.vdocuments.us/reader035/viewer/2022081417/5681415f550346895dad399c/html5/thumbnails/38.jpg)
ISMP XX 3825 August 2009
Conclusions
1. We obtain a O(n log log n) algorithm for lot-sizing, improving upon theO(n log n) results from 1991–1993.
2. We connect the lot-sizing problem to basic computing primitives—sorting and predecessor search.a. Opportunity for further improvement in running time. b. Opportunity for other insights.
3. Wave primal-dual algorithms run on other inventory problems (JRP, multi-stage assembly).
4. O(n+sort(n))? O(n)?