public class EveningActivityMovement extends MapBasedMovement implements SwitchableMovement
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EVENING_ACTIVITY_CONTROL_SYSTEM_NR_SETTING |
static java.lang.String |
MAX_GROUP_SIZE_SETTING |
static java.lang.String |
MAX_WAIT_TIME_SETTING |
static java.lang.String |
MEETING_SPOTS_FILE_SETTING |
static java.lang.String |
MIN_GROUP_SIZE_SETTING |
static java.lang.String |
MIN_WAIT_TIME_SETTING |
static java.lang.String |
NR_OF_MEETING_SPOTS_SETTING |
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 |
|---|
EveningActivityMovement(EveningActivityMovement proto)
Creates a new instance of EveningActivityMovement from a prototype
|
EveningActivityMovement(Settings settings)
Creates a new instance of EveningActivityMovement
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
generateWaitTime()
Generates and returns a suitable waiting time at the end of a path.
|
int |
getID() |
Coord |
getInitialLocation()
Returns a (random) coordinate that is between two adjacent MapNodes
|
Coord |
getLastLocation()
Get the last location the getPath() of this movement model has returned
|
int |
getMaxGroupSize() |
int |
getMinGroupSize() |
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).
|
Coord |
getShoppingLocation() |
Coord |
getShoppingLocationAndGetReady()
Sets the node ready to start a shopping trip.
|
boolean |
isReady()
Checks if the movement model is finished doing its task and it's time to
switch to the next movement model.
|
boolean |
isReadyToShop()
Checks if a node is at the correct place where the shopping begins
|
MapBasedMovement |
replicate()
Creates a replicate of the movement model.
|
static void |
reset() |
void |
setLocation(Coord lastWaypoint)
Tell the movement model what its current location is
|
void |
setMaxGroupSize(int maxGroupSize) |
void |
setMinGroupSize(int minGroupSize) |
getMap, getOkMapNodeTypes, selectRandomOkNodegenerateSpeed, getComBus, getHost, getMaxX, getMaxY, isActive, nextPathAvailable, setComBus, setHost, toStringpublic static final java.lang.String NR_OF_MEETING_SPOTS_SETTING
public static final java.lang.String EVENING_ACTIVITY_CONTROL_SYSTEM_NR_SETTING
public static final java.lang.String MEETING_SPOTS_FILE_SETTING
public static final java.lang.String MIN_GROUP_SIZE_SETTING
public static final java.lang.String MAX_GROUP_SIZE_SETTING
public static final java.lang.String MIN_WAIT_TIME_SETTING
public static final java.lang.String MAX_WAIT_TIME_SETTING
public EveningActivityMovement(Settings settings)
settings - public EveningActivityMovement(EveningActivityMovement proto)
proto - public int getID()
public Coord getInitialLocation()
MapBasedMovementgetInitialLocation in class MapBasedMovementpublic Path getPath()
MovementModelgetPath in class MapBasedMovementprotected double generateWaitTime()
MovementModelMovementModel.WAIT_TIME setting).generateWaitTime in class MovementModelpublic MapBasedMovement replicate()
MovementModelreplicate in class MapBasedMovementpublic Coord getLastLocation()
SwitchableMovementgetLastLocation in interface SwitchableMovementgetLastLocation in class MapBasedMovementSwitchableMovementpublic boolean isReady()
SwitchableMovementisReady in interface SwitchableMovementisReady in class MapBasedMovementSwitchableMovementpublic void setLocation(Coord lastWaypoint)
SwitchableMovementsetLocation in interface SwitchableMovementsetLocation in class MapBasedMovementSwitchableMovementpublic Coord getShoppingLocationAndGetReady()
public Coord getShoppingLocation()
public boolean isReadyToShop()
public static void reset()
public int getMinGroupSize()
public void setMinGroupSize(int minGroupSize)
public int getMaxGroupSize()
public void setMaxGroupSize(int maxGroupSize)