public class ModifiedRandomDirection extends RandomDirection
Modified Random Direction movement model as described in: Elizabeth M. Royer, P. Michael Melliar-Smith, and Louise E. Moser, "An Analysis of the Optimum Node Density for Ad hoc Mobile Networks"
Similar to RandomDirection, except nodes will not move all the way
to the edge. Instead they will pick a random direction and move in that
direction for a random distance before pausing and picking another
direction.
comBus, DEF_SPEEDS, DEF_WAIT_TIMES, host, maxSpeed, maxWaitTime, minSpeed, minWaitTime, MOVEMENT_MODEL_NS, rng, RNG_SEED, SPEED, WAIT_TIME, WORLD_SIZE| Constructor and Description |
|---|
ModifiedRandomDirection(ModifiedRandomDirection other) |
ModifiedRandomDirection(Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
getTravelFraction()
Returns the fraction of the path to follow towards the edge.
|
MovementModel |
replicate()
Creates a replicate of the movement model.
|
getInitialLocation, getPathgenerateSpeed, generateWaitTime, getComBus, getHost, getMaxX, getMaxY, isActive, nextPathAvailable, reset, setComBus, setHost, toStringpublic ModifiedRandomDirection(Settings settings)
public ModifiedRandomDirection(ModifiedRandomDirection other)
protected double getTravelFraction()
RandomDirection1.0 causes the node to
travel all the way to the edge, returning 0.5 would cause the
node to travel half way, etc.getTravelFraction in class RandomDirectionpublic MovementModel replicate()
MovementModelreplicate in class RandomDirection