Class RandomWaypoint

java.lang.Object
casa.lepton.walk.RandomWaypoint
All Implemented Interfaces:
Walk

public class RandomWaypoint extends Object implements Walk
An instance of type RandomWaypoint defines a mobility model for a random walk that complies with the so-called Random Waypoint patterns.
  • Field Details

    • area

      public casa.util.geom.AreaCar area
    • minWait

      public long minWait
    • maxWait

      public long maxWait
    • minSpeed

      public double minSpeed
    • maxSpeed

      public double maxSpeed
    • random

      public Random random
  • Constructor Details

    • RandomWaypoint

      public RandomWaypoint(casa.util.geom.AreaCar area, long minWait, long maxWait, double minSpeed, double maxSpeed, Random random)
  • Method Details

    • getDefault

      public static RandomWaypoint getDefault(OppNodeProperties props)
      Creates and returns an instance of RandomWaypoint, using system properties (if defined) in order to initialize this object, and using default values otherwise.
      Returns:
      a RandomWaypoint object, initialized using either system properties or default values
    • getWalker

      public Walker getWalker(long time, String nodeId)
      Description copied from interface: Walk
      Returns a new Walker that will move according to the mobility model implemented in this instance of Walk.
      Specified by:
      getWalker in interface Walk
      Parameters:
      time - the time of creation of this walker
      Returns:
      a new Walker, whose mobility starts at the specified time
    • getArea

      public casa.util.geom.AreaCar getArea()
      Description copied from interface: Walk
      Returns the area in which this walk is defined.
      Specified by:
      getArea in interface Walk
      Returns:
      the AreaCar in which this walk is defined
    • toString

      public String toString()
      Returns a String representation of this RandomWaypoint object.
      Overrides:
      toString in class Object
      Returns:
      a String representation of this object