Class CognitiveAgentSeparation
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,it.unibo.alchemist.model.cognitive.GroupSteeringAction
,it.unibo.alchemist.model.cognitive.SteeringAction
,java.io.Serializable
public final class CognitiveAgentSeparation<T extends Object> extends AbstractGroupSteeringAction<T, Euclidean2DPosition, Euclidean2DTransformation>
Move the agent away from the pedestrians near to him.
-
-
Field Summary
Fields Modifier and Type Field Description private final Physics2DEnvironment<T>
environment
private final Double
maxWalk
-
Constructor Summary
Constructors Constructor Description CognitiveAgentSeparation(Physics2DEnvironment<T> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian)
-
Method Summary
Modifier and Type Method Description final Physics2DEnvironment<T>
getEnvironment()
CognitiveAgentSeparation<T>
cloneAction(Node<T> node, Reaction<T> reaction)
This method allows to clone this action on a new node. Euclidean2DPosition
nextPosition()
The position the owner of this action moves to when it is executed, in relative coordinates with respect to its current position. List<Node<T>>
group()
The list of pedestrians influencing this action. -
Methods inherited from class it.unibo.alchemist.model.cognitive.actions.AbstractSteeringAction
getMaxWalk, getNextPosition
-
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
-
CognitiveAgentSeparation
CognitiveAgentSeparation(Physics2DEnvironment<T> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian)
- Parameters:
environment
-the environment inside which the node moves.
reaction
-the reaction which executes this action.
pedestrian
-the owner of this action.
-
-
Method Detail
-
getEnvironment
final Physics2DEnvironment<T> getEnvironment()
-
cloneAction
CognitiveAgentSeparation<T> 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
-
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.
-
-
-
-