CognitiveAgentWander

Produces a wandering steering action that simulates a random walk by targeting points on a circle centered at a given offset from the node and with a given radius.

The node's heading is set randomly and subsequent target points are chosen on a circumference around the heading with the specified offset and radius. The resulting target is constrained by the node's maximum walking distance.

Parameters

reaction

the reaction executing this action.

pedestrian

the owner of this action.

Type Parameters

T

the concentration type.

Constructors

Link copied to clipboard
constructor(environment: Physics2DEnvironment<T>, reaction: Reaction<T>, pedestrian: PedestrianProperty<T>, randomGenerator: RandomGenerator, offset: Double, radius: Double)

Properties

Link copied to clipboard
override val context: Context?
Link copied to clipboard
open val maxWalk: Double

The maximum distance the node can walk, this is a length.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun cloneAction(node: Node<T>, reaction: Reaction<T>): CognitiveAgentWander<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()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun nextPosition(): Euclidean2DPosition
Link copied to clipboard
infix fun Action<*>.shouldEqual(other: Action<*>)
Link copied to clipboard
open override fun target(): Euclidean2DPosition

Returns the absolute target position this action points to.

Link copied to clipboard
open fun targetDistanceTo(node: Node<T>, environment: Environment<T, Euclidean2DPosition>): Double

Computes the distance between this action's target and the given node within the provided environment.