movement
Class WorkingDayMovement

java.lang.Object
  extended by movement.MovementModel
      extended by movement.ExtendedMovementModel
          extended by movement.WorkingDayMovement

public class WorkingDayMovement
extends ExtendedMovementModel

This movement model makes use of several other movement models to simulate movement with daily routines. People wake up in the morning, go to work, go shopping or similar activities in the evening and finally go home to sleep.


Field Summary
static java.lang.String PROBABILITY_TO_GO_SHOPPING_SETTING
           
static java.lang.String PROBABILITY_TO_OWN_CAR_SETTING
           
 
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
WorkingDayMovement(Settings settings)
          Creates a new instance of WorkingDayMovement
WorkingDayMovement(WorkingDayMovement proto)
          Creates a new instance of WorkingDayMovement from a prototype
 
Method Summary
 Coord getHomeLocation()
           
 Coord getInitialLocation()
          Returns a new initial placement for a node
 Coord getOfficeLocation()
           
 Coord getShoppingLocation()
           
 boolean newOrders()
          Method is called between each getPath() request when the current MM is ready (isReady() method returns true).
 MovementModel replicate()
          Creates a replicate of the movement model.
 
Methods inherited from class movement.ExtendedMovementModel
generateWaitTime, getCurrentMovementModel, getPath, setCurrentMovementModel
 
Methods inherited from class movement.MovementModel
generateSpeed, 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
 

Field Detail

PROBABILITY_TO_OWN_CAR_SETTING

public static final java.lang.String PROBABILITY_TO_OWN_CAR_SETTING
See Also:
Constant Field Values

PROBABILITY_TO_GO_SHOPPING_SETTING

public static final java.lang.String PROBABILITY_TO_GO_SHOPPING_SETTING
See Also:
Constant Field Values
Constructor Detail

WorkingDayMovement

public WorkingDayMovement(Settings settings)
Creates a new instance of WorkingDayMovement

Parameters:
settings -

WorkingDayMovement

public WorkingDayMovement(WorkingDayMovement proto)
Creates a new instance of WorkingDayMovement from a prototype

Parameters:
proto -
Method Detail

newOrders

public boolean newOrders()
Description copied from class: ExtendedMovementModel
Method is called between each getPath() request when the current MM is ready (isReady() method returns true). Subclasses should implement all changes of state that need to be made here, for example switching mobility model, etc.

Specified by:
newOrders in class ExtendedMovementModel
Returns:
true if success

getInitialLocation

public Coord getInitialLocation()
Description copied from class: MovementModel
Returns a new initial placement for a node

Specified by:
getInitialLocation in class MovementModel
Returns:
The initial coordinates for a node

replicate

public MovementModel replicate()
Description copied from class: MovementModel
Creates a replicate of the movement model.

Specified by:
replicate in class MovementModel
Returns:
A new movement model with the same settings as this model

getOfficeLocation

public Coord getOfficeLocation()

getHomeLocation

public Coord getHomeLocation()

getShoppingLocation

public Coord getShoppingLocation()