Class CognitiveAgentWander

  • 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 CognitiveAgentWander<T extends Object>
    extends AbstractSteeringActionWithTarget<T, Euclidean2DPosition, Euclidean2DTransformation>
                        

    Give the impression of a random walk through the environment targeting an ever changing pseudo-randomly point of a circumference at a given distance and with a given radius from the current node position.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Double maxWalk
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Euclidean2DPosition nextPosition()
      CognitiveAgentWander<T> 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.actions.AbstractSteeringActionWithTarget

        target
      • 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

      • CognitiveAgentWander

        CognitiveAgentWander(Physics2DEnvironment<T> environment, Reaction<T> reaction, PedestrianProperty<T> pedestrian, RandomGenerator randomGenerator, Double offset, Double radius)
        Parameters:
        environment -
        the environment inside which the node moves.
        pedestrian -
        the owner of this action.
        randomGenerator -
        the simulation {@link RandomGenerator}.
        offset -
        the distance from the node position of the center of the circle.
        radius -
        the radius of the circle.
    • Method Detail

      • cloneAction

         CognitiveAgentWander<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