|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmovement.MovementModel
movement.MapBasedMovement
movement.MapRouteMovement
public class MapRouteMovement
Map based movement model that uses predetermined paths within the map area.
Nodes using this model (can) stop on every route waypoint and find their
way to next waypoint using DijkstraPathFinder. There can be
different type of routes; see ROUTE_TYPE_S.
| Field Summary | |
|---|---|
static java.lang.String |
ROUTE_FILE_S
Per node group setting used for selecting a route file ("routeFile") |
static java.lang.String |
ROUTE_FIRST_STOP_S
Per node group setting for selecting which stop (counting from 0 from the start of the route) should be the first one. |
static java.lang.String |
ROUTE_TYPE_S
Per node group setting used for selecting a route's type ("routeType"). |
| Fields inherited from class movement.MapBasedMovement |
|---|
backAllowed, FILE_S, lastMapNode, MAP_BASE_MOVEMENT_NS, MAP_SELECT_S, maxPathLength, minPathLength, NROF_FILES_S |
| 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 | |
|---|---|
protected |
MapRouteMovement(MapRouteMovement proto)
Copyconstructor. |
|
MapRouteMovement(Settings settings)
Creates a new movement model based on a Settings object's settings. |
| Method Summary | |
|---|---|
Coord |
getInitialLocation()
Returns the first stop on the route |
Coord |
getLastLocation()
Get the last location the getPath() of this movement model has returned |
Path |
getPath()
Returns a new path by this movement model or null if no new path could be constructed at the moment (node should wait where it is). |
java.util.List<MapNode> |
getStops()
Returns the list of stops on the route |
MapRouteMovement |
replicate()
Creates a replicate of the movement model. |
| Methods inherited from class movement.MapBasedMovement |
|---|
getMap, getOkMapNodeTypes, isReady, selectRandomOkNode, setLocation |
| Methods inherited from class movement.MovementModel |
|---|
generateSpeed, generateWaitTime, getComBus, getMaxX, getMaxY, isActive, nextPathAvailable, reset, setComBus, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface movement.SwitchableMovement |
|---|
isReady, setLocation |
| Field Detail |
|---|
public static final java.lang.String ROUTE_FILE_S
public static final java.lang.String ROUTE_TYPE_S
MapRoute class.
public static final java.lang.String ROUTE_FIRST_STOP_S
| Constructor Detail |
|---|
public MapRouteMovement(Settings settings)
settings - The Settings object where the settings are read fromprotected MapRouteMovement(MapRouteMovement proto)
proto - The MapRouteMovement prototype| Method Detail |
|---|
public Path getPath()
MovementModel
getPath in class MapBasedMovementpublic Coord getInitialLocation()
getInitialLocation in class MapBasedMovementpublic Coord getLastLocation()
SwitchableMovement
getLastLocation in interface SwitchableMovementgetLastLocation in class MapBasedMovementpublic MapRouteMovement replicate()
MovementModel
replicate in class MapBasedMovementpublic java.util.List<MapNode> getStops()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||