Sim
Class RandomLocationManager

java.lang.Object
  extended by Sim.RandomLocationManager
All Implemented Interfaces:
LocationManager

public class RandomLocationManager
extends java.lang.Object
implements LocationManager

RandomLocationManager implements a LocationManager that will allow a node to move from a position to another random position and pause. After the pause it will continue to move to another random potion.


Constructor Summary
RandomLocationManager(java.lang.Double speed, java.lang.Integer area, Location start, java.lang.Integer seed)
          Constructs a location manager that will return paths to random locations.
 
Method Summary
 Location getLocation(double t)
          Returns the location produced by this manager at the given time t.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomLocationManager

public RandomLocationManager(java.lang.Double speed,
                             java.lang.Integer area,
                             Location start,
                             java.lang.Integer seed)
Constructs a location manager that will return paths to random locations.

Parameters:
start - a position to start
speed - the speed which the node is moving
Method Detail

getLocation

public Location getLocation(double t)
Returns the location produced by this manager at the given time t. The value of t passed in must be equal to or greater than the value of all previous t values passed into this method.

Specified by:
getLocation in interface LocationManager
Parameters:
t - time to get the location at
Returns:
non-null generated Location