public class LinearMovement extends MovementModel
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
END_LOCATION_S
Per node group setting for defining the end coordinates of
the line ("endLocation")
|
static java.lang.String |
INIT_LOC_S
Nodes' initial location type
0: random (evenly distributed)
1: evenly spaced
|
static java.lang.String |
LINEAR_MOVEMENT_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")
|
static java.lang.String |
TARGET_S
Nodes' target (where they're heading) type
0: random point on the line
1: far-end of the line
|
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 |
|---|
LinearMovement(LinearMovement ilm)
Copy constructor.
|
LinearMovement(Settings s)
Creates a new movement model based on a Settings object's settings.
|
| Modifier and Type | Method and Description |
|---|---|
Coord |
getInitialLocation()
Returns the the location of the node in the formation
|
int |
getMaxX()
Returns the largest X coordinate value this model uses
|
int |
getMaxY()
Returns the largest Y coordinate value this model uses
|
Path |
getPath()
Returns a single coordinate path (using the only possible coordinate)
|
double |
nextPathAvailable()
Returns Double.MAX_VALUE (no paths available)
|
LinearMovement |
replicate()
Creates a replicate of the movement model.
|
generateSpeed, generateWaitTime, getComBus, getHost, isActive, reset, setComBus, setHost, toStringpublic static final java.lang.String LINEAR_MOVEMENT_NS
public static final java.lang.String START_LOCATION_S
public static final java.lang.String END_LOCATION_S
public static final java.lang.String INIT_LOC_S
public static final java.lang.String TARGET_S
public LinearMovement(Settings s)
s - The Settings object where the settings are read frompublic LinearMovement(LinearMovement ilm)
lf - The LinearFormation prototypepublic Coord getInitialLocation()
getInitialLocation in class MovementModelpublic Path getPath()
getPath in class MovementModelpublic double nextPathAvailable()
nextPathAvailable in class MovementModelpublic int getMaxX()
MovementModelgetMaxX in class MovementModelpublic int getMaxY()
MovementModelgetMaxY in class MovementModelpublic LinearMovement replicate()
MovementModelreplicate in class MovementModel