ConstantDistanceRandomWalk

class ConstantDistanceRandomWalk<T>(node: Node<T>, reaction: Reaction<T>, environment: Environment<T, Euclidean2DPosition>, randomGenerator: ERROR CLASS: Symbol not found for RandomGenerator, distance: Double, speed: Double) : GenericRandomWalker<T>

Moves for distance toward a uniformly random chosen direction at a constant speed, then changes direction and walks another distance, and so on.

Automatically changes direction on impact with obstacles if the environment supports them.

Parameters

concentration type
environment

environment containing the node

node

the node to move

reaction

the reaction containing this action

randomGenerator

random number generator to use for the decisions

distance

the distance to travel before picking another one

speed

the speed

Constructors

Link copied to clipboard
constructor(node: Node<T>, reaction: Reaction<T>, environment: Environment<T, Euclidean2DPosition>, randomGenerator: ERROR CLASS: Symbol not found for RandomGenerator, distance: Double, speed: Double)

Properties

Link copied to clipboard
override val context: Context?
Link copied to clipboard
Link copied to clipboard
override val outboundDependencies: @EnhancedNullability org/danilopianini/util/ListSet<out it/unibo/alchemist/model/Dependency!>

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): ConstantDistanceRandomWalk<T>

This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

Link copied to clipboard
open fun execute()

Detects if the move is in absolute or relative coordinates, then calls the correct method on the Environment.

Link copied to clipboard