public class Timestep
extends java.lang.Object
Constructor and Description |
---|
Timestep(int time)
Construct a timestep record.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Command> |
getAgentHearing(EntityID agentID)
Get the communication messages that an agent heard at the start of this timestep.
|
ChangeSet |
getAgentPerception(EntityID agentID)
Get the changes to entities that an agent saw at the start of this timestep.
|
java.util.Set<EntityID> |
getAgentsWithUpdates()
Get the set of agent IDs for agents that received an update this timestep.
|
ChangeSet |
getChangeSet()
Get the changes to entities during this timestep.
|
java.util.Collection<Command> |
getCommands()
Get the commands sent by agents this timestep.
|
java.util.Collection<Command> |
getCommands(EntityID agentID)
Get the commands sent by a particular agent this timestep.
|
double |
getScore()
Get the score for this timestep.
|
int |
getTime()
Get the time.
|
void |
registerPerception(EntityID id,
ChangeSet perception,
java.util.Collection<Command> hearing)
Register agent perception.
|
void |
setChangeSet(ChangeSet c)
Set the simulator updates ChangeSet for this timestep.
|
void |
setCommands(java.util.Collection<Command> c)
Set the commands for this timestep.
|
void |
setScore(double s)
Set the score for this timestep.
|
public Timestep(int time)
time
- The timestep number.public void setCommands(java.util.Collection<Command> c)
c
- The commands.public void setChangeSet(ChangeSet c)
c
- The ChangeSet.public void registerPerception(EntityID id, ChangeSet perception, java.util.Collection<Command> hearing)
id
- The agent ID.perception
- The ChangeSet the entity can perceive.hearing
- The messages the agent heard.public void setScore(double s)
s
- The score.public int getTime()
public java.util.Collection<Command> getCommands()
public java.util.Collection<Command> getCommands(EntityID agentID)
agentID
- The ID of the agent.public ChangeSet getChangeSet()
public java.util.Set<EntityID> getAgentsWithUpdates()
public ChangeSet getAgentPerception(EntityID agentID)
agentID
- The agent ID to look up.public java.util.Collection<Command> getAgentHearing(EntityID agentID)
agentID
- The agent ID to look up.public double getScore()