AlchemistExecutionContext

class AlchemistExecutionContext<P : Position<P>?> : AbstractExecutionContext<AlchemistExecutionContext<P>> , SpatiallyEmbeddedDevice<Double> , LocalizedDevice, TimeAwareDevice

Parameters

<P>

position type

Constructors

Link copied to clipboard
open fun AlchemistExecutionContext(environment: Environment<Any, P>, localNode: ProtelisNode<P>, reaction: Reaction<Any>, random: RandomGenerator, networkManager: AlchemistNetworkManager)

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
open fun getCurrentTime(): Number
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
open fun getEnvironmentAccess(): Environment<Any, P>
Link copied to clipboard
fun getExecutionEnvironment(): ExecutionEnvironment
Link copied to clipboard
fun <S> getPersistent(ifAbsent: Supplier<S>): S
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<Double>
Link copied to clipboard
open fun nbrRange(): Field<Double>
Link copied to clipboard
open fun nbrVector(): Field<Tuple>
Link copied to clipboard
fun newCallStackFrame(id: Array<Byte>)
Link copied to clipboard
open fun nextRandomDouble(): Double
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
fun restrictDomain(f: Field<out Any>): S
abstract fun restrictDomain(p: Field<out Any>): ExecutionContext
Link copied to clipboard
fun returnFromCallFrame()
Link copied to clipboard
open fun routingDistance(dest: GeoPosition): Double
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
fun setPersistent(o: Any)
Link copied to clipboard
fun setup()

Properties

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