LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
IStandardLotSizingConstraintBuilder.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 constraint-construction component used by the
10/// standard solver-independent lot-sizing formulation.
11/// </summary>
12/// <remarks>
13/// Implementations create all linear constraints required by
14/// the standard formulation from the normalized
15/// <see cref="LotSizingInstance"/> and from the mathematical
16/// variables previously registered in the supplied
17/// <see cref="MathematicalModelBuildContext"/>.
18/// </remarks>
20{
21 /// <summary>
22 /// Builds and adds all constraints of the standard
23 /// lot-sizing formulation.
24 /// </summary>
25 /// <param name="instance">
26 /// Source lot-sizing instance.
27 /// </param>
28 /// <param name="context">
29 /// Mathematical-model build context containing the variables
30 /// created by the standard variable builder.
31 /// </param>
32 /// <param name="options">
33 /// Standard formulation options controlling optional
34 /// constraint families.
35 /// </param>
36 /// <param name="cancellationToken">
37 /// Token used to cancel constraint construction.
38 /// </param>
39 /// <returns>
40 /// Task representing constraint construction.
41 /// </returns>
42 /// <exception cref="System.ArgumentNullException">
43 /// Thrown when <paramref name="instance"/>,
44 /// <paramref name="context"/>, or
45 /// <paramref name="options"/> is
46 /// <see langword="null"/>.
47 /// </exception>
48 /// <exception cref="System.InvalidOperationException">
49 /// Thrown when a required mathematical variable cannot be
50 /// resolved from the build context or when the source data
51 /// cannot be represented consistently by the standard
52 /// formulation.
53 /// </exception>
54 ValueTask BuildAsync(
55 LotSizingInstance instance,
58 CancellationToken cancellationToken = default);
59}
Provides the shared state required while constructing a solver-independent mathematical model.
Configures the standard solver-independent mixed-integer lot-sizing formulation.
Defines the constraint-construction component used by the standard solver-independent lot-sizing form...
ValueTask BuildAsync(LotSizingInstance instance, MathematicalModelBuildContext context, StandardLotSizingFormulationOptions options, CancellationToken cancellationToken=default)
Builds and adds all constraints of the standard lot-sizing formulation.