CSVAlchemistSimulationAdapter

open class CSVAlchemistSimulationAdapter(val seed: Int, val rootOutputFiles: File, filenameForSeed: (Int) -> String) : AlchemistSimulationAdapter

This is a AlchemistSimulationAdapter that loads an already executed simulation's data from a CSV file. The file is chosen by randomly selecting a seed from the currently available seeds list and then by applying the filenameForSeed function to the selected seed. The selected seed is then removed from the available seeds list.

Parameters

seed

the seed used to select the seed to use for the simulation, i.e. the seed given from MultiVesta

rootOutputFiles

the root folder where the CSV files are stored

filenameForSeed

the function that takes the selected seed and returns the filename corresponding to the simulation CSV file to load (the file must be in the rootOutputFiles folder)

Throws

if the available seeds list is empty

Inheritors

Constructors

Link copied to clipboard
constructor(seed: Int, rootOutputFiles: File, filenameForSeed: (Int) -> String)

Properties

Link copied to clipboard
Link copied to clipboard
val seed: Int

Functions

Link copied to clipboard
open override fun doStep()

Perform a simulation step. In Alchemist this means that the simulation will be advanced of the number of step needed to reach the next time.

Link copied to clipboard
open override fun getTime(): Double

Get the simulation time.

Link copied to clipboard
open override fun performWholeSimulation()

Perform the whole simulation.

Link copied to clipboard
open override fun rval(obsId: Int): Double
open override fun rval(obs: String): Double

Get the value for the given observation.