Engine

open class Engine<T, P : Position<out P>?> : Simulation<T, P>

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

Parameters

<T>

concentration type

<P>

Inheritors

Constructors

Link copied to clipboard
constructor(environment: Environment<T, P>)
Builds a simulation for a given environment.
constructor(environment: Environment<T, P>, scheduler: Scheduler<T>)
Builds a simulation for a given environment.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open val status: Status

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun getEnvironment(): Environment<T, P>
Link copied to clipboard
abstract fun getError(): Optional<Throwable>
Link copied to clipboard
Returns output monitors.
Link copied to clipboard
abstract fun getStatus(): Status
Link copied to clipboard
open fun getStep(): Long
thread-safe.
Link copied to clipboard
open fun getTime(): Time
thread-safe.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun neighborAdded(node: Node<T>, n: Node<T>)
Link copied to clipboard
open fun neighborRemoved(node: Node<T>, n: Node<T>)
Link copied to clipboard
open fun nodeAdded(node: Node<T>)
Link copied to clipboard
open fun nodeMoved(node: Node<T>)
Link copied to clipboard
open fun nodeRemoved(node: Node<T>, oldNeighborhood: Neighborhood<T>)
Link copied to clipboard
pause.
Link copied to clipboard
play.
Link copied to clipboard
open fun reactionAdded(reactionToAdd: Actionable<T>)
Link copied to clipboard
open fun reactionRemoved(reactionToRemove: Actionable<T>)
Link copied to clipboard
Link copied to clipboard
open fun run()
run simulation.
Link copied to clipboard

Runs an existing Simulation in the current thread.

Link copied to clipboard
open 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
terminate.
Link copied to clipboard
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
open fun waitFor(next: Status, timeout: Long, tu: TimeUnit): Status