Class CognitiveAgentArrive
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,it.unibo.alchemist.model.cognitive.SteeringAction
,it.unibo.alchemist.model.cognitive.SteeringActionWithTarget
,java.io.Serializable
public class CognitiveAgentArrive<T extends Object, P extends Position<P>, Vector<P>, A extends Transformation<P>> extends AbstractSteeringActionWithTarget<T, P, A>
Move the agent towards a target position. It is similar to CognitiveAgentSeek but attempts to arrive at the target position with a zero velocity.
-
-
Constructor Summary
Constructors Constructor Description CognitiveAgentArrive(Environment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, Double decelerationRadius, Double arrivalTolerance, Number coordinates)
CognitiveAgentArrive(Environment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, Double decelerationRadius, Double arrivalTolerance, P target)
-
Method Summary
Modifier and Type Method Description Double
getMaxWalk()
CognitiveAgentArrive<T, P, A>
cloneAction(Node<T> node, Reaction<T> reaction)
This method allows to clone this action on a new node. -
Methods inherited from class it.unibo.alchemist.model.cognitive.actions.AbstractSteeringActionWithTarget
nextPosition, target
-
Methods inherited from class it.unibo.alchemist.model.cognitive.actions.AbstractSteeringAction
getNextPosition
-
Methods inherited from class it.unibo.alchemist.model.cognitive.SteeringActionWithTarget
targetDistanceTo
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractAction
getOutboundDependencies, toString
-
Methods inherited from class it.unibo.alchemist.model.actions.AbstractMoveNode
execute, getContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CognitiveAgentArrive
CognitiveAgentArrive(Environment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, Double decelerationRadius, Double arrivalTolerance, Number coordinates)
-
CognitiveAgentArrive
CognitiveAgentArrive(Environment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, Double decelerationRadius, Double arrivalTolerance, P target)
- Parameters:
environment
-the environment inside which the node moves.
reaction
-the reaction which executes this action.
pedestrian
-the owner of this action.
decelerationRadius
-the distance from which the node starts to decelerate.
arrivalTolerance
-the distance at which the node is considered arrived to the target.
target
-the position the node moves towards.
-
-
Method Detail
-
getMaxWalk
Double getMaxWalk()
-
cloneAction
CognitiveAgentArrive<T, P, A> cloneAction(Node<T> node, Reaction<T> reaction)
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.
- Parameters:
node
-The node where to clone this {@link Action}
reaction
-The reaction to which the CURRENT action is assigned
- Returns:
the cloned action
-
-
-
-