CognitiveAgentNavigationAction2D

Implementation of a NavigationAction2D. This action accepts an Euclidean2DEnvironmentWithGraph whose graph contains ConvexPolygonal nodes and Euclidean2DPassages as edges.

Parameters

reaction

the reaction executing this action

pedestrian

the owner pedestrian property

wallRepulsionFactor

factor used to push nodes away from passage walls

Type Parameters

T

the concentration type

L

the type of landmarks in the node's cognitive map

R

the type of edges in the node's cognitive map representing relations

Inheritors

Constructors

Link copied to clipboard
constructor(environment: Euclidean2DEnvironmentWithGraph<*, T, ConvexPolygon, Euclidean2DPassage>, reaction: Reaction<T>, pedestrian: PedestrianProperty<T>, wallRepulsionFactor: Double = DEFAULT_WALL_REPULSION_FACTOR)

Types

Link copied to clipboard
object Companion

Contains the default constants.

Properties

Link copied to clipboard
override val context: Context?
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
Link copied to clipboard
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.

Functions

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

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 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 fun execute()
Link copied to clipboard
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
open fun stop()

Stops the node by moving it to its current position.

Link copied to clipboard
open fun update()

Updates the internal state but does not move the node.