8 private readonly List<SolverKind> _solverPriority =
16 private readonly List<SolverCapability> _requiredCapabilities = [];
41 if (_solverPriority.Count == 0)
43 throw new InvalidOperationException(
44 "At least one concrete solver must be present in the priority.");
47 var seenKinds =
new HashSet<SolverKind>();
49 foreach (
SolverKind solverKind
in _solverPriority)
53 throw new InvalidOperationException(
54 "The priority must contain only concrete solver kinds.");
57 if (!seenKinds.Add(solverKind))
59 throw new InvalidOperationException(
60 $
"Solver '{solverKind}' appears more than once in the priority.");
64 var seenCapabilities =
new HashSet<SolverCapability>();
70 throw new InvalidOperationException(
71 "Required capabilities cannot contain Unknown.");
74 if (!seenCapabilities.Add(capability))
76 throw new InvalidOperationException(
77 $
"Capability '{capability}' appears more than once.");
Configures automatic or explicit optimization-solver selection.
List< SolverCapability > RequiredCapabilities
Gets capabilities that the selected adapter must support.
void EnsureValid()
Validates this option set.
bool AllowLimitedAvailability
Gets or sets whether an adapter reported as available with limitations can still be selected.
bool RequireExactSolverKind
Gets or sets whether an explicitly requested solver forbids fallback.
List< SolverKind > SolverPriority
Gets the priority used for SolverKind.Automatic. Earlier entries have higher priority.
SolverCapability
Identifies an optional capability exposed by an optimization-solver adapter.
SolverKind
Identifies a mathematical optimization solver that can be used by solver-backed ULS algorithms.
@ CoinOrCbc
COIN-OR CBC mixed-integer programming solver.