Class SolverInfo
- Namespace
- OptalCP
- Assembly
- OptalCP.dll
Version and edition information reported by the solver.
public class SolverInfo
- Inheritance
-
SolverInfo
- Inherited Members
Remarks
Describes the solver binary the API is talking to: its version, its edition, and whether it masks solution values.
In the preview edition, all solution values are masked (reported as absent), so SolverInfo.ValuesMasked is the reliable way to tell whether the values in a Solution are real.
It is attached to every SolveResult as SolveResult.SolverInfo, and can also be queried without solving.
See also:
- Solver.GetSolverInfo — to query it without solving.
- SolveResult.SolverInfo — for the value attached to a solve result.
Properties
ApiVersion
Version of the API package (the language binding).
public string ApiVersion { get; }
Property Value
- string
The API version string.
Remarks
This is the version of the language API, equal to the Solver.ApiVersion constant. It may differ from SolverInfo.SolverVersion, which is the version of the solver binary.
Build
Build identifier of the solver binary.
public string Build { get; }
Property Value
- string
The build identifier, or an empty string for an official release.
Remarks
Identifies the exact build of the solver, including the source commit hash. It is empty for an official release. Useful to include in bug reports so the precise binary can be identified.
Edition
Edition of the solver binary.
public string Edition { get; }
Property Value
- string
The edition name, one of
"preview","academic", or"full".
Remarks
The edition comes from the binary package in use. To decide whether solution values are available, prefer SolverInfo.ValuesMasked over comparing this string.
SolverVersion
Version of the solver binary.
public string SolverVersion { get; }
Property Value
- string
The solver version string.
Remarks
It differs from SolverInfo.ApiVersion when the binary comes from
another release, for example one named by Parameters.solver or
OPTALCP_SOLVER.
ValuesMasked
Whether the solver masks solution values.
public bool ValuesMasked { get; }
Property Value
- bool
True if solution values are masked (preview edition), False otherwise.
Remarks
When true (the preview edition), every value in a Solution is reported as absent regardless of the actual result. Use this flag to distinguish a masked value from a variable that is genuinely absent.