public class CarMovement extends MapBasedMovement implements SwitchableMovement, TransportMovement
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| Constructor and Description |
|---|
CarMovement(CarMovement proto)
Construct a new CarMovement instance from a prototype
|
CarMovement(Settings settings)
Car movement constructor
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
boolean |
isReady()
Checks if the movement model is finished doing its task and it's time to
switch to the next movement model.
|
void |
setNextRoute(Coord nodeLocation,
Coord nodeDestination)
Sets the next route to be taken
|
getInitialLocation, getLastLocation, getMap, getOkMapNodeTypes, replicate, selectRandomOkNode, setLocationgenerateSpeed, generateWaitTime, getComBus, getHost, getMaxX, getMaxY, isActive, nextPathAvailable, reset, setComBus, setHost, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLastLocation, setLocationpublic CarMovement(Settings settings)
settings - public CarMovement(CarMovement proto)
proto - public void setNextRoute(Coord nodeLocation, Coord nodeDestination)
setNextRoute in interface TransportMovementnodeLocation - nodeDestination - public Path getPath()
MovementModelgetPath in class MapBasedMovementpublic boolean isReady()
SwitchableMovementisReady in interface SwitchableMovementisReady in class MapBasedMovementSwitchableMovement