3using System.Threading.Tasks;
4using LotSizingDataModel.Instance;
39 LotSizingInstance instance,
42 ArgumentNullException.ThrowIfNull(
45 ArgumentNullException.ThrowIfNull(
74 LotSizingInstance instance,
78 CancellationToken cancellationToken =
default)
80 ArgumentNullException.ThrowIfNull(
83 ArgumentNullException.ThrowIfNull(
86 ArgumentNullException.ThrowIfNull(
89 ArgumentNullException.ThrowIfNull(
92 if (
string.IsNullOrWhiteSpace(
95 throw new InvalidOperationException(
96 "A standard objective-term builder must expose " +
97 "a non-empty term-family identifier.");
102 cancellationToken.ThrowIfCancellationRequested();
134 LotSizingInstance instance,
138 CancellationToken cancellationToken);
161 ArgumentNullException.ThrowIfNull(
164 ArgumentNullException.ThrowIfNull(
167 if (
string.IsNullOrWhiteSpace(
170 throw new ArgumentException(
171 "A variable domain key is required.",
175 if (!
double.IsFinite(
178 throw new ArgumentOutOfRangeException(
181 "An objective coefficient must be finite.");
188 expressionBuilder.
Add(
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.
MathematicalVariable GetVariable(string domainKey)
Gets a required mathematical variable from its business-domain key.
Represents one decision variable in a mathematical optimization model.