Package-level declarations

Types

Link copied to clipboard
data class ConcurrentRunOptions(val numWorkers: Int? = null, val substreamBlockSize: Int = DEFAULT_SUBSTREAM_BLOCK_SIZE, val confirmation: ConfirmationOptions? = null)

Options governing concurrent solver execution (parallel random restarts, solver portfolios).

Link copied to clipboard
class ConcurrentSolverRunner(problemDefinition: ProblemDefinition, tasks: List<SolverMemberTask>, evaluatorFactory: MemberEvaluatorFactoryIfc, numWorkers: Int? = null)

The engine for concurrent solver execution: runs the member solvers of a concurrent run (parallel random restarts, a solver portfolio) on a bounded dispatcher, each with its own factory-provisioned evaluation resources, and hands their results back in deterministic member order.

Link copied to clipboard
data class ConfirmationOptions(val topK: Int = 3, val replicationsPerCandidate: Int = 50)

Options for the optional confirmation stage run after all members of a concurrent solver run complete. Members can return "best" solutions estimated with different precision (different replication counts, different luck), so picking the winner from point estimates alone favors noise. The confirmation stage re-evaluates the top candidates with common random numbers and picks the winner from the confirmed estimates — standard ranking-and-selection hygiene.

Link copied to clipboard
data class ConfirmationOutcome(val winner: Solution, val confirmedSolutions: List<Solution>, val numOracleCalls: Int, val numReplicationsRequested: Int)

The outcome of a confirmation stage.

Link copied to clipboard

Provisions the per-member evaluation resources for concurrent solver execution.

Link copied to clipboard

The lifecycle outcome of one member of a concurrent solver run.

Link copied to clipboard
class PooledMemberEvaluatorFactory(problemDefinition: ProblemDefinition, modelBuilder: ModelBuilderIfc, modelConfiguration: Map<String, String>? = null, baseRunParameters: ExperimentRunParametersIfc? = null, substreamBlockSize: Int = ConcurrentRunOptions.DEFAULT_SUBSTREAM_BLOCK_SIZE, solutionCacheFactory: () -> SolutionCacheIfc? = { MemorySolutionCache() }) : MemberEvaluatorFactoryIfc

The standard member-evaluator provisioner: each member gets its own sequential SimulationProvider over a pooled, silenced model, with a private solution cache and a stream tape starting at the member's block offset.

Link copied to clipboard

The confirmation stage for concurrent solver runs: re-evaluates the top candidate solutions under common random numbers and picks the winner from the confirmed estimates. Members of a concurrent run can return bests with different statistical precision, so a winner picked from raw point estimates favors noise; a short CRN comparison of the finalists is the standard ranking-and-selection remedy.

Link copied to clipboard
fun interface SolverFactoryIfc

Creates a fresh solver instance bound to the supplied per-member evaluation resources.

Link copied to clipboard
data class SolverMemberResult(val memberIndex: Int, val label: String, val bestSolution: Solution, val numOracleCalls: Int, val numReplicationsRequested: Int, val solverResult: SolverResult?, val status: MemberStatus, val error: Throwable? = null)

The result of one member of a concurrent solver run, captured on the member's worker after its solver finished (or failed). Results are safe to read once obtained from the runner: the await establishes the necessary happens-before ordering.

Link copied to clipboard
data class SolverMemberTask(val solverFactory: SolverFactoryIfc, val label: String, val startingPoint: InputMap? = null, val innerSolverDecorator: (solver: Solver, memberIndex: Int) -> Unit? = null)

One member of a concurrent solver run: the factory that creates its solver instance plus the member-specific configuration applied at creation time.

Link copied to clipboard
class SolverPortfolio @JvmOverloads constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, val members: List<SolverMemberTask>, memberEvaluatorFactory: MemberEvaluatorFactoryIfc, val concurrentOptions: ConcurrentRunOptions = ConcurrentRunOptions(), replicationsPerEvaluation: ReplicationPerEvaluationIfc = FixedReplicationsPerEvaluation(defaultReplicationsPerEvaluation), streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), name: String? = null) : StochasticSolver

A solver portfolio: N solver instances — typically of different algorithms — race on the same problem concurrently, each on its own worker with its own factory-created solver and private evaluation resources, and the portfolio reports the best solution found across all members.