3using System.Threading.Tasks;
4using LotSizingDataModel.Core.Relationships;
5using LotSizingDataModel.Instance;
28 LotSizingInstance instance,
31 ArgumentNullException.ThrowIfNull(
34 ArgumentNullException.ThrowIfNull(
43 DistributionCenterSourcing sourcing
44 in instance.SupplyChain.DistributionCenterSourcings)
46 if (sourcing.BacklogConstraint is not
null)
59 LotSizingInstance instance,
62 CancellationToken cancellationToken)
65 instance.PlanningHorizon;
68 DistributionCenterSourcing sourcing
69 in instance.SupplyChain.DistributionCenterSourcings)
71 cancellationToken.ThrowIfCancellationRequested();
73 if (sourcing.BacklogConstraint is
null)
80 period <= planningHorizon;
84 sourcing.BacklogConstraint[period];
98 sourcing.DistributionCenterId)
116 $
"B_c{sourcing.DistributionCenterId}" +
117 $
"_i{sourcing.ItemId}_w" +
118 $
"{sourcing.Warehouse.ReferenceId}_t{period}",
121 $
"Backlog level for distribution center " +
122 $
"{sourcing.DistributionCenterId}, item " +
123 $
"{sourcing.ItemId}, period {period}.");
127 return ValueTask.CompletedTask;
Builds stable business-domain keys for mathematical variables and constraints.
string Build()
Builds the immutable domain-key text.
MathematicalDomainKeyBuilder Add(string name, string value)
Adds a text segment.
Provides the shared state required while constructing a solver-independent mathematical model.
Creates canonical domain-key fragments shared by standard formulation builders and provides warehouse...
static MathematicalDomainKeyBuilder AddWarehouse(MathematicalDomainKeyBuilder builder, WarehouseReference warehouse)
Adds a warehouse reference using the generic warehouse or plant segment.
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
const string Backlog
Identifies backlog-level decision variables.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string DistributionCenter
Distribution-center identifier segment.
const string Item
Item or product identifier segment.
const string Period
Period index segment.