public class RandomFiftyFiftyNegotiationParty extends AbstractNegotiationParty
deadlines, partyId, rand, timeline, utilitySpace
Constructor and Description |
---|
RandomFiftyFiftyNegotiationParty(UtilitySpace utilitySpace,
java.util.Map<DeadlineType,java.lang.Object> deadlines,
Timeline timeline,
long randomSeed)
Initializes a new instance of the
RandomFiftyFiftyNegotiationParty class. |
Modifier and Type | Method and Description |
---|---|
Action |
chooseAction(java.util.List<java.lang.Class> possibleActions)
If placing offers: do random offer
if voting: accept/reject with a 50% chance on both
|
AgentID |
getPartyId()
Gets the agent's unique id
Each agent should contain a (unique) id.
|
void |
receiveMessage(java.lang.Object sender,
Action arguments)
Processes action messages received by a given sender.
|
generateRandomBid, getRandomValue, getTimeLine, getUtility, getUtilitySpace, getUtilityWithDiscount, setPartyId, toString
public RandomFiftyFiftyNegotiationParty(UtilitySpace utilitySpace, java.util.Map<DeadlineType,java.lang.Object> deadlines, Timeline timeline, long randomSeed)
RandomFiftyFiftyNegotiationParty
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)
possibleActions
- List of all actions possible.public void receiveMessage(java.lang.Object sender, Action arguments)
sender
- The initiator of the actionarguments
- The action performedpublic AgentID getPartyId()
getPartyId
in interface NegotiationParty
getPartyId
in class AbstractNegotiationParty