Extractor

interface Extractor<out E : Any>

An object that is able to extract numeric informations from an Alchemist {@link Environment}, given the current {@link it.unibo.alchemist.core.Simulation} {@link Time}, the last {@link Reaction} executed and the current simulation step.

Inheritors

Properties

Link copied to clipboard
abstract val columnNames: List<String>

Functions

Link copied to clipboard
abstract fun <T> extractData(environment: Environment<T, *>, reaction: Actionable<T>?, time: Time, step: Long): Map<String, E>

Extracts properties from an environment. The returned map must either:

Link copied to clipboard
open fun <T> extractDataAsText(environment: Environment<T, *>, reaction: Actionable<T>?, time: Time, step: Long): Map<String, String>

Same as extractData, but specifically meant for textual outputs. Captures E to String conversions. The default implementation just runs a toString() conversion ver extractData's return value's values.