Time Distribution Context
DSL scope for defining one or more Reactions that share a common TimeDistribution.
This scope is meant to be used via Kotlin context receivers: a TimeDistribution (and, for some operations, additional objects such as Node, Incarnation, Environment, and RandomGenerator) must be available in the surrounding context.
The provided helpers support two common workflows:
creating a Reaction from an incarnation-specific program descriptor and registering it on the current Node.
In both cases, an optional configuration block can be provided to attach it.unibo.alchemist.model.Actions and it.unibo.alchemist.model.Conditions via ActionableContext.
Properties
Provides access to the current TimeDistribution context receiver.
Functions
open fun program(program: String?, block: context(Reaction<T>) ActionableContext.() -> Unit = { }): ERROR CLASS: Recursive implicit type
Creates a Reaction from an incarnation-specific program descriptor and registers it on the current Node.