20 ArgumentNullException.ThrowIfNull(model);
21 ArgumentNullException.ThrowIfNull(problem);
22 ArgumentNullException.ThrowIfNull(externalResult);
26 throw new InvalidOperationException(
27 "External exact result horizon does not match the extracted ULS problem.");
34 runName ??
string.Empty,
37 "ulsalgorithms-exact",
43 $
"ULSAlgorithms/{externalResult.SolverId}",
70 externalResult.SolveDuration
88 period > problem.Horizon)
90 throw new InvalidOperationException(
91 $
"Variable '{variable.Name}' has period {period}, outside the exact ULS horizon.");
101 externalResult.ProductionQuantities[index],
104 externalResult.SetupDecisions[index]
109 externalResult.EndingInventories[index],
112 problem.Demands[index],
115 throw new NotSupportedException(
116 $
"Cannot project external ULS result onto category '{key.Category}'.")
119 result.AddVariableValue(
129 if (projectedCount !=
132 throw new InvalidOperationException(
133 "External exact projection is incomplete.");
137 $
"Exact external method={externalResult.SolverId}; ULSAlgorithms={externalResult.SolverVersion}; sourceCommit={UlsAlgorithmsExactMethodCatalog.SourceCommit}.");
139 result.EnsureValid();
Immutable external exact-solve evidence retained before projection back into LotSizingDataModel.
Projects a validated ULSAlgorithms exact result onto the already-built canonical LotSizingDataModel m...
MathematicalModelSolveResult Project(MathematicalModel model, UlsAlgorithmsExactProblemData problem, UlsAlgorithmsExactBridgeResult externalResult, string runName="")
Normalized deterministic uncapacitated single-item problem passed to ULSAlgorithms.
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.