LotSizingDataModel.Solver
2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
IMathematicalModelSolver.cs
Go to the documentation of this file.
1
using
System.Threading;
2
using
System.Threading.Tasks;
3
using
LotSizingDataModel.Solver.Execution
;
4
using
LotSizingDataModel.Solver.Common
;
5
6
namespace
LotSizingDataModel.Solver.Contracts
;
7
8
/// <summary>
9
/// Defines a solver adapter capable of solving an already built,
10
/// solver-independent mathematical model.
11
/// </summary>
12
/// <remarks>
13
/// Implementations translate the generic mathematical model
14
/// contained in <see cref="MathematicalModelSolveRequest"/> into
15
/// the native representation of a specific optimization engine.
16
/// They must not rebuild lot-sizing equations from the original
17
/// business instance.
18
/// </remarks>
19
public
interface
IMathematicalModelSolver
20
{
21
/// <summary>
22
/// Gets the solver kind.
23
/// </summary>
24
SolverKind
SolverKind
25
{
26
get
;
27
}
28
29
/// <summary>
30
/// Gets the solver name.
31
/// </summary>
32
string
SolverName
33
{
34
get
;
35
}
36
37
/// <summary>
38
/// Gets the solver version when available.
39
/// </summary>
40
string
SolverVersion
41
{
42
get
;
43
}
44
45
/// <summary>
46
/// Gets a value indicating whether a solve operation is
47
/// currently running.
48
/// </summary>
49
bool
IsRunning
50
{
51
get
;
52
}
53
54
/// <summary>
55
/// Solves a solver-independent mathematical model.
56
/// </summary>
57
/// <param name="request">
58
/// Mathematical-model solve request.
59
/// </param>
60
/// <param name="cancellationToken">
61
/// Token used to cancel the solve operation.
62
/// </param>
63
/// <returns>
64
/// Task returning the generic mathematical-model solve
65
/// result.
66
/// </returns>
67
/// <exception cref="System.ArgumentNullException">
68
/// Thrown when <paramref name="request"/> is
69
/// <see langword="null"/>.
70
/// </exception>
71
/// <exception cref="System.InvalidOperationException">
72
/// Thrown when the request is invalid or another solve
73
/// operation is already running.
74
/// </exception>
75
ValueTask<MathematicalModelSolveResult>
SolveAsync
(
76
MathematicalModelSolveRequest
request,
77
CancellationToken cancellationToken =
default
);
78
79
/// <summary>
80
/// Requests interruption of the currently running solve
81
/// operation.
82
/// </summary>
83
/// <remarks>
84
/// The request is cooperative. Native solver adapters should
85
/// forward it to the corresponding solver interruption
86
/// mechanism whenever available.
87
/// </remarks>
88
void
RequestStop
();
89
}
LotSizingDataModel.Solver.Execution.MathematicalModelSolveRequest
Describes a request to solve an already built, solver-independent mathematical model.
Definition
MathematicalModelSolveRequest.cs:23
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver
Defines a solver adapter capable of solving an already built, solver-independent mathematical model.
Definition
IMathematicalModelSolver.cs:20
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver.RequestStop
void RequestStop()
Requests interruption of the currently running solve operation.
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver.SolverName
string SolverName
Gets the solver name.
Definition
IMathematicalModelSolver.cs:33
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver.SolveAsync
ValueTask< MathematicalModelSolveResult > SolveAsync(MathematicalModelSolveRequest request, CancellationToken cancellationToken=default)
Solves a solver-independent mathematical model.
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver.SolverKind
SolverKind SolverKind
Gets the solver kind.
Definition
IMathematicalModelSolver.cs:25
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver.IsRunning
bool IsRunning
Gets a value indicating whether a solve operation is currently running.
Definition
IMathematicalModelSolver.cs:50
LotSizingDataModel.Solver.Contracts.IMathematicalModelSolver.SolverVersion
string SolverVersion
Gets the solver version when available.
Definition
IMathematicalModelSolver.cs:41
LotSizingDataModel.Solver.Common
Definition
SolverAdapterDescriptor.cs:5
LotSizingDataModel.Solver.Contracts
Definition
ILotSizingSolver.cs:8
LotSizingDataModel.Solver.Execution
Definition
ExecutableObjectiveCriterion.cs:4
LotSizingDataModel.Solver
Contracts
IMathematicalModelSolver.cs
Generated by
1.17.0