public abstract class OperationalModel extends java.lang.Object implements Updatable
Modifier and Type | Field and Description |
---|---|
private CommunicationModule |
communicationModule
The communication module.
|
private MovementModule |
movementModel
The movement model.
|
private ObservationModule |
observationModule
The observation module.
|
Constructor and Description |
---|
OperationalModel(MovementModule movementModel,
ObservationModule observationModule,
CommunicationModule communicationModule) |
Modifier and Type | Method and Description |
---|---|
void |
communicate(CommunicationType type,
java.lang.Object communication)
Communicate.
|
Vector |
getCurrentVelocity()
Gets the current velocity.
|
double |
getDesiredSpeed()
Gets the desired speed.
|
Vector |
getMove(int timeStep)
Gets the next move given a certain time step.
|
MovementModule |
getMovementModel()
Gets the movement model.
|
<T> java.util.Collection<T> |
getObservation(java.lang.Class<T> type)
Gets an observation of a specific type.
|
ObservationModule |
getObservationModule()
Gets the observation module.
|
boolean |
getStopOrder()
Indicates if the agent has a stop order.
|
void |
init(Map map,
AatomHumanAgent agent,
NavigationModule navigationModule,
ActivityModule activityModule)
Initializes the
AatomHumanAgent . |
boolean |
isSitting()
Determines if the agent is sitting.
|
boolean |
setSitDown(Chair chair)
Asks the agent to sit down on a specific
Chair . |
void |
setStopOrder(double stopOrder)
Sets a flag that indicates if the agent is ordered to stop.
|
void |
update(int timeStep)
Updates the updatable element.
|
private MovementModule movementModel
private ObservationModule observationModule
private CommunicationModule communicationModule
public OperationalModel(MovementModule movementModel, ObservationModule observationModule, CommunicationModule communicationModule)
movementModel
- The movement model.observationModule
- The observation module.communicationModule
- The communication module.public void communicate(CommunicationType type, java.lang.Object communication)
type
- The type of communication.communication
- The communication.public Vector getCurrentVelocity()
public double getDesiredSpeed()
public Vector getMove(int timeStep)
timeStep
- The time step.public MovementModule getMovementModel()
public <T> java.util.Collection<T> getObservation(java.lang.Class<T> type)
T
- The type of observation.type
- The map component.public ObservationModule getObservationModule()
public boolean getStopOrder()
public void init(Map map, AatomHumanAgent agent, NavigationModule navigationModule, ActivityModule activityModule)
AatomHumanAgent
.map
- The map.agent
- The agent.navigationModule
- The navigation module.activityModule
- The activity module.public boolean isSitting()
public boolean setSitDown(Chair chair)
Chair
. Returns true if
successful, false otherwise.chair
- The chair.public void setStopOrder(double stopOrder)
stopOrder
- The time of the stop order.