public class RandomFlippingMediator extends AbstractNegotiationParty implements Mediator
deadlines, rand, timeline, utilitySpace
Constructor and Description |
---|
RandomFlippingMediator() |
Modifier and Type | Method and Description |
---|---|
Action |
chooseAction(java.util.List<java.lang.Class<? extends Action>> possibleActions)
When this class is called, it is expected that the Party chooses one of
the actions from the possible action list and returns an instance of the
chosen action.
|
Bid |
getLastAcceptedBid() |
void |
init(UtilitySpace utilitySpace,
Deadline deadlines,
TimeLineInfo timeline,
long randomSeed,
AgentID id)
Initializes a new instance of the
RandomFlippingMediator class. |
void |
receiveMessage(AgentID sender,
Action arguments)
This method is called when an observable action is performed.
|
generateRandomBid, getDescription, getNumberOfParties, getPartyId, getProtocol, getRandomValue, getTimeLine, getUtility, getUtilitySpace, getUtilityWithDiscount, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDescription, getProtocol
public void init(UtilitySpace utilitySpace, Deadline deadlines, TimeLineInfo timeline, long randomSeed, AgentID id)
RandomFlippingMediator
class.init
in interface NegotiationParty
init
in class AbstractNegotiationParty
utilitySpace
- The utility space used by this classdeadlines
- The deadlines for this sessiontimeline
- The time line (if time deadline) for this session, can be nullrandomSeed
- The seed that should be used for all randomization (to be
reproducible)id
- the AgentID
.public Action chooseAction(java.util.List<java.lang.Class<? extends Action>> possibleActions)
NegotiationParty
is in the
MultilateralProtocol.getRoundStructure(java.util.List, negotiator.session.Session)
.chooseAction
in interface NegotiationParty
possibleActions
- List of all actions possible.public void receiveMessage(AgentID sender, Action arguments)
MultilateralProtocol.getActionListeners(java.util.List)
receiveMessage
in interface NegotiationParty
receiveMessage
in class AbstractNegotiationParty
sender
- The initiator of the actionarguments
- The action performedpublic Bid getLastAcceptedBid()