public class StackedAlternatingOffersProtocol extends DefaultMultilateralProtocol
The first agent makes an offer Other agents can accept or make a counter-offer If no agent makes a counter-offer, the negotiation end with this offer. Otherwise, the process continues until reaching deadline or agreement.
isAborted| Constructor and Description |
|---|
StackedAlternatingOffersProtocol() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<NegotiationParty,java.util.List<Action>> |
beforeSession(Session session,
java.util.List<NegotiationParty> parties)
Returns a list of Actions to be sent to
NegotiationParty.receiveMessage(AgentID, Action) . |
java.util.Map<NegotiationParty,java.util.List<NegotiationParty>> |
getActionListeners(java.util.List<NegotiationParty> parties)
Get a map of parties that are listening to each other.
|
Bid |
getCurrentAgreement(Session session,
java.util.List<NegotiationParty> parties)
Will return the current agreement.
|
int |
getNumberOfAgreeingParties(Session session,
java.util.List<NegotiationParty> parties)
Gets the number of parties that currently agree to the offer.
|
Round |
getRoundStructure(java.util.List<NegotiationParty> parties,
Session session)
Defines the round structure.
|
boolean |
isFinished(Session session,
java.util.List<NegotiationParty> parties)
If all agents accept the most recent offer, then this negotiation ends.
|
afterSession, applyAction, checkOffer, endNegotiation, endNegotiation, exclude, includeOnly, listenToAll, listenToNonepublic Round getRoundStructure(java.util.List<NegotiationParty> parties, Session session)
The first agent makes an offer Other agents can accept or make a counter-offer
getRoundStructure in interface MultilateralProtocolgetRoundStructure in class DefaultMultilateralProtocolparties - The parties currently participatingsession - The complete session historypublic Bid getCurrentAgreement(Session session, java.util.List<NegotiationParty> parties)
getCurrentAgreement in interface MultilateralProtocolgetCurrentAgreement in class DefaultMultilateralProtocolsession - The complete session history up to this pointparties - The parties involved in the current negotiationpublic int getNumberOfAgreeingParties(Session session, java.util.List<NegotiationParty> parties)
DefaultMultilateralProtocolgetNumberOfAgreeingParties in interface MultilateralProtocolgetNumberOfAgreeingParties in class DefaultMultilateralProtocolsession - the current state of this sessionparties - The parties currently participatingpublic boolean isFinished(Session session, java.util.List<NegotiationParty> parties)
isFinished in interface MultilateralProtocolisFinished in class DefaultMultilateralProtocolsession - the current state of this sessionparties - all the parties involved in the negotiationpublic java.util.Map<NegotiationParty,java.util.List<NegotiationParty>> getActionListeners(java.util.List<NegotiationParty> parties)
getActionListeners in interface MultilateralProtocolgetActionListeners in class DefaultMultilateralProtocolparties - The parties involved in the current negotiationpublic java.util.Map<NegotiationParty,java.util.List<Action>> beforeSession(Session session, java.util.List<NegotiationParty> parties) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, NegotiationPartyTimeoutException
MultilateralProtocolNegotiationParty.receiveMessage(AgentID, Action) . This will get
called just before the session starts. If some initialization with needs
to be done by the protocol, it can be done here.beforeSession in interface MultilateralProtocolbeforeSession in class DefaultMultilateralProtocolsession - The upcoming Sessionparties - The NegotiationPartys that will participate in the
sessionjava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionNegotiationPartyTimeoutException