public abstract class AatomHumanAgent extends HumanAgent
StrategicModel
, a TacticalModel
, and a
OperationalModel
. The StrategicModel
determines the higher
level plans of the agent. It for instance determines its goals and the
preferred speed it wants to walk. The TacticalModel
provides tactical
decisions, for instance on the execution of activities. Finally, the
OperationalModel
determines the lower level interactions with the
surroundings.
The AatomHumanAgent acts autonomously and bases its decisions on its
surroundings and its internal (high level) state.Modifier and Type | Field and Description |
---|---|
protected OperationalModel |
operationalModel
The
OperationalModel . |
protected StrategicModel |
strategicModel
The
StrategicModel . |
protected TacticalModel |
tacticalModel
The
TacticalModel . |
color, mass
position
map
Constructor and Description |
---|
AatomHumanAgent(Position position,
double radius,
double mass,
StrategicModel strategicModel,
TacticalModel tacticalModel,
OperationalModel operationalModel)
Creates a human agent with a specified
StrategicModel and
OperationalModel with default color red. |
AatomHumanAgent(Position position,
double radius,
double mass,
StrategicModel strategicModel,
TacticalModel tacticalModel,
OperationalModel operationalModel,
java.awt.Color color)
Creates a human agent.
|
Modifier and Type | Method and Description |
---|---|
void |
communicate(CommunicationType type,
java.lang.Object communication)
Communicate.
|
Activity |
getActiveActivity()
Gets a
Collection of active Activity s. |
Vector |
getCurrentVelocity()
Gets the current velocity from the
OperationalModel . |
double |
getDesiredSpeed()
Gets the desired speed.
|
Position |
getGoalPosition()
Gets the goal
Position from the StrategicModel . |
java.util.List<Position> |
getGoalPositions()
Gets a list of all goal
Position s from the StrategicModel
. |
protected <T> java.util.Collection<T> |
getObservation(java.lang.Class<T> type)
Gets an observation of a specific type.
|
boolean |
getReachedGoal()
Check if we reached the goal
Position . |
boolean |
getStopOrder()
Indicates if the agent has a stop order.
|
void |
init()
This method is used to initialize the agent.
|
boolean |
isQueuing()
Determines if the agent is queuing.
|
boolean |
isSitting()
Determines if the agent is sitting.
|
void |
update(int timeStep)
Update the agent's position and internal representations using the
generated move of the
OperationalModel , the
StrategicModel.update(int) and TacticalModel.update(int)
methods. |
boolean |
wantsToBeDestoryed()
Determines if the agent wants to be removed from the simulation.
|
getColor, getMass, toString
getRadius, getVectorToPosition, isLineCollision
getDistance, getPosition
isDestroyed
protected StrategicModel strategicModel
StrategicModel
.protected TacticalModel tacticalModel
TacticalModel
.protected OperationalModel operationalModel
OperationalModel
.public AatomHumanAgent(Position position, double radius, double mass, StrategicModel strategicModel, TacticalModel tacticalModel, OperationalModel operationalModel)
StrategicModel
and
OperationalModel
with default color red.position
- The position on the map.radius
- The radius.mass
- The mass.strategicModel
- The strategic model.tacticalModel
- The tactical model.operationalModel
- The operational model.public AatomHumanAgent(Position position, double radius, double mass, StrategicModel strategicModel, TacticalModel tacticalModel, OperationalModel operationalModel, java.awt.Color color)
position
- The position on the map.radius
- The radius.mass
- The mass.strategicModel
- The strategic model.tacticalModel
- The tactical model.operationalModel
- The operational model.color
- The color.public void communicate(CommunicationType type, java.lang.Object communication)
communicate
in class HumanAgent
type
- The type of communication.communication
- The communication.public Activity getActiveActivity()
Collection
of active Activity
s.Activity
s.public Vector getCurrentVelocity()
OperationalModel
.public double getDesiredSpeed()
public Position getGoalPosition()
Position
from the StrategicModel
.public boolean getStopOrder()
public boolean isQueuing()
public boolean isSitting()
public java.util.List<Position> getGoalPositions()
Position
s from the StrategicModel
.protected <T> java.util.Collection<T> getObservation(java.lang.Class<T> type)
getObservation
in class Agent
T
- The type of observation.type
- The map component.public boolean getReachedGoal()
Position
.public boolean wantsToBeDestoryed()
Agent
wantsToBeDestoryed
in class Agent
public void init()
Agent
public void update(int timeStep)
OperationalModel
, the
StrategicModel.update(int)
and TacticalModel.update(int)
methods.