public class NegotiationPartyInternal extends java.lang.Object implements PartyWithUtility
Constructor and Description |
---|
NegotiationPartyInternal(ParticipantRepItem partyRepItem,
ProfileRepItem profileRepItem,
Session session,
SessionsInfo info,
AgentID agentID)
Creates a new
NegotiationParty from repository items and
initializes it. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Note, this does not enforce proper implementation as equals already
exists in Object.
|
AgentID |
getID() |
NegotiationParty |
getParty() |
Session |
getSession()
Get the session that this party is using.
|
Timeline |
getTimeLine()
Gets the timeline for this agent.
|
UncertainPreferenceContainer |
getUncertainModel() |
double |
getUtility(Bid bid) |
UtilitySpace |
getUtilitySpace()
Gets the agent's utility space.
|
double |
getUtilityWithDiscount(Bid bid) |
int |
hashCode() |
boolean |
isMediator() |
boolean |
isUncertain() |
void |
saveStorage(java.util.List<Action> actions,
java.util.Map<java.lang.String,java.lang.String> profiles,
Tuple<Bid,java.lang.Double> agreement)
Saves the persistent storage , see
SessionsInfo . |
java.lang.String |
toString() |
public NegotiationPartyInternal(ParticipantRepItem partyRepItem, ProfileRepItem profileRepItem, Session session, SessionsInfo info, AgentID agentID) throws RepositoryException, NegotiatorException
NegotiationParty
from repository items and
initializes it.partyRepItem
- the party referenceprofileRepItem
- the profile to use for this partysession
- the session in which this runsagentID
- the unique agentId to use, or null. If null, a unique ID will
be generated. For all default implementations, this has either
the format "ClassName" if only one such an agent exists (in
case of mediator for example [mediator always has the name
"mediator"]), "Party N" or it has the format "ClassName@N"
with N a unique integer if multiple agents of the same type
can exists.info
- a SessionsInfo object that contains info shared with other
sessions.RepositoryException
NegotiatorException
public NegotiationParty getParty()
public double getUtility(Bid bid)
public double getUtilityWithDiscount(Bid bid)
public UtilitySpace getUtilitySpace()
getUtilitySpace
in interface PartyWithUtility
public Timeline getTimeLine()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
PartyWithUtility
equals
in interface PartyWithUtility
equals
in class java.lang.Object
public void saveStorage(java.util.List<Action> actions, java.util.Map<java.lang.String,java.lang.String> profiles, Tuple<Bid,java.lang.Double> agreement) throws java.io.IOException
SessionsInfo
.actions
- the actions that have been done in the last session. This is
added to the data first, if possible.agreement
- agreement information: Bid and utility of the bid for this
party. Null if no agreement was reached.java.io.IOException
public boolean isMediator()
Mediator
.public boolean isUncertain()
public AgentID getID()
getID
in interface PartyWithUtility
public UncertainPreferenceContainer getUncertainModel()
UncertainPreferenceContainer
or null if the profile was
not an UncertainProfileRepItem
.