SimulationService

abstract class SimulationService(val simulationRunCache: SimulationRunCacheIfc? = null) : SimulationServiceIfc(source)

Constructors

Link copied to clipboard
constructor(simulationRunCache: SimulationRunCacheIfc? = null)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun modelDescriptors(): List<ModelDescriptor>

The model descriptors associated with the models served by the service.

Link copied to clipboard
abstract fun modelIdentifiers(): Set<String>
Link copied to clipboard
open override fun runSimulation(modelInputs: ModelInputs): Result<SimulationRun>

Executes a single simulation run based on the given model input. The simulation will be based on an independent execution of the simulation model. There will be no caching or common random numbers used. If the simulation results in an error, an exception is returned with the error details as part of the Result instance.

Link copied to clipboard
open override fun runSimulations(evaluationRequest: EvaluationRequest): Map<ModelInputs, Result<SimulationRun>>

Executes multiple simulations based on the provided evaluation request and maps each request to a corresponding SimulationRun. Each request is processed individually, and the results of the simulations are stored as a key-value pair in the returned map. This default implementation runs all the requests sequentially based on the order within the evaluation request.

Link copied to clipboard
open override fun simulate(evaluationRequest: EvaluationRequest): Map<ModelInputs, Result<ResponseMap>>

Executes multiple simulations based on the provided evaluation request and maps each request to a corresponding ResponseMap. Each request is processed individually, and the results of the simulations are stored as a key-value pair in the returned map. If the input list is empty, an exception is thrown. This default implementation runs all the requests sequentially based on the order within the evaluation request.