2using System.Collections.Generic;
5using System.Threading.Tasks;
6using LotSizingDataModel.Instance;
20 private readonly IReadOnlyList<IStandardLotSizingObjectiveTermBuilder>
38 IEnumerable<IStandardLotSizingObjectiveTermBuilder> termBuilders)
40 ArgumentNullException.ThrowIfNull(
44 termBuilders.ToArray();
50 throw new InvalidOperationException(
51 "The standard objective-term builder collection " +
52 "cannot contain a null entry.");
55 string[] duplicateIds =
60 StringComparer.OrdinalIgnoreCase)
69 if (duplicateIds.Length > 0)
71 throw new InvalidOperationException(
72 "Duplicate standard objective-term identifiers " +
86 public IReadOnlyList<IStandardLotSizingObjectiveTermBuilder>
109 LotSizingInstance instance,
112 CancellationToken cancellationToken =
default)
114 ArgumentNullException.ThrowIfNull(
117 ArgumentNullException.ThrowIfNull(
120 ArgumentNullException.ThrowIfNull(
125 var expressionBuilder =
132 cancellationToken.ThrowIfCancellationRequested();
153 expressionBuilder.Build())
156 "Total cost of the standard lot-sizing " +
160 context.SetObjective(
Provides a fluent builder for linear expressions.
Provides the shared state required while constructing a solver-independent mathematical model.
Represents the objective function of a mathematical optimization model.
ObjectiveSense
Identifies the optimization direction of a mathematical objective.