Class CognitiveAgentSeek2D
-
- 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 CognitiveAgentSeek2D<T extends Object, P extends Position2D<P>, Vector2D<P>, A extends Transformation<P>> extends AbstractSteeringAction<T, P, A> implements SteeringActionWithTarget<T, P>
CognitiveAgentSeek behavior in a bidimensional environment, delegated to CognitiveAgentFollowScalarField (this means the node tries to overtake others on its path, in general its movements are more sophisticated than CognitiveAgentSeek).
-
-
Constructor Summary
Constructors Constructor Description CognitiveAgentSeek2D(EuclideanEnvironment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, Number x, Number y)
CognitiveAgentSeek2D(EuclideanEnvironment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, P target)
-
Method Summary
Modifier and Type Method Description P
target()
The position the owner of this action moves towards, in absolute coordinates. P
nextPosition()
The position the owner of this action moves to when it is executed, in relative coordinates with respect to its current position. CognitiveAgentSeek2D<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.AbstractSteeringAction
getMaxWalk, 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
-
CognitiveAgentSeek2D
CognitiveAgentSeek2D(EuclideanEnvironment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, Number x, Number y)
-
CognitiveAgentSeek2D
CognitiveAgentSeek2D(EuclideanEnvironment<T, P> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, P target)
-
-
Method Detail
-
nextPosition
P nextPosition()
The position the owner of this action moves to when it is executed, in relative coordinates with respect to its current position.
-
cloneAction
CognitiveAgentSeek2D<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
-
-
-
-