Class ConstantSpace

  • All Implemented Interfaces:
    it.unibo.alchemist.model.movestrategies.SpeedSelectionStrategy , java.io.Serializable

    
    public final class ConstantSpace<T, P extends Position<P>>
     implements SpeedSelectionStrategy<T, P>
                        

    This strategy makes the node move every time of a fixed amount of space.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ConstantSpace(double step)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      double getNodeMovementLength(P target)
      • Methods inherited from class it.unibo.alchemist.model.movestrategies.SpeedSelectionStrategy

        cloneIfNeeded
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConstantSpace

        ConstantSpace(double step)
        Parameters:
        step - the step length (in meters, or the unit you are using in your simulation)
    • Method Detail

      • getNodeMovementLength

         double getNodeMovementLength(P target)
        Parameters:
        target - the Position describing where the Node is directed
        Returns:

        the current node's movement. The returned value represents a length.