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.
1
using
System.Threading;
2
using
System.Threading.Tasks;
3
using
LotSizingDataModel.Instance;
4
using
LotSizingDataModel.Solver.Modeling
;
5
6
namespace
LotSizingDataModel.Solver.Formulation
;
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>
17
public
interface
IMathematicalModelFormulation
18
{
19
/// <summary>
20
/// Gets the unique formulation identifier.
21
/// </summary>
22
string
FormulationId
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>
38
string
Description
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>
54
bool
CanBuild
(
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
}
LotSizingDataModel.Solver.Formulation.IMathematicalModelFormulation
Defines a solver-independent mathematical formulation for a lot-sizing instance.
Definition
IMathematicalModelFormulation.cs:18
LotSizingDataModel.Solver.Formulation.IMathematicalModelFormulation.Description
string Description
Gets the formulation description.
Definition
IMathematicalModelFormulation.cs:39
LotSizingDataModel.Solver.Formulation.IMathematicalModelFormulation.BuildAsync
ValueTask< MathematicalModel > BuildAsync(LotSizingInstance instance, CancellationToken cancellationToken=default)
Builds the solver-independent mathematical model.
LotSizingDataModel.Solver.Formulation.IMathematicalModelFormulation.Name
string Name
Gets the human-readable formulation name.
Definition
IMathematicalModelFormulation.cs:31
LotSizingDataModel.Solver.Formulation.IMathematicalModelFormulation.FormulationId
string FormulationId
Gets the unique formulation identifier.
Definition
IMathematicalModelFormulation.cs:23
LotSizingDataModel.Solver.Formulation.IMathematicalModelFormulation.CanBuild
bool CanBuild(LotSizingInstance instance)
Determines whether the formulation supports a lot-sizing instance.
LotSizingDataModel.Solver.Formulation
Definition
BacklogCostObjectiveTermBuilder.cs:9
LotSizingDataModel.Solver.Modeling
Definition
LinearConstraint.cs:4
LotSizingDataModel.Solver
Formulation
IMathematicalModelFormulation.cs
Generated by
1.17.0