What this method is
Shortest-path formulation is an exact solver-backed ULS strategy. It builds a mathematical formulation and delegates the optimization step to the selected external engine while keeping the common IUlsSolver result contract.
Core idea
The method builds its portable linear or mixed-integer formulation, automatically selects an available engine in the CPLEX -> Gurobi -> Xpress -> CBC priority order, solves the model, normalizes numerical values and reconstructs a UlsSolution that is checked independently.
Regeneration shortest-path model
A replenishment arc from t to j+1 represents one setup in period t serving all demand from t through j.
z_{t,j+1} arc-flow variablec_{tj} regeneration-arc costsubject to node-flow conservation
Applicability condition
The network matrix is integral; zero-demand periods may be crossed by explicit zero-cost skip arcs.
Minimal C# example
using ULSAlgorithms.Abstractions;
using ULSAlgorithms.Models;
using ULSAlgorithms.Exact.Formulations;
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 ShortestPathFormulationSolver();
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.