SolverFactorySession

open class SolverFactorySession(factory: SolverFactory, creationRequest: SolverSessionCreationRequest, capabilities: Set<String>, solutionFeatures: (Solution) -> Map<FeatureId, Map<String, FeatureValue>>, runtimeLibraries: List<Library>) : SolverSession

SolverSession backed by any SolverFactory; no toolkit dependency. Open so a frontend-specific module can customize the SolveOptions used for every resolution (see configureSolveOptions) without this class needing to know about any particular solving mode.

Constructors

Link copied to clipboard
constructor(factory: SolverFactory, creationRequest: SolverSessionCreationRequest, capabilities: Set<String>, solutionFeatures: (Solution) -> Map<FeatureId, Map<String, FeatureValue>>, runtimeLibraries: List<Library>)

Properties

Link copied to clipboard
open override val capabilities: SolverCapabilities

What this particular session supports (may narrow its profile's declared capabilities).

Link copied to clipboard
open override val id: SolverSessionId

Uniquely identifies this session while it's alive.

Link copied to clipboard

The current inspectable state (operators, flags, libraries, knowledge base) of the underlying solver.

Functions

Link copied to clipboard
open suspend override fun close()

Releases whatever resources this session holds; the session is unusable afterwards.

Link copied to clipboard
open suspend override fun openResolution(request: ResolutionRequest): ResolutionCursor

Starts resolving request's query, returning a cursor to step through its solutions.

Link copied to clipboard
open suspend override fun reset(): SolverInspectionSnapshot

Restores a pristine solver state. Implementations may rebuild internally.