movement
Class StationaryMovement

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

public class StationaryMovement
extends MovementModel

A dummy stationary "movement" model where nodes do not move. Might be useful for simulations with only external connection events.


Field Summary
static int[] DEFAULT_LOC
          Default value for node location (if nothing else is specified)
static java.lang.String LOCATION_S
          Per node group setting for setting the location ("nodeLocation")
 
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
StationaryMovement(Settings s)
          Creates a new movement model based on a Settings object's settings.
StationaryMovement(StationaryMovement sm)
          Copy constructor.
 
Method Summary
 Coord getInitialLocation()
          Returns the only location of this movement model
 Path getPath()
          Returns a single coordinate path (using the only possible coordinate)
 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, getComBus, getMaxX, getMaxY, isActive, reset, setComBus, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCATION_S

public static final java.lang.String LOCATION_S
Per node group setting for setting the location ("nodeLocation")

See Also:
Constant Field Values

DEFAULT_LOC

public static final int[] DEFAULT_LOC
Default value for node location (if nothing else is specified)

Constructor Detail

StationaryMovement

public StationaryMovement(Settings s)
Creates a new movement model based on a Settings object's settings.

Parameters:
s - The Settings object where the settings are read from

StationaryMovement

public StationaryMovement(StationaryMovement sm)
Copy constructor.

Parameters:
sm - The StationaryMovement prototype
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

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