public abstract class RigidProtocol extends AbstractProtocol
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Agent,java.lang.Boolean> |
hasPerformedNoOperation
Keeps track of whether an agent has performed a NO_OPERATION;
|
Constructor and Description |
---|
RigidProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem)
Creates a new rigid protocol for the given multi-agent system.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
hasPerformedNoOperation(Agent a)
Checks whether the given agent has already performed
a NO_OPERATION.
|
protected boolean |
hasTerminated()
This method determines if this protocol has terminated,
i.e.
|
protected void |
setHasPerformedNoOperation(Agent a)
Sets that the given agent has performed a NO_OPERATION.
|
addProtocolListener, doStep, getMultiAgentSystem, notifyActionPerformed, notifyTerminated, removeProtocolListener, step
private java.util.Map<Agent,java.lang.Boolean> hasPerformedNoOperation
public RigidProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem)
multiAgentSystem
- a multi-agent system.protected boolean hasTerminated()
AbstractProtocol
hasTerminated
in class AbstractProtocol
protected boolean hasPerformedNoOperation(Agent a)
a
- an agent.protected void setHasPerformedNoOperation(Agent a)
a
- an agent.