LotSizingDataModel.Solver
2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
ISolverProgressObserver.cs
Go to the documentation of this file.
1
using
System.Threading;
2
using
System.Threading.Tasks;
3
using
LotSizingDataModel.Solver.Monitoring
;
4
5
namespace
LotSizingDataModel.Solver.Contracts
;
6
7
/// <summary>
8
/// Receives progress notifications produced during a solver
9
/// execution.
10
/// </summary>
11
/// <remarks>
12
/// Implementations may update a user interface, write a log,
13
/// store convergence history, or trigger an external action.
14
///
15
/// The observer must return quickly because some solver APIs
16
/// invoke progress notifications from their callback thread.
17
/// Long-running work should therefore be delegated to another
18
/// thread or queued asynchronously.
19
/// </remarks>
20
public
interface
ISolverProgressObserver
21
{
22
/// <summary>
23
/// Processes a solver progress snapshot.
24
/// </summary>
25
/// <param name="snapshot">
26
/// Current solver progress information.
27
/// </param>
28
/// <param name="cancellationToken">
29
/// Token that can be observed by the progress-processing
30
/// implementation.
31
/// </param>
32
/// <returns>
33
/// A task representing the progress-processing operation.
34
/// </returns>
35
ValueTask
OnProgressAsync
(
36
SolverProgressSnapshot
snapshot,
37
CancellationToken cancellationToken =
default
);
38
}
LotSizingDataModel.Solver.Monitoring.SolverProgressSnapshot
Represents an immutable snapshot of the current progress of a mathematical optimization run.
Definition
SolverProgressSnapshot.cs:13
LotSizingDataModel.Solver.Contracts.ISolverProgressObserver
Receives progress notifications produced during a solver execution.
Definition
ISolverProgressObserver.cs:21
LotSizingDataModel.Solver.Contracts.ISolverProgressObserver.OnProgressAsync
ValueTask OnProgressAsync(SolverProgressSnapshot snapshot, CancellationToken cancellationToken=default)
Processes a solver progress snapshot.
LotSizingDataModel.Solver.Contracts
Definition
ILotSizingSolver.cs:8
LotSizingDataModel.Solver.Monitoring
Definition
SolverProgressRecorder.cs:4
LotSizingDataModel.Solver
Contracts
ISolverProgressObserver.cs
Generated by
1.17.0