public abstract class TacticalModel extends java.lang.Object implements Updatable
Modifier and Type | Field and Description |
---|---|
private ActivityModule |
activityModule
The activity module.
|
private NavigationModule |
navigationModule
The navigation module.
|
Constructor and Description |
---|
TacticalModel(ActivityModule activityModule,
NavigationModule navigationModule)
Creates a new tactical model.
|
Modifier and Type | Method and Description |
---|---|
Activity |
getActiveActivity()
Gets the active
Activity . |
java.util.Collection<Activity> |
getActivities()
Gets a
Collection of Activity s. |
ActivityModule |
getActivityModule()
Gets the activity module.
|
Position |
getGoalPosition()
Gets the goal
Position . |
java.util.List<Position> |
getGoalPositions()
Gets the list of goal positions
Position . |
NavigationModule |
getNavigationModule()
Gets the navigation module.
|
boolean |
getReachedGoal()
Checks if the agent reached its goal
Position . |
void |
init(Map map,
HumanAgent agent,
MovementModule movement,
ObservationModule observations,
PlanningModule planner,
java.util.Collection<Activity> activities)
Initializes the
HumanAgent . |
boolean |
isQueuing()
Determines if the agent is queuing.
|
void |
setGoal(Position position)
Sets the goal position.
|
void |
setInFrontOfQueue()
Sets the agent in front of the queue.
|
void |
setQueuing(double time)
Sets the agents queuing mode.
|
void |
setShortTermGoal(Position position)
Sets a short term goal
Position for the agent. |
void |
setShortTermGoals(java.util.List<Position> positions)
Sets a set of short term goal
Position s for the agent. |
void |
update(int timeStep)
Updates the updatable element.
|
private ActivityModule activityModule
private NavigationModule navigationModule
public TacticalModel(ActivityModule activityModule, NavigationModule navigationModule)
activityModule
- The activity module.navigationModule
- The navigation module.public Activity getActiveActivity()
Activity
.Activity
.public java.util.Collection<Activity> getActivities()
Collection
of Activity
s.Activity
s.public ActivityModule getActivityModule()
public Position getGoalPosition()
Position
.public java.util.List<Position> getGoalPositions()
Position
.public NavigationModule getNavigationModule()
public boolean getReachedGoal()
Position
.public void init(Map map, HumanAgent agent, MovementModule movement, ObservationModule observations, PlanningModule planner, java.util.Collection<Activity> activities)
HumanAgent
.map
- The map.agent
- The agent.movement
- The movement model.observations
- The observation module.planner
- The activity planner.activities
- The activities.public boolean isQueuing()
public void setGoal(Position position)
position
- The goal position.public void setInFrontOfQueue()
public void setQueuing(double time)
time
- The time. If the time equals -1, the agent queues
indefinitely.public void setShortTermGoal(Position position)
Position
for the agent. It is to be
executed right away.position
- The goal position.public void setShortTermGoals(java.util.List<Position> positions)
Position
s for the agent. It is to
be executed right away.positions
- The goal positions.