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: NodeReaction<T>, pedestrian: PedestrianProperty<T>, randomGenerator: RandomGenerator, offset: Double, radius: Double)

Properties

Link copied to clipboard
open override val environment: Physics2DEnvironment<T>

the physics environment in which the node moves.

Link copied to clipboard
open val maxWalk: Double

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

Link copied to clipboard
override val reaction: NodeReaction<T>
Link copied to clipboard

Functions

Link copied to clipboard
override fun cloneAction(newReaction: Reaction<T>): Action<T>
Link copied to clipboard
open override fun execute()
Link copied to clipboard
Link copied to clipboard
open override fun nextPosition(): Euclidean2DPosition
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.

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