2using System.Collections.Generic;
3using System.Xml.Serialization;
4using LotSizingDataModel.Instance;
15[XmlType(TypeName =
"solverRequest")]
18 private readonly List<ISolverProgressObserver>
47 LotSizingInstance instance)
50 ArgumentNullException.ThrowIfNull(
75 [XmlAttribute(
"preferredSolver")]
89 [XmlElement(
"formulationName")]
99 [XmlElement(
"runName")]
109 [XmlElement(
"parameters")]
133 throw new InvalidOperationException(
134 "A lot-sizing instance is required.");
140 throw new InvalidOperationException(
141 "The preferred solver cannot be Unknown.");
144 ArgumentNullException.ThrowIfNull(
151 in _progressObservers)
153 if (observer is
null)
155 throw new InvalidOperationException(
156 "The progress-observer collection cannot " +
157 "contain a null entry.");
175 ArgumentNullException.ThrowIfNull(
178 _progressObservers.Add(
Defines solver-independent parameters for an optimization run.
string FormulationName
Gets or sets the formulation name to use.
void EnsureValid()
Validates the solver request.
IList< ISolverProgressObserver > ProgressObservers
Gets the progress observers attached to this request.
string RunName
Gets or sets a user-defined name for the solver run.
SolverKind PreferredSolver
Gets or sets the preferred solver.
void AddProgressObserver(ISolverProgressObserver observer)
Adds a progress observer.
LotSizingInstance? Instance
Gets or sets the lot-sizing instance to solve.
SolverRequest()
Initializes an empty solver request.
SolverRequest(LotSizingInstance instance)
Initializes a solver request for an instance.
SolverParameters Parameters
Gets or sets the solver parameters.
Receives progress notifications produced during a solver execution.
SolverKind
Identifies a supported mathematical optimization solver.