Federgruen and Tzur (1991) derive two distinct O(n) versions of their general forward O(n log n) algorithm. ULSAlgorithms exposes both as separate public strategies instead of hiding them behind the general solver.
Public class:
FedergruenTzurNoSpeculativeMotiveSolver
The transformed variable costs are
\[C_t = p_t - H_{t-1}, \]
where H is cumulative holding cost before period t.
No speculative motive is equivalent to
\[C_0 \ge C_1 \ge \cdots \ge C_{T-1}, \]
or, in adjacent original-cost form,
\[p_t + h_t \ge p_{t+1}. \]
Federgruen and Tzur's Corollary 4 shows that every new candidate is inserted at the end of the Minimal Optimal Predecessor list. Their simplified Step 1 therefore performs only:
The resulting algorithm is O(n) time and O(n) space.
This condition is the same economic condition required by the linear-time Wagelmans Wagner-Whitin specialization, but the implementation is a distinct forward Federgruen-Tzur algorithm and is benchmarked separately.
Public class:
FedergruenTzurNondecreasingSetupSolver
Applicability:
\[f_0 \le f_1 \le \cdots \le f_{T-1}. \]
Variable production and holding costs may otherwise be general within the non-negative UlsProblem contract, including speculative inventory motives.
Federgruen and Tzur's Corollary 2 shows that a new period either:
Therefore no binary-tree search is required. Deletions occur only at the two ends of the list, giving O(n) total time.
The 1991 paper specifically notes that this is an important special case and that, at the time, no alternative linear-time method appeared to exist for the prevalent nondecreasing-setup-cost setting.
Both implementations use FedergruenTzurLinearCandidateDeque.
It is an array-backed monotone lower-envelope deque with:
Every candidate can enter and leave the deque at most once.
| Solver | Condition | Time | Core structure |
|---|---|---|---|
| FedergruenTzurSolver | general | O(n log n) | array-backed AVL tree |
| FedergruenTzurNoSpeculativeMotiveSolver | no speculation | O(n) | monotone deque |
| FedergruenTzurNondecreasingSetupSolver | setup costs nondecreasing | O(n) | monotone deque |
These are retained as three separate public algorithms for scientific traceability and benchmarking.
The test suite adds:
A. Federgruen and M. Tzur (1991).
A Simple Forward Algorithm to Solve General Dynamic Lot Sizing Models with n Periods in O(n log n) or O(n) Time.
Management Science, 37(8), 909-925.
DOI: https://doi.org/10.1287/mnsc.37.8.909
The nondecreasing-setup-cost algorithm is developed in Section 3 and the no-speculative-motive algorithm in Section 4.