|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmovement.MovementModel
movement.MapBasedMovement
movement.CarMovement
public class CarMovement
The CarMovement class representing the car movement submodel
Field Summary |
---|
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 | |
---|---|
CarMovement(CarMovement proto)
Construct a new CarMovement instance from a prototype |
|
CarMovement(Settings settings)
Car movement constructor |
Method Summary | |
---|---|
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 |
Methods inherited from class movement.MapBasedMovement |
---|
getInitialLocation, getLastLocation, getMap, getOkMapNodeTypes, replicate, 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 |
---|
getLastLocation, setLocation |
Constructor Detail |
---|
public CarMovement(Settings settings)
settings
- public CarMovement(CarMovement proto)
proto
- Method Detail |
---|
public void setNextRoute(Coord nodeLocation, Coord nodeDestination)
setNextRoute
in interface TransportMovement
nodeLocation
- nodeDestination
- public Path getPath()
MovementModel
getPath
in class MapBasedMovement
public boolean isReady()
SwitchableMovement
isReady
in interface SwitchableMovement
isReady
in class MapBasedMovement
SwitchableMovement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |