4using System.Threading.Tasks;
5using LotSizingDataModel.Core.PhysicalModel;
6using LotSizingDataModel.Core.Relationships;
7using LotSizingDataModel.Instance;
30 LotSizingInstance instance,
33 ArgumentNullException.ThrowIfNull(instance);
34 ArgumentNullException.ThrowIfNull(options);
37 options.IncludeTransport &&
38 instance.SupplyChain.TransportCharacteristics.Count > 0 &&
39 instance.SupplyChain.TransportResources.Count > 0;
46 LotSizingInstance instance,
49 CancellationToken cancellationToken)
52 instance.PlanningHorizon;
55 TransportCharacteristic characteristic
56 in instance.SupplyChain.TransportCharacteristics)
58 cancellationToken.ThrowIfCancellationRequested();
60 TransportResource resource =
61 instance.SupplyChain.TransportResources
65 characteristic.TransportResourceId)
66 ??
throw new InvalidOperationException(
67 $
"Transport resource " +
68 $
"{characteristic.TransportResourceId} " +
69 "referenced by a transport characteristic " +
73 AssignedTransportLane lane
74 in instance.SupplyChain.GetTransportLanes(resource.Id))
78 period <= planningHorizon;
81 cancellationToken.ThrowIfCancellationRequested();
86 characteristic.ItemId,
96 $
"T_i{characteristic.ItemId}_r{resource.Id}" +
97 $
"_l{lane.Id}_t{period}",
99 double.PositiveInfinity,
100 $
"Transported quantity of item " +
101 $
"{characteristic.ItemId} using resource " +
102 $
"{resource.Id} in period {period}.");
107 return ValueTask.CompletedTask;
114 TransportResource resource,
115 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 Transport
Identifies transported-quantity 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.