movement
Class RandomWaypoint
java.lang.Object
movement.MovementModel
movement.RandomWaypoint
- Direct Known Subclasses:
- ClusterMovement
public class RandomWaypoint
- extends MovementModel
Random waypoint movement model. Creates zig-zag paths within the
simulation area.
Fields inherited from class movement.MovementModel |
comBus, DEF_SPEEDS, DEF_WAIT_TIMES, maxSpeed, maxWaitTime, minSpeed, minWaitTime, MOVEMENT_MODEL_NS, rng, RNG_SEED, SPEED, WAIT_TIME, WORLD_SIZE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RandomWaypoint
public RandomWaypoint(Settings settings)
RandomWaypoint
protected RandomWaypoint(RandomWaypoint rwp)
getInitialLocation
public Coord getInitialLocation()
- Returns a possible (random) placement for a host
- Specified by:
getInitialLocation
in class MovementModel
- Returns:
- Random position on the map
getPath
public Path getPath()
- Description copied from class:
MovementModel
- Returns a new path by this movement model or null if no new path could
be constructed at the moment (node should wait where it is). A new
path should not be requested before the destination of the previous
path has been reached.
- Specified by:
getPath
in class MovementModel
- Returns:
- A new path or null
replicate
public RandomWaypoint replicate()
- Description copied from class:
MovementModel
- Creates a replicate of the movement model.
- Specified by:
replicate
in class MovementModel
- Returns:
- A new movement model with the same settings as this model
randomCoord
protected Coord randomCoord()