public class AlternatingOfferCounterOfferProtocol extends ProtocolAdapter
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.
Constructor and Description |
---|
AlternatingOfferCounterOfferProtocol() |
Modifier and Type | Method and Description |
---|---|
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.
|
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, than this negotiation ends.
|
afterSession, applyAction, beforeSession, exclude, getNumberOfAgreeingParties, includeOnly
public AlternatingOfferCounterOfferProtocol()
public 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 Protocol
getRoundStructure
in class ProtocolAdapter
parties
- The parties currently participatingsession
- The complete session historypublic Bid getCurrentAgreement(Session session, java.util.List<NegotiationParty> parties)
getCurrentAgreement
in interface Protocol
getCurrentAgreement
in class ProtocolAdapter
session
- The complete session history up to this pointparties
- The parties involved in the current negotiationpublic boolean isFinished(Session session, java.util.List<NegotiationParty> parties)
isFinished
in interface Protocol
isFinished
in class ProtocolAdapter
session
- the current state of this sessionpublic java.util.Map<NegotiationParty,java.util.List<NegotiationParty>> getActionListeners(java.util.List<NegotiationParty> parties)
getActionListeners
in interface Protocol
getActionListeners
in class ProtocolAdapter
parties
- The parties involved in the current negotiation