3using System.Threading.Tasks;
4using LotSizingDataModel.Core.Relationships;
5using LotSizingDataModel.Instance;
28 LotSizingInstance instance,
31 ArgumentNullException.ThrowIfNull(
34 ArgumentNullException.ThrowIfNull(
37 return instance.SupplyChain.Inventories.Count > 0;
44 LotSizingInstance instance,
47 CancellationToken cancellationToken)
50 instance.PlanningHorizon;
54 in instance.SupplyChain.Inventories)
56 cancellationToken.ThrowIfCancellationRequested();
58 if (inventory.ItemId <= 0)
60 throw new InvalidOperationException(
61 "Every inventory relationship must identify " +
62 "a strictly positive item identifier.");
67 period <= planningHorizon;
70 cancellationToken.ThrowIfCancellationRequested();
92 $
"I_i{inventory.ItemId}_w" +
93 $
"{inventory.Warehouse.ReferenceId}_t{period}",
95 double.PositiveInfinity,
96 $
"Inventory level for item {inventory.ItemId} " +
97 $
"at warehouse {inventory.Warehouse.ReferenceId} " +
98 $
"in period {period}.");
102 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 Inventory
Identifies inventory-level 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 Period
Period index segment.