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? = null
Link copied to clipboard
Link copied to clipboard

The total number of evaluations performed via the cache.

Link copied to clipboard

The total number of replications satisfied by the cache.

Link copied to clipboard

The total number of evaluations performed. An evaluation may have many replications.

Link copied to clipboard

The total number of evaluations performed via the simulation oracle.

Link copied to clipboard

The total number of replications performed by the simulation oracle.

Link copied to clipboard

The total number of replications requested across all evaluation requests.

Link copied to clipboard

The total number of evaluation requests that were received.

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