LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
IStandardLotSizingObjectiveBuilder.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3using LotSizingDataModel.Instance;
5
7
8/// <summary>
9/// Defines the objective-construction component used by the
10/// standard solver-independent lot-sizing formulation.
11/// </summary>
12/// <remarks>
13/// Implementations build the linear objective from the
14/// normalized <see cref="LotSizingInstance"/> and from the
15/// mathematical variables previously registered in the
16/// supplied <see cref="MathematicalModelBuildContext"/>.
17/// </remarks>
19{
20 /// <summary>
21 /// Builds and assigns the objective function of the standard
22 /// lot-sizing formulation.
23 /// </summary>
24 /// <param name="instance">
25 /// Source lot-sizing instance.
26 /// </param>
27 /// <param name="context">
28 /// Mathematical-model build context containing the variables
29 /// created by the standard variable builder.
30 /// </param>
31 /// <param name="options">
32 /// Standard formulation options controlling optional
33 /// decision and cost families.
34 /// </param>
35 /// <param name="cancellationToken">
36 /// Token used to cancel objective construction.
37 /// </param>
38 /// <returns>
39 /// Task representing objective construction.
40 /// </returns>
41 /// <exception cref="System.ArgumentNullException">
42 /// Thrown when <paramref name="instance"/>,
43 /// <paramref name="context"/>, or
44 /// <paramref name="options"/> is
45 /// <see langword="null"/>.
46 /// </exception>
47 /// <exception cref="System.InvalidOperationException">
48 /// Thrown when a required mathematical variable cannot be
49 /// resolved from the build context or when the source cost
50 /// data are inconsistent.
51 /// </exception>
52 ValueTask BuildAsync(
53 LotSizingInstance instance,
56 CancellationToken cancellationToken = default);
57}
Provides the shared state required while constructing a solver-independent mathematical model.
Configures the standard solver-independent mixed-integer lot-sizing formulation.
Defines the objective-construction component used by the standard solver-independent lot-sizing formu...
ValueTask BuildAsync(LotSizingInstance instance, MathematicalModelBuildContext context, StandardLotSizingFormulationOptions options, CancellationToken cancellationToken=default)
Builds and assigns the objective function of the standard lot-sizing formulation.