3using System.Threading.Tasks;
4using LotSizingDataModel.Core.Relationships;
5using LotSizingDataModel.Instance;
27 LotSizingInstance instance,
30 ArgumentNullException.ThrowIfNull(instance);
31 ArgumentNullException.ThrowIfNull(options);
34 options.IncludeProcurement &&
35 instance.SupplyChain.SupplierDeliveries.Count > 0;
43 LotSizingInstance instance,
46 CancellationToken cancellationToken)
49 instance.PlanningHorizon;
52 SupplierDelivery delivery
53 in instance.SupplyChain.SupplierDeliveries)
55 cancellationToken.ThrowIfCancellationRequested();
57 if (delivery.SupplierId <= 0 ||
60 throw new InvalidOperationException(
61 "Supplier deliveries must identify strictly " +
62 "positive supplier and item identifiers.");
67 period <= planningHorizon;
70 cancellationToken.ThrowIfCancellationRequested();
96 $
"P_f{delivery.SupplierId}_i{delivery.ItemId}" +
97 $
"_w{delivery.Warehouse.ReferenceId}_t{period}",
99 double.PositiveInfinity,
100 $
"Purchased quantity from supplier " +
101 $
"{delivery.SupplierId} for item " +
102 $
"{delivery.ItemId} in period {period}.");
106 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 AddDestinationWarehouse(MathematicalDomainKeyBuilder builder, WarehouseReference warehouse)
Adds a destination warehouse reference.
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
const string Procurement
Identifies supplier-procurement decision variables.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string Item
Item or product identifier segment.
const string Supplier
Supplier identifier segment.
const string Period
Period index segment.