public class RandomFlippingMediator extends Mediator
deadlines, partyId, rand, timeline, utilitySpace
Constructor and Description |
---|
RandomFlippingMediator(UtilitySpace utilitySpace,
java.util.Map<DeadlineType,java.lang.Object> deadlines,
Timeline timeline,
long randomSeed)
Initializes a new instance of the
RandomFlippingMediator class. |
Modifier and Type | Method and Description |
---|---|
Action |
chooseAction(java.util.List<java.lang.Class> 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 |
receiveMessage(java.lang.Object sender,
Action arguments)
This method is called when an observable action is performed.
|
getPartyId
generateRandomBid, getRandomValue, getTimeLine, getUtility, getUtilitySpace, getUtilityWithDiscount, setPartyId, toString
public RandomFlippingMediator(UtilitySpace utilitySpace, java.util.Map<DeadlineType,java.lang.Object> deadlines, Timeline timeline, long randomSeed)
RandomFlippingMediator
class.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)public Action chooseAction(java.util.List<java.lang.Class> possibleActions)
NegotiationParty
is in the
Protocol.getRoundStructure(java.util.List,
negotiator.session.Session)
.possibleActions
- List of all actions possible.public void receiveMessage(java.lang.Object sender, Action arguments)
Protocol.getActionListeners(java.util.List)
sender
- The initiator of the actionarguments
- The action performedpublic Bid getLastAcceptedBid()