3using System.Threading.Tasks;
4using LotSizingDataModel.Core.Relationships;
5using LotSizingDataModel.Instance;
40 ArgumentNullException.ThrowIfNull(bigMEstimator);
41 _bigMEstimator = bigMEstimator;
46 "productionSetupLink";
50 LotSizingInstance instance,
53 ArgumentNullException.ThrowIfNull(instance);
54 ArgumentNullException.ThrowIfNull(options);
56 return options.IncludeProductionSetups &&
57 instance.SupplyChain.ProductionRoutings.Count > 0;
62 LotSizingInstance instance,
65 CancellationToken cancellationToken)
68 ProductionRouting routing
69 in instance.SupplyChain.ProductionRoutings)
72 period <= instance.PlanningHorizon;
75 cancellationToken.ThrowIfCancellationRequested();
97 _bigMEstimator.Estimate(
110 $
"productionSetupLink_r{routing.Id}_t{period}",
115 "Positive production requires an active " +
116 $
"setup. Big-M={estimate.Value:G17}. " +
121 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.