Class CognitiveAgentAvoidLayer
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.Action
,it.unibo.alchemist.model.cognitive.SteeringAction
,java.io.Serializable
public final class CognitiveAgentAvoidLayer extends AbstractLayerAction
Move the node towards positions of the environment with a low concentration of the target molecule.
-
-
Constructor Summary
Constructors Constructor Description CognitiveAgentAvoidLayer(Euclidean2DEnvironment<Number> environment, Reaction<Number> reaction, PedestrianProperty<Number> pedestrian, Molecule targetMolecule, Double viewDepth)
CognitiveAgentAvoidLayer(Euclidean2DEnvironment<Number> environment, Reaction<Number> reaction, PedestrianProperty<Number> pedestrian, Molecule targetMolecule)
-
Method Summary
Modifier and Type Method Description CognitiveAgentAvoidLayer
cloneAction(Node<Number> node, Reaction<Number> reaction)
This method allows to clone this action on a new node. Euclidean2DPosition
nextPosition()
-
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
-
CognitiveAgentAvoidLayer
CognitiveAgentAvoidLayer(Euclidean2DEnvironment<Number> environment, Reaction<Number> reaction, PedestrianProperty<Number> pedestrian, Molecule targetMolecule, Double viewDepth)
- Parameters:
environment
-the environment inside which the node moves.
reaction
-the reaction which executes this action.
pedestrian
-the owner of this action.
targetMolecule
-the {@link Molecule} you want to know the concentration in the different positions of the environment.
viewDepth
-the depth of view of the node, defaults to infinity.
-
CognitiveAgentAvoidLayer
CognitiveAgentAvoidLayer(Euclidean2DEnvironment<Number> environment, Reaction<Number> reaction, PedestrianProperty<Number> pedestrian, Molecule targetMolecule)
- Parameters:
environment
-the environment inside which the node moves.
reaction
-the reaction which executes this action.
pedestrian
-the owner of this action.
targetMolecule
-the {@link Molecule} you want to know the concentration in the different positions of the environment.
-
-
Method Detail
-
cloneAction
CognitiveAgentAvoidLayer cloneAction(Node<Number> node, Reaction<Number> 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()
-
-
-
-