|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmovement.MovementModel
movement.RandomWalk
public class RandomWalk
Random Walk movement model
Field Summary |
---|
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 |
Constructor Summary | |
---|---|
RandomWalk(Settings settings)
|
Method Summary | |
---|---|
Coord |
getInitialLocation()
Returns a possible (random) placement for a host |
Coord |
getLastLocation()
Get the last location the getPath() of this movement model has returned |
Path |
getPath()
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). |
boolean |
isReady()
Checks if the movement model is finished doing its task and it's time to switch to the next movement model. |
RandomWalk |
replicate()
Creates a replicate of the movement model. |
void |
setLocation(Coord lastWaypoint)
Tell the movement model what its current location is |
Methods inherited from class movement.MovementModel |
---|
generateSpeed, generateWaitTime, getComBus, getMaxX, getMaxY, isActive, nextPathAvailable, reset, setComBus, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RandomWalk(Settings settings)
Method Detail |
---|
public Coord getInitialLocation()
getInitialLocation
in class MovementModel
public Path getPath()
MovementModel
getPath
in class MovementModel
public RandomWalk replicate()
MovementModel
replicate
in class MovementModel
public Coord getLastLocation()
SwitchableMovement
getLastLocation
in interface SwitchableMovement
public void setLocation(Coord lastWaypoint)
SwitchableMovement
setLocation
in interface SwitchableMovement
public boolean isReady()
SwitchableMovement
isReady
in interface SwitchableMovement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |