public abstract class Activity extends java.lang.Object implements Updatable
Modifier and Type | Field and Description |
---|---|
protected ActivityModule |
activityModule
The activity module.
|
private ActivityState |
activityState
The activity state.
|
protected HumanAgent |
agent
The agent.
|
private boolean |
goingToActivity
Flag to indicate that the agent is going to the activity.
|
protected Map |
map
The map.
|
protected MovementModule |
movement
The movement model.
|
protected NavigationModule |
navigationModule
The navigation module.
|
protected ObservationModule |
observations
The observation module.
|
Constructor and Description |
---|
Activity() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canStart(int timeStep)
Determines if the activity can start.
|
void |
endActivity()
Starts the activity.
|
abstract Position |
getActivityPosition()
Gets the activity position.
|
ActivityState |
getActivityState()
Gets the activity state.
|
void |
goToActivity()
Sends the agent to the activity area.
|
void |
init(Map map,
HumanAgent agent,
MovementModule movement,
ObservationModule observations,
NavigationModule navigationModule,
ActivityModule activityModule)
Sets the agent.
|
boolean |
isFinished()
Determines if the activity is done.
|
protected boolean |
isGoingToActivity()
Flag to indicate that the agent is going to an activity.
|
boolean |
isInProgress()
Indicates if the activity is in progress.
|
void |
startActivity()
Starts the activity.
|
protected MovementModule movement
private ActivityState activityState
private boolean goingToActivity
protected ObservationModule observations
protected HumanAgent agent
protected NavigationModule navigationModule
protected ActivityModule activityModule
protected Map map
public abstract boolean canStart(int timeStep)
timeStep
- The time step.public void endActivity()
public abstract Position getActivityPosition()
public ActivityState getActivityState()
public void goToActivity()
public void init(Map map, HumanAgent agent, MovementModule movement, ObservationModule observations, NavigationModule navigationModule, ActivityModule activityModule)
map
- The map.agent
- The agentmovement
- The movement model.observations
- The observation module.navigationModule
- The navigation module.activityModule
- The activity module.public boolean isFinished()
protected boolean isGoingToActivity()
public boolean isInProgress()
public void startActivity()