3using LotSizingDataModel.Core.PhysicalModel;
4using LotSizingDataModel.Solution;
5using LotSizingDataModel.Solution.Decisions;
49 LotSizingSolution solution,
53 ArgumentNullException.ThrowIfNull(
56 ArgumentNullException.ThrowIfNull(
59 ArgumentNullException.ThrowIfNull(
62 ArgumentNullException.ThrowIfNull(
65 int distributionCenterId =
77 WarehouseReference warehouse =
81 DistributionDecision? decision =
82 solution.DistributionDecisions
93 new DistributionDecision(
97 solution.PlanningHorizon);
99 solution.AddDistributionDecision(
103 decision.SetBacklogLevel(
105 variableValue.
Value);
108 private static WarehouseReference ResolveWarehouse(
111 bool hasStandaloneWarehouse =
114 out
int warehouseId);
116 bool hasPlantWarehouse =
121 if (hasStandaloneWarehouse ==
124 throw new InvalidOperationException(
125 "A backlog domain key must identify exactly one " +
126 "warehouse using either 'warehouse' or 'plant'.");
129 if (hasStandaloneWarehouse)
131 return WarehouseReference
132 .ForStandaloneWarehouse(
136 return WarehouseReference
Stores the value returned by a solver for one mathematical decision variable.
double Value
Gets or sets the value returned by the solver.
Maps mathematical backlog-variable values to distribution decisions in a lot-sizing solution.
override void MapValue(MathematicalSolutionMappingContext context, LotSizingSolution solution, MathematicalDomainKey domainKey, MathematicalVariableValue variableValue)
Maps one non-zero backlog level.
override string Category
Gets the mathematical domain-key category handled by this mapper.
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
const string Backlog
Identifies backlog-level decision variables.
Provides a reusable base implementation for mathematical decision mappers handling one domain-key cat...
Represents a parsed mathematical-model business-domain key.
int GetRequiredInt32(string name)
Gets a required integer segment.
bool TryGetInt32(string name, out int value)
Attempts to get an integer segment.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string Plant
Plant identifier segment.
const string DistributionCenter
Distribution-center identifier segment.
const string Item
Item or product identifier segment.
const string Period
Period index segment.
const string Warehouse
Warehouse identifier segment.
Provides the shared state and lookup services required while mapping a mathematical solver result bac...