CognitiveAgentReachKnownDestination

A cognitive navigation action that pursues known destinations using ReachKnownDestination strategy.

Parameters

environment

the environment hosting the node

reaction

the reaction executing this action

pedestrian

the owner pedestrian property

destinations

vararg coordinates representing known destinations

Type Parameters

T

the concentration type

L

the landmark shape type used by the node's cognitive map

R

the relation/edge type used by the node's cognitive map

Constructors

Link copied to clipboard
constructor(environment: Euclidean2DEnvironmentWithGraph<*, T, ConvexPolygon, Euclidean2DPassage>, reaction: NodeReaction<T>, pedestrian: PedestrianProperty<T>, vararg destinations: Number)

Properties

Link copied to clipboard
open override var currentRoom: ConvexPolygon?

The room (= environment's area) the navigatingNode is into, this is cached and updated every time update is called so as to avoid potentially costly re-computations.

Link copied to clipboard

The position the node wants to reach.

Link copied to clipboard

the Euclidean environment with navigation graph

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 navigatingNode: Node<T>

The owner of this action.

Link copied to clipboard
open lateinit override var pedestrianPosition: Euclidean2DPosition

The position of the navigatingNode in the environment, this is cached and updated every time update is called so as to avoid potentially costly re-computations.

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

The NodeReaction owning this action, hosted by targetNode.

Link copied to clipboard

Functions

Link copied to clipboard
override fun cloneAction(newReaction: Reaction<T>): Action<T>

Creates an equivalent action owned by newReaction, such as a reaction cloned onto a new node. An action targeting the host of its reaction targets the host of newReaction, which must then be a Node; an action targeting any other node keeps its target.

Link copied to clipboard
open override fun crossDoor(door: Euclidean2DPassage)

Moves the node across the provided door, which must be among the doors returned by doorsInSight.

Link copied to clipboard
open override fun doorsInSight(): List<Euclidean2DPassage>
Link copied to clipboard
open override fun execute()

Moves the node according to getNextPosition, in absolute or relative coordinates depending on isAbsolute.

Link copied to clipboard
Link copied to clipboard
open override fun moveToFinal(destination: Euclidean2DPosition)

Moves the node to the given final destination, which must be inside currentRoom.

Link copied to clipboard
open override fun nextPosition(): Euclidean2DPosition

Returns the target relative position the owner will move to when this action is executed. The position is relative to the owner's current position.

Link copied to clipboard
infix fun Action<*>.shouldEqual(other: Action<*>)
Link copied to clipboard
open fun stop()

Stops the node by moving it to its current position.

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

Updates the internal state but does not move the node.