public abstract class AbstractCommunicationModel extends java.lang.Object implements CommunicationModel
Constructor and Description |
---|
AbstractCommunicationModel()
Construct an AbstractCommunicationModel.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addHearing(Entity agent,
java.util.Collection<? extends Command> c)
Register a set of heard messages for an agent.
|
protected void |
addHearing(Entity agent,
Command... c)
Register a set of heard messages for an agent.
|
java.util.Collection<Command> |
getHearing(Entity agent)
Get the set of hear commands an agent can hear.
|
void |
initialise(Config config,
WorldModel<? extends Entity> model)
Initialise this communication model.
|
void |
process(int time,
java.util.Collection<? extends Command> agentCommands)
Process a set of agent commands and work out what communications each agent can hear.
|
public AbstractCommunicationModel()
public void initialise(Config config, WorldModel<? extends Entity> model)
CommunicationModel
initialise
in interface CommunicationModel
config
- The kernel configuration.model
- The world model.public void process(int time, java.util.Collection<? extends Command> agentCommands)
CommunicationModel
process
in interface CommunicationModel
time
- The current time.agentCommands
- The set of all agent commands this timestep.public java.util.Collection<Command> getHearing(Entity agent)
CommunicationModel
getHearing
in interface CommunicationModel
agent
- The agent controlled entity.protected void addHearing(Entity agent, Command... c)
agent
- The agent.c
- The messages heard.