Evaluator

class Evaluator @JvmOverloads constructor(val problemDefinition: ProblemDefinition, simulator: SimulationOracleIfc, val cache: SolutionCacheIfc? = null) : EvaluatorIfc(source)

An evaluator should communicate with the simulation oracle to determine solutions for requests for evaluation from solvers.

Parameters

problemDefinition

the problem that the evaluation of responses will be used on

simulator

the provider of responses from the simulation oracle

cache

a cache that can be used instead of a costly simulation evaluation

Constructors

Link copied to clipboard
constructor(problemDefinition: ProblemDefinition, simulator: SimulationOracleIfc, cache: SolutionCacheIfc? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val cache: SolutionCacheIfc?
Link copied to clipboard
Link copied to clipboard
open override var totalCachedReplications: Int

The total number of replications successfully bypassed/satisfied by the cache.

Link copied to clipboard
open override var totalDesignPointsEvaluated: Int

The total number of unique design points (ModelInputs) requested for evaluation across all evaluator calls.

Link copied to clipboard
open override var totalEvaluatorCalls: Int

The total number of times the evaluate() method has been invoked. This essentially tracks the number of "batches" or "generations" processed.

Link copied to clipboard
open override var totalOracleReplications: Int

The total number of replications actually executed by the simulation oracle.

Functions

Link copied to clipboard
open override fun evaluate(evaluationRequest: EvaluationRequest): Map<ModelInputs, Solution>

Processes the supplied requests for solutions. The solutions may come from an associated solution cache (if present or allowed) or via evaluations by the simulation oracle. The CRN option is applied to the set of requests and does not permit cached solutions, even if caching is permitted.

Link copied to clipboard

The evaluator collects some basic counts (statistics) on its evaluations. This function resets all counters to 0, perhaps in preparation for another evaluation run.

Link copied to clipboard
open override fun toString(): String