public class SynchronousProtocol extends RigidProtocol
| Modifier and Type | Field and Description |
|---|---|
static int |
UNLIMITED_EXECUTION
Indicates an unlimited number of execution steps
of this protocol.
|
| Constructor and Description |
|---|
SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem)
Creates a new (non-rigid) synchronous protocol for the given multi-agent system
and unlimited number of steps.
|
SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem,
boolean isRigid)
Creates a new synchronous protocol for the given multi-agent system and unlimited number of steps.
|
SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem,
int numberOfSteps)
Creates a new (non-rigid) synchronous protocol for the given multi-agent system and the
given number of steps.
|
SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem,
int numberOfSteps,
boolean isRigid)
Creates a new synchronous protocol for the given multi-agent system.
|
| Modifier and Type | Method and Description |
|---|---|
protected Set<ActionEvent> |
doStep()
Executes one step of the protocol.
|
protected boolean |
hasTerminated()
This method determines if this protocol has terminated,
i.e.
|
hasPerformedNoOperation, setHasPerformedNoOperationaddProtocolListener, getMultiAgentSystem, notifyActionPerformed, notifyTerminated, removeProtocolListener, steppublic static final int UNLIMITED_EXECUTION
public SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem)
multiAgentSystem - a multi-agent system.public SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem, int numberOfSteps)
multiAgentSystem - a multi-agent system.numberOfSteps - the number of steps for this protocol.public SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem, boolean isRigid)
multiAgentSystem - a multi-agent system.isRigid - whether this protocol is rigid.public SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem, int numberOfSteps, boolean isRigid)
multiAgentSystem - a multi-agent system.numberOfSteps - the number of steps for this protocol.isRigid - whether this protocol is rigid.protected boolean hasTerminated()
AbstractProtocolhasTerminated in class RigidProtocolprotected Set<ActionEvent> doStep() throws ProtocolTerminatedException
AbstractProtocoldoStep in class AbstractProtocolProtocolTerminatedExceptionCopyright © 2018. All rights reserved.