RunProtelisProgram

open fun RunProtelisProgram(environment: Environment<Any, P>, node: ProtelisNode<P>, reaction: Reaction<Any>, randomGenerator: RandomGenerator, program: String)

Parameters

environment

the environment

node

the node

reaction

the reaction

randomGenerator

the random engine

program

the Protelis program

Throws

if you are not authorized to load required classes


open fun RunProtelisProgram(environment: Environment<Any, P>, node: ProtelisNode<P>, reaction: Reaction<Any>, randomGenerator: RandomGenerator, program: String, retentionTime: Double)

Parameters

environment

the environment

node

the node

reaction

the reaction

randomGenerator

the random engine

program

the Protelis program

retentionTime

how long the messages will be stored. Pass NaN to mean that they should get eliminated upon node awake.

Throws

if you are not authorized to load required classes


open fun RunProtelisProgram(environment: Environment<Any, P>, node: ProtelisNode<P>, reaction: Reaction<Any>, randomGenerator: RandomGenerator, program: String, packetLossDistributionName: String, packetLossDistributionParameters: Array<Double>)

Parameters

environment

the environment

node

the node

reaction

the reaction

randomGenerator

the random engine

program

the Protelis program

packetLossDistributionName

the package loss probability, scaling with distance. This is the name of the RealDistribution to be used as follows: its PDF will be computed with density, and will be fed the distance between the current node and the neighbor; the generated probability will in turn be used to determine the probability of the package to be successfully delivered.

packetLossDistributionParameters

parameters that will be passed when building the packet loss distribution

Throws

if you are not authorized to load required classes


open fun RunProtelisProgram(environment: Environment<Any, P>, node: ProtelisNode<P>, reaction: Reaction<Any>, randomGenerator: RandomGenerator, program: String, retentionTime: Double, packetLossDistributionName: String, packetLossDistributionParameters: Array<Double>)
open fun RunProtelisProgram(environment: Environment<Any, P>, node: ProtelisNode<P>, reaction: Reaction<Any>, randomGenerator: RandomGenerator, program: ProtelisProgram, retentionTime: Double, packetLossDistributionName: String, packetLossDistributionParameters: Array<Double>)

Parameters

environment

the environment

node

the node

reaction

the reaction

randomGenerator

the random engine

program

the Protelis program

retentionTime

how long the messages will be stored. Pass NaN to mean that they should get eliminated upon node awake.

packetLossDistributionName

the package loss probability, scaling with distance. This is the name of the RealDistribution to be used as follows: its PDF will be computed with density, and will be fed the distance between the current node and the neighbor; the generated probability will in turn be used to determine the probability of the package to be successfully delivered.

packetLossDistributionParameters

parameters that will be passed when building the packet loss distribution

Throws

if you are not authorized to load required classes


open fun RunProtelisProgram(environment: Environment<Any, P>, node: ProtelisNode<P>, reaction: Reaction<Any>, randomGenerator: RandomGenerator, program: String, retentionTime: Double, packetLossDistance: RealDistribution)

Parameters

environment

the environment

node

the node

reaction

the reaction

randomGenerator

the random engine

program

the Protelis program

retentionTime

how long the messages will be stored. Pass NaN to mean that they should get eliminated upon node awake.

packetLossDistance

the package loss probability, scaling with distance. This RealDistribution will be used as follows: its PDF will be computed with density, and will be fed the distance between the current node and the neighbor; the generated probability will in turn be used to determine the probability of the package to be successfully delivered. Can be null, in which case packets always arrive to neighbors.

Throws

if you are not authorized to load required classes