ProtelisIncarnation

Parameters

position type

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Constants and utilities for the Protelis incarnation.

Link copied to clipboard
class ProtectedExecutionEnvironment(node: Node<*>) : ExecutionEnvironment

An org.protelis.vm.ExecutionEnvironment that can read and shadow the content of a Node, but cannot modify it. This is used to prevent badly written properties from interacting with the simulation flow.

Functions

Link copied to clipboard
open override fun createAction(randomGenerator: RandomGenerator, environment: Environment<Any, P>, node: Node<Any>?, reaction: Reaction<Any>, additionalParameters: Any?): Action<Any>

Creates an Action hosted by reaction, and by node (if any), in environment, using randomGenerator and parsing additionalParameters.

Link copied to clipboard
open override fun createConcentration(descriptor: Any? = null): Any

Evaluates descriptor as a Protelis program, falling back to descriptor itself if it is not a valid program. Molecules declared without a value get an empty Protelis ProtelisOption, as Protelis never accepts null.

Link copied to clipboard
open override fun createCondition(randomGenerator: RandomGenerator, environment: Environment<Any, P>, node: Node<Any>?, reaction: Reaction<Any>, additionalParameters: Any?): Condition<Any>

Creates a Condition hosted by reaction, and by node (if any), in environment, using randomGenerator and parsing additionalParameters.

Link copied to clipboard
open override fun createMolecule(s: String): Molecule

Parses s into a Molecule.

Link copied to clipboard
open override fun createNode(randomGenerator: RandomGenerator, environment: Environment<Any, P>, parameter: Any?): Node<Any>

Creates a Node for environment, using randomGenerator and parsing parameter.

Link copied to clipboard
open override fun createNodeReaction(randomGenerator: RandomGenerator, environment: Environment<Any, P>, node: Node<Any>, timeDistribution: TimeDistribution<Any>, parameter: Any?): NodeReaction<Any>

Creates a NodeReaction hosted by node in environment, scheduled by timeDistribution, using randomGenerator and parsing parameter.

Link copied to clipboard
open override fun createReaction(randomGenerator: RandomGenerator, environment: Environment<Any, P>, parameter: Any?): Reaction<Any>

Creates an environment-level Reaction in environment, using randomGenerator and parsing parameter.

Link copied to clipboard
open override fun createTimeDistribution(randomGenerator: RandomGenerator, environment: Environment<Any, P>, node: Node<Any>?, parameter: Any?): TimeDistribution<Any>

Creates a TimeDistribution for a reaction hosted by node (if any) in environment, using randomGenerator and parsing parameter.

Link copied to clipboard
open override fun readConcentration(node: Node<Any>, molecule: Molecule, property: String): Double

Extracts a numeric value from node, given a molecule and a property. Returns Double.NaN if a numeric value is not deducible.

Link copied to clipboard
open override fun toString(): String