createProblemEvaluator

fun createProblemEvaluator(problemDefinition: ProblemDefinition, modelBuilder: ModelBuilderIfc, modelConfiguration: Map<String, String>? = null): Evaluator(source)

Creates an instance of an Evaluator for a given problem definition and simulation model which uses a memory-based solution cache to improve the efficiency of evaluations. The simulation execution is based on a SimulationProvider, which runs locally in the same thread as the evaluator. During the evaluation process the same model is used repeatedly.

Return

An Evaluator instance configured with the specified problem definition, simulation provider, and a memory-based solution cache.

Parameters

problemDefinition

Represents the definition of the problem, including the objectives, constraints, and other domain-specific configurations required for evaluation.

modelBuilder

a builder instance responsible for constructing the simulation model used during problem evaluation.

modelConfiguration

A map of strings representing the model configuration. The key string should contain the necessary information for being able to use the paired string value. The stored string values could be anything. For example, the value could be a JSON string and the key provides information about how to process the JSON. The intent is that the map should be sufficient to build an appropriate Model instance. The map is optional. The function should return a model that is usable.

Throws

if the problem definition and the model are not input/response compatible, use ProblemDefinition.validateProblemDefinition to check.