AlchemistExecutionContext

class AlchemistExecutionContext<P : Position<P>?> : AbstractExecutionContext<S> , SpatiallyEmbeddedDevice<D> , LocalizedDevice, TimeAwareDevice<D> (source)

Parameters

<P>

position type

Constructors

Link copied to clipboard
constructor(environment: Environment<Any, P>, localNode: Node<Any>, reaction: Reaction<Any>, random: RandomGenerator, networkManager: AlchemistNetworkManager)
constructor(environment: Environment<Any, P>, localNode: Node<Any>, protelisDevice: ProtelisDevice<P>, reaction: Reaction<Any>, random: RandomGenerator, networkManager: AlchemistNetworkManager)

Properties

Link copied to clipboard
Put this Molecule inside nodes that should compute distances using routes approximating them.
Link copied to clipboard
val randomGenerator: RandomGenerator
Link copied to clipboard
Put this Molecule inside nodes that should compute distances using routes.

Functions

Link copied to clipboard
fun <T, R> buildField(computeValue: (T) -> R, localValue: T): Field<R>
Link copied to clipboard
fun <T, R> buildFieldDeferred(computeValue: (T) -> R, currentLocal: T, toBeSent: Supplier<T>): Field<R>
Link copied to clipboard
fun commit()
Link copied to clipboard
open fun distanceTo(target: Int): Double
open fun distanceTo(target: DeviceUID): Double
Computes the distance between two nodes, through getDistanceBetweenNodes.
Link copied to clipboard
open fun equals(obj: Any): Boolean
Link copied to clipboard
open fun getCoordinates(): Tuple
Link copied to clipboard
Link copied to clipboard
open fun getDeltaTime(): Number
Link copied to clipboard
open fun getDevicePosition(): P
Link copied to clipboard
open fun getDeviceUID(): DeviceUID
Link copied to clipboard
Link copied to clipboard
fun getExecutionEnvironment(): ExecutionEnvironment
Link copied to clipboard
abstract fun <S> getPersistent(p: Supplier<S>): S
fun <P> getPersistent(ifAbsent: Supplier<P>): P
Link copied to clipboard
fun getStoredState(): Map<CodePath, Any>
Link copied to clipboard
fun getVariable(name: Reference): Any
Link copied to clipboard
open fun hashCode(): Int
Link copied to clipboard
open fun nbrDelay(): Field<Number>
Link copied to clipboard
open fun nbrLag(): Field<Number>
Link copied to clipboard
open fun nbrRange(): Field<Double>
Link copied to clipboard
open fun nbrVector(): Field<Tuple>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun putMultipleVariables(map: Map<Reference, out Any>)
Link copied to clipboard
fun putVariable(name: Reference, value: Any)
Link copied to clipboard
abstract fun restrictDomain(p: Field<out Any>): ExecutionContext
fun restrictDomain(f: Field<out Any>): S
Link copied to clipboard
Link copied to clipboard
open fun routingDistance(dest: Node<Any>): Double
open fun routingDistance(dest: Number): Double
open fun routingDistance(dest: Tuple): Double
Computes the distance along a map.
Link copied to clipboard
fun <T> runInNewStackFrame(id: Int, operation: (ExecutionContext) -> T): T
Link copied to clipboard
fun setGloballyAvailableReferences(knownFunctions: Map<Reference, out Any>)
Link copied to clipboard
Link copied to clipboard
fun setup()