3using System.Threading.Tasks;
4using LotSizingDataModel.Core.Relationships;
5using LotSizingDataModel.Instance;
23 LotSizingInstance instance,
26 ArgumentNullException.ThrowIfNull(instance);
27 ArgumentNullException.ThrowIfNull(options);
34 foreach (ProductionRouting routing
in instance.SupplyChain.ProductionRoutings)
36 if (routing.MinimumLotSize is not
null)
47 LotSizingInstance instance,
50 CancellationToken cancellationToken)
52 foreach (ProductionRouting routing
in instance.SupplyChain.ProductionRoutings)
54 if (routing.MinimumLotSize is
null)
59 for (
int period = 1; period <= instance.PlanningHorizon; period++)
61 cancellationToken.ThrowIfCancellationRequested();
64 routing.MinimumLotSize.GetMinimumLotSize(period);
66 if (minimum <= options.StructuralZeroTolerance)
92 $
"minimumLotSize_r{routing.Id}_t{period}",
97 "Minimum production lot size when setup is active.");
101 return ValueTask.CompletedTask;
Provides a fluent builder for linear expressions.
LinearExpressionBuilder Subtract(MathematicalVariable variable, double coefficient=1.0)
Subtracts a variable term from the expression.
LinearExpressionBuilder Add(MathematicalVariable variable, double coefficient=1.0)
Adds a variable term to the expression.
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.
Provides the canonical mathematical domain-key categories used to identify lot-sizing decision famili...
const string Setup
Identifies production setup decision variables.
Provides the canonical mathematical domain-key segment names used by lot-sizing variables and constra...
const string Routing
Routing 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.