public class Group17 extends AbstractNegotiationParty
OfferStrat
, OpMod
and AcceptStrategy
.
Essentially, the only function this class has is to correctly forward the
data and requests it receives to the former three classes and then return
their responses.deadlines, rand, timeline, utilitySpace
Constructor and Description |
---|
Group17() |
Modifier and Type | Method and Description |
---|---|
Action |
chooseAction(java.util.List<java.lang.Class<? extends Action>> validActions)
Each round this method gets called and ask you to accept or offer.
|
java.lang.String |
getDescription() |
void |
init(AbstractUtilitySpace utilSpace,
Deadline dl,
TimeLineInfo tl,
long randomSeed,
AgentID agentId)
This is the first call made to a NegotiationParty after its
instantiation.
|
void |
receiveMessage(AgentID sender,
Action action)
All
Action s performed by the other parties will be received as a
message. |
generateRandomBid, getNumberOfParties, getPartyId, getProtocol, getRandomValue, getTimeLine, getUtility, getUtilitySpace, getUtilityWithDiscount, toString
public void init(AbstractUtilitySpace utilSpace, Deadline dl, TimeLineInfo tl, long randomSeed, AgentID agentId)
NegotiationParty
init
in interface NegotiationParty
init
in class AbstractNegotiationParty
utilSpace
- (a copy of/readonly version of) the
AbstractUtilitySpace
to be used for this session.tl
- The TimeLineInfo
about current session.agentId
- the AgentID
.public Action chooseAction(java.util.List<java.lang.Class<? extends Action>> validActions)
public void receiveMessage(AgentID sender, Action action)
Action
s performed by the other parties will be received as a
message. You can use this information to your advantage, for example to
predict their utility.receiveMessage
in interface NegotiationParty
receiveMessage
in class AbstractNegotiationParty
sender
- The party that performed the Action
.action
- The Action
that the sending party performed.public java.lang.String getDescription()
getDescription
in interface NegotiationParty
getDescription
in class AbstractNegotiationParty