3using System.Threading.Tasks;
4using LotSizingDataModel.Core.Relationships;
5using LotSizingDataModel.Instance;
28 LotSizingInstance instance,
31 ArgumentNullException.ThrowIfNull(
34 ArgumentNullException.ThrowIfNull(
39 .DistributionCenterSourcings.Count > 0;
46 LotSizingInstance instance,
49 CancellationToken cancellationToken)
52 instance.PlanningHorizon;
55 DistributionCenterSourcing sourcing
56 in instance.SupplyChain.DistributionCenterSourcings)
58 cancellationToken.ThrowIfCancellationRequested();
62 period <= planningHorizon;
70 sourcing.DistributionCenterId)
88 $
"D_c{sourcing.DistributionCenterId}" +
89 $
"_i{sourcing.ItemId}_w" +
90 $
"{sourcing.Warehouse.ReferenceId}_t{period}",
92 double.PositiveInfinity,
93 $
"Delivered quantity to distribution center " +
94 $
"{sourcing.DistributionCenterId} for item " +
95 $
"{sourcing.ItemId} in period {period}.");
99 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 Delivery
Identifies delivered-quantity 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.