|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmovement.MovementModel
movement.MapBasedMovement
movement.MapRouteMovement
movement.BusMovement
public class BusMovement
This class controls the movement of busses. It informs the bus control system the bus is registered with every time the bus stops.
| Field Summary |
|---|
| Fields inherited from class movement.MapRouteMovement |
|---|
ROUTE_FILE_S, ROUTE_TYPE_S |
| 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 |
|---|
DEF_SPEEDS, DEF_WAIT_TIMES, maxSpeed, maxWaitTime, minSpeed, minWaitTime, MOVEMENT_MODEL_NS, rng, RNG_SEED, SPEED, WAIT_TIME, WORLD_SIZE |
| Constructor Summary | |
|---|---|
BusMovement(BusMovement proto)
Create a new instance from a prototype |
|
BusMovement(Settings settings)
Creates a new instance of BusMovement |
|
| Method Summary | |
|---|---|
int |
getID()
Returns unique ID of the bus |
Coord |
getInitialLocation()
Returns a (random) coordinate that is between two adjacent MapNodes |
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). |
BusMovement |
replicate()
Creates a replicate of the movement model. |
| Methods inherited from class movement.MapRouteMovement |
|---|
getLastLocation, getStops |
| Methods inherited from class movement.MapBasedMovement |
|---|
getMap, getOkMapNodeTypes, isReady, selectRandomOkNode, setLocation |
| Methods inherited from class movement.MovementModel |
|---|
generateSpeed, generateWaitTime, getMaxX, getMaxY, isActive, nextPathAvailable, reset, 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 |
| Constructor Detail |
|---|
public BusMovement(Settings settings)
settings - public BusMovement(BusMovement proto)
proto - | Method Detail |
|---|
public Coord getInitialLocation()
MapBasedMovement
getInitialLocation in class MapRouteMovementpublic Path getPath()
MovementModel
getPath in class MapRouteMovementpublic BusMovement replicate()
MovementModel
replicate in class MapRouteMovementpublic int getID()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||