SolverContext Class
Solver Foundation 3.0
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Provides services to solvers.
Namespace: Microsoft.SolverFoundation.Services
Assembly: Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)
The SolverContext type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | CurrentModel | Gets the model that is currently loaded in the context. |
![]() | DataSource | Gets or sets the database context for data. |
![]() | RegisteredSolvers | Get all registered plug-in solvers. |
![]() | SamplingParameters | Gets the parameters for random sampling. |
| Name | Description | |
|---|---|---|
![]() | CheckModel | Checks a model for errors. |
![]() | ClearModel | Clears a model. |
![]() | CreateModel | Creates a model. |
![]() | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | FindAllowedValues(IEnumerable(Of DecisionBinding)) | Finds all allowed values for a set of decisions. |
![]() | FindAllowedValues(IEnumerable(Of DecisionBinding), Func(Of TResult), Void) | Finds all allowed values for a set of decisions. |
![]() ![]() | GetContext | Returns the singleton context. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | LoadModel(ILinearModel) | Loads a linear model. |
![]() | LoadModel(ITermModel) | Loads a non-linear model. |
![]() | LoadModel(FileFormat, TextReader) | Loads a model from a file. |
![]() | LoadModel(FileFormat, String) | Loads a model in OML, MPS, or .SMPS format. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | PropagateDecisions | Writes decision values from the current solution back to the database. |
![]() | SaveModel | Writes the decision values from a solution. |
![]() | Solve | Solves a model that has been created and loaded. |
![]() | Solve(Directive()) | Solves a model that has been created and loaded. Solves the model using the specified directives. |
![]() | Solve(Func(Of TResult), Void) | Solves a model that has been created and loaded. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | DataBinding | Occurs when data is bound to a solver. |
![]() | Solving | Occurs when a solver is solving a model. |
SolverContext is the first class that a Solver Foundation Services (SFS) developer should use to create, load, save, and solve models. A SolverContext object works on one model at a time, and an instance of SolverContext is obtained through the static GetContext method.
Show:
