LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
IMathematicalModelFormulation.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3using LotSizingDataModel.Instance;
5
7
8/// <summary>
9/// Defines a solver-independent mathematical formulation for a
10/// lot-sizing instance.
11/// </summary>
12/// <remarks>
13/// An implementation creates the common mathematical model only.
14/// Solver-specific translation is performed later by the selected
15/// solver adapter.
16/// </remarks>
18{
19 /// <summary>
20 /// Gets the unique formulation identifier.
21 /// </summary>
23 {
24 get;
25 }
26
27 /// <summary>
28 /// Gets the human-readable formulation name.
29 /// </summary>
30 string Name
31 {
32 get;
33 }
34
35 /// <summary>
36 /// Gets the formulation description.
37 /// </summary>
39 {
40 get;
41 }
42
43 /// <summary>
44 /// Determines whether the formulation supports a
45 /// lot-sizing instance.
46 /// </summary>
47 /// <param name="instance">
48 /// Lot-sizing instance to evaluate.
49 /// </param>
50 /// <returns>
51 /// <see langword="true"/> when the formulation can represent
52 /// the instance; otherwise, <see langword="false"/>.
53 /// </returns>
55 LotSizingInstance instance);
56
57 /// <summary>
58 /// Builds the solver-independent mathematical model.
59 /// </summary>
60 /// <param name="instance">
61 /// Lot-sizing instance to formulate.
62 /// </param>
63 /// <param name="cancellationToken">
64 /// Token used to cancel model construction.
65 /// </param>
66 /// <returns>
67 /// Task returning the complete mathematical model.
68 /// </returns>
69 /// <exception cref="System.ArgumentNullException">
70 /// Thrown when <paramref name="instance"/> is
71 /// <see langword="null"/>.
72 /// </exception>
73 /// <exception cref="System.InvalidOperationException">
74 /// Thrown when the formulation cannot represent the supplied
75 /// instance or when model construction fails.
76 /// </exception>
77 ValueTask<MathematicalModel> BuildAsync(
78 LotSizingInstance instance,
79 CancellationToken cancellationToken = default);
80}
Defines a solver-independent mathematical formulation for a lot-sizing instance.
ValueTask< MathematicalModel > BuildAsync(LotSizingInstance instance, CancellationToken cancellationToken=default)
Builds the solver-independent mathematical model.
bool CanBuild(LotSizingInstance instance)
Determines whether the formulation supports a lot-sizing instance.