DestinationReaching

open class DestinationReaching<T, L : Euclidean2DConvexShape, R>(action: NavigationAction2D<T, L, R, ConvexPolygon, Euclidean2DPassage>, knownDestinations: List<Euclidean2DPosition>, unknownDestinations: List<Euclidean2DPosition>) : GoalOrientedExploring<T, L, R>

A NavigationStrategy allowing to reach a (static) destination. The client can specify a list of knownDestinations (see Pursuing) and unknownDestinations (see GoalOrientedExploring). The pedestrian will try to reach the closest known destination for which a valid path leading there is known, but in case another destination is found along the way (either known or unknown), the latter will be approached instead of the chosen known destination. To put it in another way, this behavior mixes KnownDestinationReaching and GoalOrientedExploring.

Parameters

T

the concentration type.

L

the type of landmarks of the pedestrian's cognitive map.

R

the type of edges of the pedestrian's cognitive map, representing the Relations between landmarks.

Constructors

Link copied to clipboard
fun DestinationReaching(action: NavigationAction2D<T, L, R, ConvexPolygon, Euclidean2DPassage>, knownDestinations: List<Euclidean2DPosition>, unknownDestinations: List<Euclidean2DPosition> = emptyList())

Functions

Link copied to clipboard
open override fun inNewRoom(newRoom: ConvexPolygon)

This is called whenever the pedestrian enters a new room.

Link copied to clipboard
open fun inUnexpectedNewRoom(previousRoom: ConvexPolygon, expectedNewRoom: ConvexPolygon, actualNewRoom: ConvexPolygon)

This is called in place of inNewRoom when the pedestrian ends up in an unexpected room while moving. By default, unexpected rooms are treated just like expected ones.

Properties

Link copied to clipboard
open override val action: NavigationAction2D<T, L, R, ConvexPolygon, Euclidean2DPassage>

The NavigationAction used to navigate the environment.