2using System.Collections.Generic;
4using System.Threading.Tasks;
48 public async ValueTask<MathematicalModelSolverSelectionResult>
52 IEnumerable<SolverAvailabilityInfo>
53 availabilityInformation,
55 CancellationToken cancellationToken =
default)
57 ArgumentNullException.ThrowIfNull(
60 ArgumentNullException.ThrowIfNull(
61 availabilityInformation);
63 ArgumentNullException.ThrowIfNull(
67 await _solverSelectionService.SelectAsync(
70 availabilityInformation,
82 "The selected solver adapter cannot execute a " +
83 "solver-independent mathematical model.");
85 result.SelectedSolver =
Stores solver adapters that were loaded successfully and provides lookup services by adapter identifi...
Configures how a solver adapter is selected when automatic solver selection is requested.
Represents the result of selecting a solver adapter for a solve request.
bool IsSuccessful
Gets a value indicating whether a usable adapter was selected.
Selects a usable solver adapter according to the requested solver kind, adapter capabilities,...
Represents the result of selecting a solver adapter that can solve a solver-independent mathematical ...
static MathematicalModelSolverSelectionResult From(SolverSelectionResult selection)
Creates a mathematical-model solver-selection result from a general solver-selection result.
void AddDiagnostic(string message)
Adds a non-empty diagnostic message.
IMathematicalModelSolverAdapter? Adapter
Gets or sets the selected live mathematical-model solver adapter.
Selects a solver adapter that supports direct execution of solver-independent mathematical models.
async ValueTask< MathematicalModelSolverSelectionResult > SelectAsync(SolverKind requestedSolver, SolverAdapterRegistry registry, IEnumerable< SolverAvailabilityInfo > availabilityInformation, SolverSelectionOptions options, CancellationToken cancellationToken=default)
Selects a usable mathematical-model solver adapter.
SolverKind
Identifies a supported mathematical optimization solver.