NavigationAction

A SteeringAction allowing a node to navigate an environment consciously (for example, avoiding getting stuck in U-shaped obstacles). Names are inspired by indoor environments, but this interface also works for outdoor scenarios.

Type Parameters

T

the concentration type.

P

the Position and Vector type used by the space the node occupies.

A

the transformation type supported by the shapes in this space.

L

the type of landmarks in the node's cognitive map.

R

the type of edges in the node's cognitive map, representing relations between landmarks.

N

the type of navigation-area shapes provided by the environment.

E

the type of edges (passages) of the navigation graph provided by the environment.

Inheritors

Properties

Link copied to clipboard
abstract val currentRoom: N?

The room (environment area) the navigatingNode is in, if any.

Link copied to clipboard
abstract val environment: EnvironmentWithGraph<*, T, P, A, N, E>

The environment the navigatingNode is in.

Link copied to clipboard
abstract val navigatingNode: Node<T>

The owner of this action.

Link copied to clipboard

The navigatingNode's orienting property.

Link copied to clipboard
abstract val pedestrianPosition: P

The position of the navigatingNode in the environment.

Link copied to clipboard
abstract val reaction: Reaction<T>

The reaction owning this action. Its Reaction.host is the model entity hosting the action, which may differ from the node it targets, if any.

Functions

Link copied to clipboard
abstract 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
abstract fun crossDoor(door: E)

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

Link copied to clipboard
abstract fun doorsInSight(): List<E>

Returns the doors (passages/edges) the node can perceive.

Link copied to clipboard
abstract fun execute()

Applies this action to the model.

Link copied to clipboard
abstract fun moveToFinal(destination: P)

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

Link copied to clipboard
abstract fun nextPosition(): P

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.