20 public string Name =>
"Lot-for-Lot";
26 CancellationToken cancellationToken =
default)
28 ArgumentNullException.ThrowIfNull(problem);
29 cancellationToken.ThrowIfCancellationRequested();
32 var buffer = ArrayPool<int>.Shared.Rent(horizon);
36 var cycleEnds = buffer.AsSpan(0, horizon);
41 for (var period = 0; period < horizon; period++)
43 if (demands[period] > 0.0)
45 cycleEnds[period] = period;
57 ArrayPool<int>.Shared.Return(buffer, clearArray:
false);
Builds and validates a zero-backlogging heuristic solution from a set of replenishment cycles.
static UlsSolveResult Build(UlsProblem problem, ReadOnlySpan< int > cycleEnds, string solverName, CancellationToken cancellationToken)
Implements the classical Lot-for-Lot (L4L/LFL) policy.
string Name
Gets the stable human-readable name of the solver.
UlsSolveResult Solve(UlsProblem problem, CancellationToken cancellationToken=default)
Solves an uncapacitated lot-sizing problem.
UlsSolverKind Kind
Gets the broad family of the solver.
Represents a validated classical uncapacitated lot-sizing problem.
int Horizon
Gets the number of planning periods.
ReadOnlySpan< double > Demands
Gets demand by period.
Represents the outcome returned by a ULS solution strategy.
Defines the common strategy contract implemented by every ULS solver.
UlsSolverKind
Identifies the broad family of a ULS solution strategy.