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.
1using System.Threading;
2using System.Threading.Tasks;
4
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>
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(
37 CancellationToken cancellationToken = default);
38}
Represents an immutable snapshot of the current progress of a mathematical optimization run.
Receives progress notifications produced during a solver execution.
ValueTask OnProgressAsync(SolverProgressSnapshot snapshot, CancellationToken cancellationToken=default)
Processes a solver progress snapshot.