LotSizingDataModel.Solver
2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
ILotSizingSolverService.cs
Go to the documentation of this file.
1
using
System.Threading;
2
using
System.Threading.Tasks;
3
4
namespace
LotSizingDataModel.Solver.Execution
;
5
6
/// <summary>
7
/// Defines the high-level service used to solve a complete
8
/// lot-sizing instance from a normalized solver request.
9
/// </summary>
10
/// <remarks>
11
/// Implementations are responsible for orchestrating the complete
12
/// workflow:
13
/// <list type="number">
14
/// <item>
15
/// <description>
16
/// selecting a mathematical formulation and building the
17
/// solver-independent model;
18
/// </description>
19
/// </item>
20
/// <item>
21
/// <description>
22
/// selecting and executing an available solver adapter;
23
/// </description>
24
/// </item>
25
/// <item>
26
/// <description>
27
/// mapping the mathematical solution back to a normalized
28
/// lot-sizing solution;
29
/// </description>
30
/// </item>
31
/// <item>
32
/// <description>
33
/// returning a single <see cref="SolverRunResult"/> containing
34
/// the solution, solver statistics, and diagnostics.
35
/// </description>
36
/// </item>
37
/// </list>
38
/// </remarks>
39
public
interface
ILotSizingSolverService
40
{
41
/// <summary>
42
/// Solves a lot-sizing instance described by the supplied
43
/// request.
44
/// </summary>
45
/// <param name="request">
46
/// Complete normalized solver request.
47
/// </param>
48
/// <param name="cancellationToken">
49
/// Token used to cancel model construction, solver
50
/// execution, or solution mapping.
51
/// </param>
52
/// <returns>
53
/// Task returning the normalized solver-run result.
54
/// </returns>
55
/// <exception cref="System.ArgumentNullException">
56
/// Thrown when <paramref name="request"/> is
57
/// <see langword="null"/>.
58
/// </exception>
59
/// <exception cref="System.InvalidOperationException">
60
/// Thrown when the request is invalid or when the configured
61
/// solver infrastructure cannot execute the request.
62
/// </exception>
63
ValueTask<SolverRunResult>
SolveAsync
(
64
SolverRequest
request,
65
CancellationToken cancellationToken =
default
);
66
67
/// <summary>
68
/// Requests interruption of the currently running solve
69
/// operation, when supported by the selected solver adapter.
70
/// </summary>
71
/// <remarks>
72
/// Calling this method when no solve is running has no
73
/// effect.
74
/// </remarks>
75
void
RequestStop
();
76
}
LotSizingDataModel.Solver.Execution.SolverRequest
Describes a request to solve a lot-sizing instance.
Definition
SolverRequest.cs:17
LotSizingDataModel.Solver.Execution.ILotSizingSolverService
Defines the high-level service used to solve a complete lot-sizing instance from a normalized solver ...
Definition
ILotSizingSolverService.cs:40
LotSizingDataModel.Solver.Execution.ILotSizingSolverService.RequestStop
void RequestStop()
Requests interruption of the currently running solve operation, when supported by the selected solver...
LotSizingDataModel.Solver.Execution.ILotSizingSolverService.SolveAsync
ValueTask< SolverRunResult > SolveAsync(SolverRequest request, CancellationToken cancellationToken=default)
Solves a lot-sizing instance described by the supplied request.
LotSizingDataModel.Solver.Execution
Definition
ExecutableObjectiveCriterion.cs:4
LotSizingDataModel.Solver
Execution
ILotSizingSolverService.cs
Generated by
1.17.0