test
Class StationaryMovement

java.lang.Object
  extended by movement.MovementModel
      extended by test.StationaryMovement

public class StationaryMovement
extends MovementModel

A dummy stationary "movement" model where nodes do not move for testing purposes


Field Summary
 
Fields inherited from class movement.MovementModel
DEF_SPEEDS, DEF_WAIT_TIMES, MOVEMENT_MODEL_NS, rng, RNG_SEED, SPEED, WAIT_TIME, WORLD_SIZE
 
Constructor Summary
StationaryMovement(Coord location)
           
 
Method Summary
 Coord getInitialLocation()
          Returns the only location of this movement model
 Path getPath()
          Returns a single coordinate path (using the only possible coordinate)
 boolean isActive()
          Returns true if this node is active at the moment (false if not)
 double nextPathAvailable()
          Returns a sim time when the next path is available.
 StationaryMovement replicate()
          Creates a replicate of the movement model.
 
Methods inherited from class movement.MovementModel
generateSpeed, generateWaitTime, getMaxX, getMaxY, reset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StationaryMovement

public StationaryMovement(Coord location)
Method Detail

getInitialLocation

public Coord getInitialLocation()
Returns the only location of this movement model

Specified by:
getInitialLocation in class MovementModel
Returns:
the only location of this movement model

isActive

public boolean isActive()
Description copied from class: MovementModel
Returns true if this node is active at the moment (false if not)

Overrides:
isActive in class MovementModel
Returns:
true if this node is active (false if not)

getPath

public Path getPath()
Returns a single coordinate path (using the only possible coordinate)

Specified by:
getPath in class MovementModel
Returns:
a single coordinate path

nextPathAvailable

public double nextPathAvailable()
Description copied from class: MovementModel
Returns a sim time when the next path is available. This implementation returns a random time in future that is MovementModel.WAIT_TIME from now.

Overrides:
nextPathAvailable in class MovementModel
Returns:
The sim time when node should ask the next time for a path

replicate

public StationaryMovement 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