-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.Action,it.unibo.alchemist.model.interfaces.NavigationAction,it.unibo.alchemist.model.interfaces.SteeringAction,java.io.Serializable
public class CognitiveAgentNavigationAction2D<T extends Object, L extends ConvexGeometricShape<Euclidean2DPosition, Euclidean2DTransformation>, R extends Object> extends AbstractNavigationAction<T, Euclidean2DPosition, Euclidean2DTransformation, L, R, ConvexPolygon, Euclidean2DPassage>
Implementation of a NavigationAction2D. This action accepts an Euclidean2DEnvironmentWithGraph whose graph contains ConvexPolygonal nodes and Euclidean2DPassages as edges.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classCognitiveAgentNavigationAction2D.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Euclidean2DEnvironmentWithGraph<?, T, ConvexPolygon, Euclidean2DPassage>environmentprivate Euclidean2DPositionpedestrianPositionprivate ConvexPolygoncurrentRoomprivate final Euclidean2DPositiondesiredPositionprivate final OrientingPedestrian<T, Euclidean2DPosition, Euclidean2DTransformation, L, R>pedestrianprivate final DoublemaxWalk
-
Constructor Summary
Constructors Constructor Description CognitiveAgentNavigationAction2D(Euclidean2DEnvironmentWithGraph<?, T, ConvexPolygon, Euclidean2DPassage> environment, Reaction<T> reaction, OrientingPedestrian<T, Euclidean2DPosition, Euclidean2DTransformation, L, R> pedestrian, Double wallRepulsionFactor)
-
Method Summary
Modifier and Type Method Description Euclidean2DEnvironmentWithGraph<?, T, ConvexPolygon, Euclidean2DPassage>getEnvironment()The environment the pedestrian is into. Euclidean2DPositiongetPedestrianPosition()The position of the pedestrian in the environment, this is cached and updated every time update is called so as to avoid potentially costly re-computations. UnitsetPedestrianPosition(Euclidean2DPosition pedestrianPosition)The position of the pedestrian in the environment, this is cached and updated every time update is called so as to avoid potentially costly re-computations. ConvexPolygongetCurrentRoom()The room (= environment's area) the pedestrian is into, this is cached and updated every time update is called so as to avoid potentially costly re-computations. UnitsetCurrentRoom(ConvexPolygon currentRoom)The room (= environment's area) the pedestrian is into, this is cached and updated every time update is called so as to avoid potentially costly re-computations. final Euclidean2DPositiongetDesiredPosition()final OrientingPedestrian<T, Euclidean2DPosition, Euclidean2DTransformation, L, R>getPedestrian()The owner of this action. DoublegetMaxWalk()UnitcrossDoor(Euclidean2DPassage door)Moves the pedestrian across the provided door, which must be among doorsInSight. Euclidean2DPositionnextPosition()The position the owner of this action moves to when it is executed, in relative coordinates with respect to its current position. -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractNavigationAction
cloneAction, getNextPosition, stop -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.CognitiveAgentNavigationAction2D
doorsInSight, moveToFinal, update -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractMoveNode
declareDependencyTo, getConcentration, getOutboundDependencies, nodeContains, removeConcentration, setConcentration, toString -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractSteeringAction
execute, getContext, getCurrentPosition, getEnvironment, getNodePosition, isAbsolute -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CognitiveAgentNavigationAction2D
CognitiveAgentNavigationAction2D(Euclidean2DEnvironmentWithGraph<?, T, ConvexPolygon, Euclidean2DPassage> environment, Reaction<T> reaction, OrientingPedestrian<T, Euclidean2DPosition, Euclidean2DTransformation, L, R> pedestrian, Double wallRepulsionFactor)
-
-
Method Detail
-
getEnvironment
Euclidean2DEnvironmentWithGraph<?, T, ConvexPolygon, Euclidean2DPassage> getEnvironment()
The environment the pedestrian is into.
-
getPedestrianPosition
Euclidean2DPosition getPedestrianPosition()
The position of the pedestrian in the environment, this is cached and updated every time update is called so as to avoid potentially costly re-computations.
-
setPedestrianPosition
Unit setPedestrianPosition(Euclidean2DPosition pedestrianPosition)
The position of the pedestrian in the environment, this is cached and updated every time update is called so as to avoid potentially costly re-computations.
-
getCurrentRoom
ConvexPolygon getCurrentRoom()
The room (= environment's area) the pedestrian is into, this is cached and updated every time update is called so as to avoid potentially costly re-computations.
-
setCurrentRoom
Unit setCurrentRoom(ConvexPolygon currentRoom)
The room (= environment's area) the pedestrian is into, this is cached and updated every time update is called so as to avoid potentially costly re-computations.
-
getDesiredPosition
final Euclidean2DPosition getDesiredPosition()
-
getPedestrian
final OrientingPedestrian<T, Euclidean2DPosition, Euclidean2DTransformation, L, R> getPedestrian()
The owner of this action.
-
getMaxWalk
Double getMaxWalk()
-
crossDoor
Unit crossDoor(Euclidean2DPassage door)
Moves the pedestrian across the provided door, which must be among doorsInSight.
-
nextPosition
Euclidean2DPosition nextPosition()
The position the owner of this action moves to when it is executed, in relative coordinates with respect to its current position.
-
-
-
-