4using System.Threading.Tasks;
5using LotSizingDataModel.Core.Relationships;
6using LotSizingDataModel.Instance;
28 LotSizingInstance instance,
31 ArgumentNullException.ThrowIfNull(
34 ArgumentNullException.ThrowIfNull(
38 instance.SupplyChain.Inventories.Any(
40 inventory.FixedSetupCost is not
null ||
41 inventory.SetupTime is not
null);
48 LotSizingInstance instance,
51 CancellationToken cancellationToken)
55 in instance.SupplyChain.Inventories)
57 if (inventory.FixedSetupCost is
null &&
58 inventory.SetupTime is
null)
65 period <= instance.PlanningHorizon;
68 cancellationToken.ThrowIfCancellationRequested();
90 $
"YI_i{inventory.ItemId}_w" +
91 $
"{inventory.Warehouse.ReferenceId}_t{period}",
93 $
"Inventory setup for item {inventory.ItemId} " +
95 $
"{inventory.Warehouse.ReferenceId}, " +
100 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 InventorySetup
Identifies inventory setup 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.