public class MapRouteMovement extends MapBasedMovement implements SwitchableMovement
DijkstraPathFinder. There can be
different type of routes; see ROUTE_TYPE_S.| Modifier and Type | Field and Description |
|---|---|
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").
|
backAllowed, FILE_S, lastMapNode, MAP_BASE_MOVEMENT_NS, MAP_SELECT_S, maxPathLength, minPathLength, NROF_FILES_ScomBus, DEF_SPEEDS, DEF_WAIT_TIMES, host, maxSpeed, maxWaitTime, minSpeed, minWaitTime, MOVEMENT_MODEL_NS, rng, RNG_SEED, SPEED, WAIT_TIME, WORLD_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
MapRouteMovement(MapRouteMovement proto)
Copyconstructor.
|
|
MapRouteMovement(Settings settings)
Creates a new movement model based on a Settings object's settings.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getMap, getOkMapNodeTypes, isReady, selectRandomOkNode, setLocationgenerateSpeed, generateWaitTime, getComBus, getHost, getMaxX, getMaxY, isActive, nextPathAvailable, reset, setComBus, setHost, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisReady, setLocationpublic 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
public MapRouteMovement(Settings settings)
settings - The Settings object where the settings are read fromprotected MapRouteMovement(MapRouteMovement proto)
proto - The MapRouteMovement prototypepublic Path getPath()
MovementModelgetPath in class MapBasedMovementpublic Coord getInitialLocation()
getInitialLocation in class MapBasedMovementpublic Coord getLastLocation()
SwitchableMovementgetLastLocation in interface SwitchableMovementgetLastLocation in class MapBasedMovementpublic MapRouteMovement replicate()
MovementModelreplicate in class MapBasedMovementpublic java.util.List<MapNode> getStops()