2using System.Collections.Generic;
3using System.Xml.Serialization;
21[XmlType(TypeName =
"mathematicalModelSolveRequest")]
24 private readonly List<ISolverProgressObserver> _progressObservers =
55 [XmlAttribute(
"runName")]
66 [XmlAttribute(
"formulationId")]
76 [XmlElement(
"parameters")]
105 throw new InvalidOperationException(
106 "A mathematical model is required.");
113 throw new InvalidOperationException(
114 "Solver parameters are required.");
129 in _progressObservers)
131 if (observer is
null)
133 throw new InvalidOperationException(
134 "The progress-observer collection cannot " +
135 "contain a null entry.");
Defines solver-independent parameters for an optimization run.
string FormulationId
Gets or sets the identifier of the formulation that generated the mathematical model.
string RunName
Gets or sets an optional run name.
MathematicalModel? Model
Gets or sets the mathematical model to solve.
SolverParameters Parameters
Gets or sets the generic solver parameters.
MathematicalModelSolveRequest()
Initializes an empty mathematical-model solve request.
List< ISolverProgressObserver > ProgressObservers
Gets the progress observers attached to the solve run.
void EnsureValid()
Validates the mathematical-model solve request.
Represents a solver-independent mathematical optimization model.
Receives progress notifications produced during a solver execution.