1using LotSizingDataModel.Core.Relationships;
2using LotSizingDataModel.Instance;
17 "smallBucketSchedulingCapacity";
20 LotSizingInstance instance,
23 CancellationToken cancellationToken)
26 instance.SupplyChain.Plants
29 plant.WorkCenters.Select(
31 (PlantId:plant.Id,WorkCenter:workCenter)))
34 candidate.WorkCenter.SchedulingProfile is not
null);
37 entry.WorkCenter.SchedulingProfile!;
40 period<=instance.PlanningHorizon;
46 foreach (ProductionRouting routing
47 in instance.SupplyChain.ProductionRoutings)
50 routing.WorkCenters.Single();
52 ProductionCharacteristic characteristic =
53 instance.SupplyChain.ProductionCharacteristics.Single(
55 candidate.ItemId==routing.ItemId &&
56 candidate.WorkCenter.PlantId==reference.PlantId &&
57 candidate.WorkCenter.WorkCenterId==reference.WorkCenterId);
59 string productionKey =
68 characteristic.UnitCapacityConsumption![period]);
71 characteristic.SetupTime?[period] ?? 0.0;
86 characteristic.StartUpTime?[period] ?? 0.0;
101 string additionalKey =
112 additional is not
null)
114 expression.Subtract(additional);
119 $
"smallBucketCapacity_p{entry.PlantId}_w{entry.WorkCenter.Id}_t{period}",
122 entry.WorkCenter.CapacityConstraint![period]);
125 return ValueTask.CompletedTask;
Provides a fluent builder for linear expressions.
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.
MathematicalModel Build(bool clone=true)
Builds and validates the mathematical model.
MathematicalVariableRegistry VariableRegistry
Gets the registry that maps business-domain keys to mathematical variables.
bool TryGet(string domainKey, out MathematicalVariable? variable)
Attempts to get the variable registered for a domain key.
Builds canonical mathematical domain keys for production start-up events.
static string CreateSmallBucketKey(ProductionSchedulingProfile profile, ProductionRouting routing, int period)
static string CreateSetupStartKey(ProductionSchedulingProfile profile, ProductionRouting routing, int period)
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
const string WorkCenterAdditionalCapacity
Identifies additional work-center-capacity decision variables.
const string Production
Identifies production-quantity decision variables.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string Plant
Plant identifier segment.
const string Routing
Routing identifier segment.
const string WorkCenter
Work-center identifier segment.
const string Period
Period index segment.
Represents one decision variable in a mathematical optimization model.
MathematicalConstraintSense
Identifies the relational sense of a mathematical constraint.