movement
Class LinearFormation

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

public class LinearFormation
extends MovementModel

A stationary "movement" model where nodes do not move but are in linear formation (i.e., in a line).


Field Summary
static java.lang.String END_LOCATION_S
          Per node group setting for defining the end coordinates of the line ("endLocation")
static java.lang.String LINEAR_FORMATION_NS
          Name space of the settings (append to group name space)
static java.lang.String START_LOCATION_S
          Per node group setting for defining the start coordinates of the line ("startLocation")
 
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
LinearFormation(LinearFormation lf)
          Copy constructor.
LinearFormation(Settings s)
          Creates a new movement model based on a Settings object's settings.
 
Method Summary
 Coord getInitialLocation()
          Returns the the location of the node in the formation
 Path getPath()
          Returns a single coordinate path (using the only possible coordinate)
 double nextPathAvailable()
          Returns Double.MAX_VALUE (no paths available)
 LinearFormation 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

LINEAR_FORMATION_NS

public static final java.lang.String LINEAR_FORMATION_NS
Name space of the settings (append to group name space)

See Also:
Constant Field Values

START_LOCATION_S

public static final java.lang.String START_LOCATION_S
Per node group setting for defining the start coordinates of the line ("startLocation")

See Also:
Constant Field Values

END_LOCATION_S

public static final java.lang.String END_LOCATION_S
Per node group setting for defining the end coordinates of the line ("endLocation")

See Also:
Constant Field Values
Constructor Detail

LinearFormation

public LinearFormation(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

LinearFormation

public LinearFormation(LinearFormation lf)
Copy constructor.

Parameters:
lf - The LinearFormation prototype
Method Detail

getInitialLocation

public Coord getInitialLocation()
Returns the the location of the node in the formation

Specified by:
getInitialLocation in class MovementModel
Returns:
the the location of the node in the formation

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()
Returns Double.MAX_VALUE (no paths available)

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

replicate

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