20 ArgumentNullException.ThrowIfNull(
23 ArgumentNullException.ThrowIfNull(
26 ArgumentNullException.ThrowIfNull(
32 throw new InvalidOperationException(
33 "Heuristic result horizon does not match the canonical ULS problem.");
40 runName ??
string.Empty,
43 "ulsalgorithms-heuristic",
49 $
"ULSAlgorithms/{heuristicResult.SolverId}",
76 heuristicResult.SolveDuration
94 period > problem.Horizon)
96 throw new InvalidOperationException(
97 $
"Variable '{variable.Name}' has period {period}, outside the heuristic ULS horizon.");
107 heuristicResult.ProductionQuantities[index],
110 heuristicResult.SetupDecisions[index]
115 heuristicResult.EndingInventories[index],
118 problem.Demands[index],
121 throw new NotSupportedException(
122 $
"Cannot project a heuristic ULS result onto category '{key.Category}'.")
125 result.AddVariableValue(
135 if (projectedCount !=
138 throw new InvalidOperationException(
139 "Heuristic projection is incomplete.");
143 $
"Heuristic method={heuristicResult.SolverId}; status=Feasible; optimalityClaim=false; ULSAlgorithms={heuristicResult.SolverVersion}.");
145 result.EnsureValid();
Normalized deterministic uncapacitated single-item problem passed to ULSAlgorithms.
Validated feasible result returned by one pinned ULSAlgorithms heuristic.
Projects a validated feasible ULSAlgorithms heuristic result onto a canonical LotSizingDataModel math...
MathematicalModelSolveResult Project(MathematicalModel model, UlsAlgorithmsExactProblemData problem, UlsAlgorithmsHeuristicBridgeResult heuristicResult, string runName="")
Stores the solver result for a solver-independent mathematical model.
void AddDiagnostic(string diagnostic)
Adds a non-empty diagnostic message.
Stores the value returned by a solver for one mathematical decision variable.
const string Production
Identifies production-quantity decision variables.
const string Inventory
Identifies inventory-level decision variables.
const string Delivery
Identifies delivered-quantity decision variables.
const string Setup
Identifies production setup decision variables.
Represents a parsed mathematical-model business-domain key.
int GetRequiredInt32(string name)
Gets a required integer segment.
static MathematicalDomainKey Parse(string domainKey)
Parses a canonical mathematical domain key.
Represents a solver-independent mathematical optimization model.
Represents one decision variable in a mathematical optimization model.
string DomainKey
Gets or sets an optional domain key used to map the mathematical variable back to a lot-sizing decisi...
int Id
Gets or sets the unique variable identifier within the mathematical model.
string Name
Gets or sets the variable name.
SolverTerminationReason
Describes why a solver execution terminated.
SolverKind
Identifies a supported mathematical optimization solver.