OutputMonitor

interface OutputMonitor<T, P : Position<out P>>

An observer of the simulation, for instance for its visualization.

Thread safety note: no specific policy is defined for the control flow executing the callbacks. A new thread could have been spawned, or the same flow of the simulation may execute them. This depends on the specific it.unibo.alchemist.core.Simulation implementation.

Type Parameters

T

concentration type

P

Inheritors

Functions

Link copied to clipboard
open fun finished(environment: Environment<T, P>, time: Time, step: Long)

Called once the whole simulation has finished, either because it reached its latest point or because the user stopped it, with the environment, the final time, and the last step.

Link copied to clipboard
open fun initialized(environment: Environment<T, P>)

Called as soon as the initialization phase of environment is completed.

Link copied to clipboard
open fun stepDone(environment: Environment<T, P>, reaction: Reaction<T>?, time: Time, step: Long)

Called every time a simulation step is done, with the environment, the last executed reaction (if any), the current time, and the current step.