MemberEvaluatorFactoryIfc

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

Nothing above the simulation oracle in the evaluation stack is thread-safe (evaluator counters, solution caches, the stream tape policy, a reused model), so concurrency is achieved by isolation: each concurrently running member gets an evaluator whose entire resource chain is private to it. Implementations may pool expensive resources (built models) across members, as long as a resource is only ever held by one member at a time.

Both functions are invoked on member worker threads and must be safe to call concurrently for different member indices.

Inheritors

Functions

Link copied to clipboard
abstract fun createEvaluator(memberIndex: Int): EvaluatorIfc

Creates the private evaluator for the member with the given index. Called once per member, on the member's worker thread, before the member's solver is created.

Link copied to clipboard
open fun release(memberIndex: Int, evaluator: EvaluatorIfc, reusable: Boolean)

Releases the member's evaluator resources after the member finished (successfully or not). Called exactly once per successful createEvaluator call, on the member's worker thread.