What this method is
Adaptive exact selection is the recommended orchestration strategy when client code needs an exact ULS solution without hard-coding a particular exact algorithm. It inspects the no-speculative-motive cost condition and dispatches to the fastest supported specialized or general exact strategy.
Core idea
The selector checks p[t] + h[t] >= p[t+1] over adjacent periods. If the condition holds, it executes the linear-time Wagner-Whitin specialization. Otherwise it executes the configured general O(T log T) solver, Wagelmans by default or Federgruen-Tzur when explicitly requested. Selection does not change the common IUlsSolver contract.
Minimal C# example
using ULSAlgorithms.Abstractions;
using ULSAlgorithms.Models;
using ULSAlgorithms.Selection;
var problem = new UlsProblem(
demands: [20.0, 30.0, 25.0, 40.0],
setupCosts: [200.0, 200.0, 200.0, 200.0],
unitProductionCosts: [0.0, 0.0, 0.0, 0.0],
holdingCosts: [4.0, 4.0, 4.0, 0.0]);
IUlsSolver solver = new AdaptiveExactUlsSolver();
var result = solver.Solve(problem);
Console.WriteLine(result.Status);
Console.WriteLine(result.ObjectiveValue);
The input example intentionally uses stationary, positive-demand data so it is compatible with restricted methods too. Always check the applicability box for your own instance.