1using LotSizingDataModel.Core.Relationships;
2using LotSizingDataModel.Instance;
14 LotSizingInstance instance,
17 CancellationToken cancellationToken)
19 (
int plantId, var workCenter, var profile) =
21 IReadOnlyList<ProductionRouting> routings =
24 for (
int period = 1; period <= instance.PlanningHorizon; period++)
26 var microPeriods = profile.EnumerateMicroPeriods()
27 .Where(micro => micro.MacroPeriod == period)
30 foreach (ProductionRouting routing
in routings)
32 cancellationToken.ThrowIfCancellationRequested();
37 foreach (var microPeriod
in microPeriods)
41 plantId, workCenter.Id, routing.Id, routing.ItemId, microPeriod)));
46 $
"glspAggregateProduction_r{routing.Id}_t{period}",
50 description:
"Macro-period production equals the sum of its GLSP micro-period quantities.");
54 return ValueTask.CompletedTask;
Provides a fluent builder for linear expressions.
LinearExpressionBuilder Add(MathematicalVariable variable, double coefficient=1.0)
Adds a variable term to the expression.
Provides the shared state required while constructing a solver-independent mathematical model.
MathematicalModel Build(bool clone=true)
Builds and validates the mathematical model.
MathematicalConstraintSense
Identifies the relational sense of a mathematical constraint.