Package org.tweetyproject.agents
Class SynchronousProtocol
java.lang.Object
org.tweetyproject.agents.AbstractProtocol
org.tweetyproject.agents.RigidProtocol
org.tweetyproject.agents.SynchronousProtocol
- All Implemented Interfaces:
Protocol
- Direct Known Subclasses:
DirectGameProtocol
This class models a synchronous protocol for multi-agent systems.
This protocol asks all agents simultaneously for actions, and
simultaneously executes these actions thereafter.
The protocol can optionally be defined as rigid, i.e. if at any time
an agent performs a "NO_OPERATION" he cannot perform any other
action thereafter.
This protocol terminates when either
- an optional number of maximal steps has been required or
- every agent performs a NO_OPERATION at the same time or (if the protocol is defined to be rigid) after all agents performed one NO_OPERATION.
This protocol terminates when either
- an optional number of maximal steps has been required or
- every agent performs a NO_OPERATION at the same time or (if the protocol is defined to be rigid) after all agents performed one NO_OPERATION.
- Author:
- Matthias Thimm
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates an unlimited number of execution steps of this protocol. -
Constructor Summary
ConstructorDescriptionSynchronousProtocol
(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. -
Method Summary
Methods inherited from class org.tweetyproject.agents.AbstractProtocol
addProtocolListener, removeProtocolListener
-
Field Details
-
UNLIMITED_EXECUTION
public static final int UNLIMITED_EXECUTIONIndicates an unlimited number of execution steps of this protocol.- See Also:
-
-
Constructor Details
-
SynchronousProtocol
Creates a new (non-rigid) synchronous protocol for the given multi-agent system and unlimited number of steps.- Parameters:
multiAgentSystem
- a multi-agent system.
-
SynchronousProtocol
Creates a new (non-rigid) synchronous protocol for the given multi-agent system and the given number of steps.- Parameters:
multiAgentSystem
- a multi-agent system.numberOfSteps
- the number of steps for this protocol.
-
SynchronousProtocol
Creates a new synchronous protocol for the given multi-agent system and unlimited number of steps.- Parameters:
multiAgentSystem
- a multi-agent system.isRigid
- whether this protocol is rigid.
-
SynchronousProtocol
public SynchronousProtocol(MultiAgentSystem<? extends Agent> multiAgentSystem, int numberOfSteps, boolean isRigid) Creates a new synchronous protocol for the given multi-agent system.- Parameters:
multiAgentSystem
- a multi-agent system.numberOfSteps
- the number of steps for this protocol.isRigid
- whether this protocol is rigid.
-