Deployment Context
DSL scope for configuring a single node during a deployment.
A DeploymentContext is typically entered once per deployed position, and provides:
the target position being deployed;
utilities to create and attach reactions (optionally configuring actions/conditions);
utilities to initialize node contents and attach NodeProperty instances.
Most operations rely on Kotlin context receivers, so the relevant Incarnation, Environment, RandomGenerator, and Node instances are expected to be available in the surrounding scope.
Type Parameters
the concentration type used by the simulation.
the position type used by the environment.
Properties
Functions
open fun contents(block: context(Incarnation<T, P>) ContentContext.() -> Unit)
Configures the initial contents of the current node.
Attaches a NodeProperty to the current node.
open fun program(program: String? = null, timeDistribution: Any? = null, block: context(Reaction<T>) ActionableContext.() -> Unit = { })
Convenience utility to create and register a reaction on the current node.
Enters a TimeDistributionContext bound to the provided timeDistribution.
open fun withTimeDistribution(parameter: Any? = null, block: context(TimeDistribution<T>) TimeDistributionContext<T, P>.() -> Unit)
Enters a TimeDistributionContext using a time distribution derived from parameter.