public class GridLocation extends MovementModel
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GRIDLOC_NS
Sub name space for the grid location settings ("GridLocation")
|
static java.lang.String |
LOCATION_S
Location of the first node (grid's upper left corner)
-setting ("location").
|
static java.lang.String |
OFFSET_S
Maximum random offset for the location of the nodes
-setting ("randomOffset").
|
static java.lang.String |
ROWS_S
How many rows of nodes there are -setting ("rows").
|
static java.lang.String |
SPACING_S
Space between the nodes -setting ("spacing")
|
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 |
|---|
GridLocation(GridLocation proto)
Copy constructor.
|
GridLocation(Settings s)
Creates a new movement model based on a Settings object's settings.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
GridLocation |
replicate()
Creates a replicate of the movement model.
|
generateSpeed, generateWaitTime, getComBus, getHost, getMaxX, getMaxY, isActive, reset, setComBus, setHost, toStringpublic static final java.lang.String GRIDLOC_NS
public static final java.lang.String ROWS_S
public static final java.lang.String SPACING_S
public static final java.lang.String OFFSET_S
public static final java.lang.String LOCATION_S
public GridLocation(Settings s)
s - The Settings object where the settings are read frompublic GridLocation(GridLocation proto)
proto - The movement model prototypepublic Coord getInitialLocation()
getInitialLocation in class MovementModelpublic Path getPath()
getPath in class MovementModelpublic double nextPathAvailable()
MovementModelMovementModel.WAIT_TIME from now.nextPathAvailable in class MovementModelpublic GridLocation replicate()
MovementModelreplicate in class MovementModel