BatchEngine

class BatchEngine<T, P : Position<out P>> : Engine<T, P>

This class implements a simulation. It offers a wide number of static factories to ease the creation process.

Parameters

[Position] type

Constructors

Link copied to clipboard
constructor(environment: Environment<T, P>, scheduler: BatchedScheduler<T>, outputReplayStrategy: String = "aggregate")
constructor(environment: Environment<T, P>, scheduler: String, batchSizeOrEpsilon: Number, outputReplayStrategy: String = "aggregate")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun addOutputMonitor(op: OutputMonitor<T, P>)
Link copied to clipboard
Link copied to clipboard
open override fun getStep(): Long
Link copied to clipboard
open override fun getTime(): Time
Link copied to clipboard
open override fun goToStep(step: Long): CompletableFuture<Void>
Link copied to clipboard
open override fun goToTime(t: Time): CompletableFuture<Void>
Link copied to clipboard
open override fun neighborAdded(node: Node<T>, n: Node<T>)
Link copied to clipboard
open override fun neighborRemoved(node: Node<T>, n: Node<T>)
Link copied to clipboard
open override fun nodeAdded(node: Node<T>)
Link copied to clipboard
open override fun nodeMoved(node: Node<T>)
Link copied to clipboard
open override fun nodeRemoved(node: Node<T>, oldNeighborhood: Neighborhood<T>)
Link copied to clipboard
open override fun pause(): CompletableFuture<Void>
Link copied to clipboard
open override fun play(): CompletableFuture<Void>
Link copied to clipboard
open override fun reactionAdded(reactionToAdd: Actionable<T>)
Link copied to clipboard
open override fun reactionRemoved(reactionToRemove: Actionable<T>)
Link copied to clipboard
open override fun removeOutputMonitor(op: OutputMonitor<T, P>)
Link copied to clipboard
open override fun run()
Link copied to clipboard

Runs an existing Simulation in the current thread.

Link copied to clipboard
open override fun schedule(runnable: CheckedRunnable)
Link copied to clipboard
fun <T, P : Position<P>, Vector<P>> Simulation<T, P>.startSimulation(onceInitialized: (EuclideanEnvironment<T, P>) -> Unit = { }, atEachStep: (EuclideanEnvironment<T, P>, Actionable<T>?, Time, Long) -> Unit = { _, _, _, _ -> }, whenFinished: (EuclideanEnvironment<T, P>, Time, Long) -> Unit = { _, _, _ -> }, steps: Long = 10000): EuclideanEnvironment<T, P>

Run the simulation this environment owns.

Link copied to clipboard
open override fun terminate(): CompletableFuture<Void>
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun waitFor(next: Status, timeout: Long, tu: TimeUnit): Status