Package it. unibo. alchemist. testsupport
Functions
Link copied to clipboard
fun <T> createEmptyEnvironment(vararg outputMonitors: OutputMonitor<T, Euclidean2DPosition> = emptyArray()): Continuous2DEnvironment<T>
Content copied to clipboard
Builds an empty environment, building a simulation Engine, and binding them. Optionally, some OutputMonitors can be provided.
Link copied to clipboard
fun <T, P : Position<P>> InitializedEnvironment<T, P>.createSimulation(): Engine<T, P>
Content copied to clipboard
Builds a new Engine, adding a GlobalExporter with the required it.unibo.alchemist.loader.export.Exporters.
Link copied to clipboard
fun <T, P : Position<P>> loadAlchemist(simulationFile: String, variables: Map<String, *> = emptyMap<String, Nothing>()): InitializedEnvironment<T, P>
Content copied to clipboard
Prepares an InitializedEnvironment given a simulationFile and, optionally, the variables' bindings.
Link copied to clipboard
Link copied to clipboard
fun <T, P : Position<P>> Simulation<T, P>.runInCurrentThread(): Simulation<T, P>
Content copied to clipboard
Runs an existing Simulation in the current thread.
Link copied to clipboard
fun <T, P : Position<P>, Vector<P>> EuclideanEnvironment<T, P>.startSimulation(onceInitialized: (EuclideanEnvironment<T, P>) -> Unit = { }, atEachStep: (EuclideanEnvironment<T, P>, Reaction<T>?, Time, Long) -> Unit = { _, _, _, _ -> }, whenFinished: (EuclideanEnvironment<T, P>, Time, Long) -> Unit = { _, _, _ -> }, steps: Long = 10000): EuclideanEnvironment<T, P>
Content copied to clipboard
Run the simulation this environment owns.