-
- 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 abstract class AbstractNavigationAction<T extends Object, P extends Position<P>, Vector<P>, A extends GeometricTransformation<P>, L extends ConvexGeometricShape<P, A>, R extends Object, N extends ConvexGeometricShape<P, A>, E extends Object> extends AbstractSteeringAction<T, P, A> implements NavigationAction<T, P, A, L, R, N, E>
An abstract NavigationAction, taking care of properly moving the pedestrian in the environment while delegating the decision on where to move it to a NavigationStrategy.
-
-
Field Summary
Fields Modifier and Type Field Description private PpedestrianPositionprivate NcurrentRoomprivate final PdesiredPositionprivate final EnvironmentWithGraph<?, T, P, A, N, E>environmentprivate final OrientingPedestrian<T, P, A, L, R>pedestrianprivate final DoublemaxWalk
-
Constructor Summary
Constructors Constructor Description AbstractNavigationAction(EnvironmentWithGraph<?, T, P, A, N, E> environment, Reaction<T> reaction, OrientingPedestrian<T, P, A, L, R> pedestrian)
-
Method Summary
Modifier and Type Method Description PgetPedestrianPosition()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(P 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. NgetCurrentRoom()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(N 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 PgetDesiredPosition()EnvironmentWithGraph<?, T, P, A, N, E>getEnvironment()The environment the pedestrian is into. final OrientingPedestrian<T, P, A, L, R>getPedestrian()The owner of this action. DoublegetMaxWalk()List<E>doorsInSight()UnitmoveToFinal(P destination)Moves the pedestrian to the given final destination, which must be inside currentRoom. Unitupdate()Updates the internal state but does not move the pedestrian. -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractNavigationAction
cloneAction, crossDoor, getNextPosition, stop -
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, nextPosition -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getPedestrianPosition
P 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(P 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
N 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(N 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 P getDesiredPosition()
-
getEnvironment
EnvironmentWithGraph<?, T, P, A, N, E> getEnvironment()
The environment the pedestrian is into.
-
getPedestrian
final OrientingPedestrian<T, P, A, L, R> getPedestrian()
The owner of this action.
-
getMaxWalk
Double getMaxWalk()
-
doorsInSight
List<E> doorsInSight()
-
moveToFinal
Unit moveToFinal(P destination)
Moves the pedestrian to the given final destination, which must be inside currentRoom.
-
-
-
-