2using LotSizingDataModel.Instance;
3using LotSizingDataModel.Solution;
18 _decisionMapperRegistry;
33 ArgumentNullException.ThrowIfNull(
34 decisionMapperRegistry);
36 _decisionMapperRegistry =
37 decisionMapperRegistry;
65 public LotSizingSolution
Map(
66 LotSizingInstance instance,
105 public LotSizingSolution
Map(
106 LotSizingInstance instance,
111 ArgumentNullException.ThrowIfNull(
114 ArgumentNullException.ThrowIfNull(
117 ArgumentNullException.ThrowIfNull(
120 ArgumentNullException.ThrowIfNull(
130 throw new InvalidOperationException(
131 "A mathematical solver result without a feasible " +
132 "solution cannot be mapped to LotSizingSolution.");
135 if (instance.PlanningHorizon <= 0)
137 throw new InvalidOperationException(
138 "The source lot-sizing instance must have a " +
139 "strictly positive planning horizon.");
149 string solutionName =
150 !
string.IsNullOrWhiteSpace(
153 : !
string.IsNullOrWhiteSpace(
155 ? instance.Name.Trim() +
160 new LotSizingSolution(
163 instance.PlanningHorizon);
167 in _decisionMapperRegistry.GetAll())
Stores the solver result for a solver-independent mathematical model.
bool HasFeasibleSolution
Gets or sets a value indicating whether the solver produced at least one feasible solution.
string RunName
Gets or sets the solve-run name.
Stores and resolves mathematical decision mappers by business-domain category.
LotSizingSolution Map(LotSizingInstance instance, MathematicalModel model, MathematicalModelSolveResult solveResult)
Maps a mathematical-model solve result to a normalized lot-sizing solution.
MathematicalSolutionMapper(MathematicalDecisionMapperRegistry decisionMapperRegistry)
Initializes a mathematical-solution mapper.
LotSizingSolution Map(LotSizingInstance instance, MathematicalModel model, MathematicalModelSolveResult solveResult, MathematicalSolutionMappingOptions options)
Maps a mathematical-model solve result to a normalized lot-sizing solution using explicit mapping opt...
Provides the shared state and lookup services required while mapping a mathematical solver result bac...
Defines the options used when mapping a mathematical solver result back to a normalized lot-sizing so...
void EnsureValid()
Validates the mapping options.
MathematicalSolutionMappingOptions Clone()
Creates an independent copy of the mapping options.
Represents a solver-independent mathematical optimization model.
Defines a mapper responsible for one family of lot-sizing decisions identified by a mathematical doma...
void Map(MathematicalSolutionMappingContext context, LotSizingSolution solution)
Maps the decision values handled by this mapper into a lot-sizing solution.
Defines a component that converts a generic mathematical solver result into a normalized lot-sizing s...