4using System.Threading.Tasks;
5using LotSizingDataModel.Core.PhysicalModel;
6using LotSizingDataModel.Core.Relationships;
7using LotSizingDataModel.Instance;
29 LotSizingInstance instance,
32 ArgumentNullException.ThrowIfNull(instance);
33 ArgumentNullException.ThrowIfNull(options);
36 options.IncludeTransport &&
37 options.IncludeTransportSetups &&
38 instance.SupplyChain.TransportCharacteristics.Any(
40 characteristic.FixedSetupCost is not
null ||
41 characteristic.SetupTime is not
null);
48 LotSizingInstance instance,
51 CancellationToken cancellationToken)
54 instance.PlanningHorizon;
57 TransportCharacteristic characteristic
58 in instance.SupplyChain.TransportCharacteristics)
60 if (characteristic.FixedSetupCost is
null &&
61 characteristic.SetupTime is
null)
66 TransportResource resource =
67 instance.SupplyChain.TransportResources
71 characteristic.TransportResourceId)
72 ??
throw new InvalidOperationException(
73 $
"Transport resource " +
74 $
"{characteristic.TransportResourceId} " +
78 AssignedTransportLane lane
79 in instance.SupplyChain.GetTransportLanes(resource.Id))
83 period <= planningHorizon;
86 cancellationToken.ThrowIfCancellationRequested();
91 characteristic.ItemId,
101 $
"YT_i{characteristic.ItemId}_r{resource.Id}" +
102 $
"_l{lane.Id}_t{period}",
104 $
"Transport setup for item " +
105 $
"{characteristic.ItemId}, resource " +
106 $
"{resource.Id}, period {period}.");
111 return ValueTask.CompletedTask;
118 TransportResource resource,
119 AssignedTransportLane lane)
Builds stable business-domain keys for mathematical variables and constraints.
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.
static MathematicalDomainKeyBuilder AddOriginWarehouse(MathematicalDomainKeyBuilder builder, WarehouseReference warehouse)
Adds an origin warehouse reference.
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
const string TransportSetup
Identifies transport setup decision variables.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string TransportResource
Transport-resource identifier segment.
const string Item
Item or product identifier segment.
const string Period
Period index segment.