jmadem
Class DecisionData

java.lang.Object
  extended by jmadem.DecisionData

public class DecisionData
extends java.lang.Object

Data structure holding all the information related to a specific decision problem.

Author:
Francisco Grimaldo

Field Summary
private  java.util.List<Atom> agents
          Agents involved in the decision-making.
private  java.util.List<Term> allocations
          Allocations being considered as solutions for the decision problem.
private  boolean decisionClosed
          Flag indicating that the winner determination problem as already started for this decision.
private  int id
          Decision id
private static int id_generator
          Decision id generator
private  Multimodality multimodality
          Type of multimodality used in the Winner Determination Problem
private  boolean multipleSolution
          Flag indicating whether the winner determination problem returns all possible winners for the decision or just one randomly chosen.
private  java.util.Map<Atom,java.lang.Float> personalWeights
          Personal weights representing the internal attitude of the agent towards other individuals.
private  boolean returnWelfare
          Flag indicating whether the winner determination problem returns the social welfare of winner allocations.
private  java.util.concurrent.ScheduledFuture<?> timeoutTask
          Task object that can be used to cancel or check execution of the timeout.
private  java.util.List<Atom> utilityFunctions
          Names of the utility functions being considered.
private  java.util.concurrent.ConcurrentMap<Atom,java.util.List<java.lang.Float>> utilityValues
          Utility values received from the agents involved in the decision.
private  java.util.Map<Atom,java.lang.Float> utilityWeights
          Utility weights representing the importance given to each point of view in the multi-modal agent decision making.
private  Cuf welfare
          Social welfare considered by the agent
 
Constructor Summary
DecisionData(java.util.List<Atom> ags, java.util.List<Term> allocs, java.util.List<Atom> uFuncs, java.util.concurrent.ConcurrentMap<Atom,java.lang.Float> pW, java.util.concurrent.ConcurrentMap<Atom,java.lang.Float> uW, Cuf sw, Multimodality m, boolean multipleSolutions, boolean returnWelfare)
          DecisionData constructor.
 
Method Summary
 void addBid(java.lang.String bidder, java.util.List<Term> uValues)
          Adds a bid to the MADeM decision data.
 boolean areAllBidsReceived()
          Checks whether all agents have already bid and their bids have been received.
 java.util.List<Atom> getAgents()
          Returns the name of the agents involved in the decision.
 java.util.List<Term> getAllocations()
          Returns the allocations considered as solutions for the decision problem.
 int getId()
          Returns the identifier of the decision making.
 Multimodality getMultimodality()
          Gets the type of multimodality used in the Winner Determination Problem.
 java.util.Map<Atom,java.lang.Float> getPersonalWeights()
          Returns the personal weights for the agents involved in the decision.
 boolean getReturnWelfare()
          Returns whether the winner determination problem (WDP) returns the social welfare of winner allocations.
 java.util.concurrent.ScheduledFuture<?> getTimeoutTask()
          Returns the task object that can be used to cancel or check execution of the timeout..
 java.util.List<Atom> getUtilityFunctions()
          Returns the name of the utility functions used to express preference.
 java.util.concurrent.ConcurrentMap<Atom,java.util.List<java.lang.Float>> getUtilityValues()
          Returns the utility values received from the agents involved in the decision.
 java.util.Map<Atom,java.lang.Float> getUtilityWeights()
          Returns the utility weights for the utility functions being used.
 Cuf getWelfare()
          Returns the social welfare applied to solve the decision problem.
 boolean isDecisionClosed()
          Returns whether the winner determination problem (WDP) has already started for this decision.
 boolean isMultipleSolution()
          Returns whether the winner determination problem (WDP) returns all possible winners for the decision or just one randomly chosen.
 void setDecisionClosed(boolean decisionClosed)
          Sets the value of the flag indicating whether the winner determination problem (WDP) has already started for this decision.
 void setMultimodality(Multimodality new_multimodality)
          Changes the type of multimodality used in the Winner Determination Problem.
 void setMultipleSolution(boolean multipleSolution)
          Sets the value of the flag indicating whether the winner determination problem (WDP) returns all possible winners for the decision or just one randomly chosen.
 void setReturnWelfare(boolean returnWelfare)
          Sets the value of the flag indicating whether the winner determination problem (WDP) returns the social welfare of winner allocations.
 void setTimeoutTask(java.util.concurrent.ScheduledFuture<?> timeoutTask)
          Sets the task object that can be used to cancel or check execution of the timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id_generator

private static int id_generator
Decision id generator


id

private int id
Decision id


agents

private java.util.List<Atom> agents
Agents involved in the decision-making.


allocations

private java.util.List<Term> allocations
Allocations being considered as solutions for the decision problem.


utilityFunctions

private java.util.List<Atom> utilityFunctions
Names of the utility functions being considered.


utilityWeights

private java.util.Map<Atom,java.lang.Float> utilityWeights
Utility weights representing the importance given to each point of view in the multi-modal agent decision making.


personalWeights

private java.util.Map<Atom,java.lang.Float> personalWeights
Personal weights representing the internal attitude of the agent towards other individuals.


welfare

private Cuf welfare
Social welfare considered by the agent


multimodality

private Multimodality multimodality
Type of multimodality used in the Winner Determination Problem


utilityValues

private java.util.concurrent.ConcurrentMap<Atom,java.util.List<java.lang.Float>> utilityValues
Utility values received from the agents involved in the decision.


decisionClosed

private boolean decisionClosed
Flag indicating that the winner determination problem as already started for this decision.


multipleSolution

private boolean multipleSolution
Flag indicating whether the winner determination problem returns all possible winners for the decision or just one randomly chosen.


returnWelfare

private boolean returnWelfare
Flag indicating whether the winner determination problem returns the social welfare of winner allocations.


timeoutTask

private java.util.concurrent.ScheduledFuture<?> timeoutTask
Task object that can be used to cancel or check execution of the timeout.

Constructor Detail

DecisionData

DecisionData(java.util.List<Atom> ags,
             java.util.List<Term> allocs,
             java.util.List<Atom> uFuncs,
             java.util.concurrent.ConcurrentMap<Atom,java.lang.Float> pW,
             java.util.concurrent.ConcurrentMap<Atom,java.lang.Float> uW,
             Cuf sw,
             Multimodality m,
             boolean multipleSolutions,
             boolean returnWelfare)
DecisionData constructor.

Parameters:
ags - names of the agents involved in the decision
allocs - allocations being considered as solutions for the decision problem
uFuncs - names of the different utility functions to pay attention to
pW - personal weights to be applied over external preferences
uW - utility weights in the multi-modal decision
sw - type of social welfare being considered
m - type of multimodality used in the Winner Determination Problem
multipleSolutions - ask for all possible winners or just one randomly chosen
returnWelfare - whether to return the social welfare of winner allocations
Method Detail

setTimeoutTask

public void setTimeoutTask(java.util.concurrent.ScheduledFuture<?> timeoutTask)
Sets the task object that can be used to cancel or check execution of the timeout.

Parameters:
timeoutTask - the timeout task object

getTimeoutTask

public java.util.concurrent.ScheduledFuture<?> getTimeoutTask()
Returns the task object that can be used to cancel or check execution of the timeout..

Returns:
the timeout task object

getId

public int getId()
Returns the identifier of the decision making.

Returns:
decision id for the decision making

isDecisionClosed

public boolean isDecisionClosed()
Returns whether the winner determination problem (WDP) has already started for this decision.

Returns:
true if the WDP has already started, false otherwise

setDecisionClosed

public void setDecisionClosed(boolean decisionClosed)
Sets the value of the flag indicating whether the winner determination problem (WDP) has already started for this decision.

Parameters:
decisionClosed - new value for the flag

setMultipleSolution

public void setMultipleSolution(boolean multipleSolution)
Sets the value of the flag indicating whether the winner determination problem (WDP) returns all possible winners for the decision or just one randomly chosen.

Parameters:
multipleSolution - new value for the flag

isMultipleSolution

public boolean isMultipleSolution()
Returns whether the winner determination problem (WDP) returns all possible winners for the decision or just one randomly chosen.

Returns:
true if the WDP returns all possible winners, false otherwise

setReturnWelfare

public void setReturnWelfare(boolean returnWelfare)
Sets the value of the flag indicating whether the winner determination problem (WDP) returns the social welfare of winner allocations.

Parameters:
returnWelfare - new value for the flag

getReturnWelfare

public boolean getReturnWelfare()
Returns whether the winner determination problem (WDP) returns the social welfare of winner allocations.

Returns:
true if the WDP returns the social welfare, false otherwise

addBid

public void addBid(java.lang.String bidder,
                   java.util.List<Term> uValues)
Adds a bid to the MADeM decision data.

Parameters:
bidder - name of the bidder agent
uValues - utility values obtained by the set utility functions being considered for the different allocations

areAllBidsReceived

public boolean areAllBidsReceived()
Checks whether all agents have already bid and their bids have been received.

Returns:
true if all bids have been received, false otherwise

getAgents

public java.util.List<Atom> getAgents()
Returns the name of the agents involved in the decision.

Returns:
the name of the agents into a Vector

getPersonalWeights

public java.util.Map<Atom,java.lang.Float> getPersonalWeights()
Returns the personal weights for the agents involved in the decision.

Returns:
the personal weights into a ConcurrentHashMap, where the keys of the map are the names of the agents

getAllocations

public java.util.List<Term> getAllocations()
Returns the allocations considered as solutions for the decision problem.

Returns:
the allocations into a Vector

getUtilityFunctions

public java.util.List<Atom> getUtilityFunctions()
Returns the name of the utility functions used to express preference.

Returns:
the name of the utility functions into a Vector

getUtilityWeights

public java.util.Map<Atom,java.lang.Float> getUtilityWeights()
Returns the utility weights for the utility functions being used.

Returns:
the utility weights into a ConcurrentHashMap, where the keys of the map are the names of the utility functions

getWelfare

public Cuf getWelfare()
Returns the social welfare applied to solve the decision problem.

Returns:
the social welfare for the decision

getUtilityValues

public java.util.concurrent.ConcurrentMap<Atom,java.util.List<java.lang.Float>> getUtilityValues()
Returns the utility values received from the agents involved in the decision.

Returns:
the utility values into a ConcurrentHashMap, where the keys of the map are the names of the bidders

setMultimodality

public void setMultimodality(Multimodality new_multimodality)
Changes the type of multimodality used in the Winner Determination Problem.

Parameters:
new_multimodality - new type of multimodality

getMultimodality

public Multimodality getMultimodality()
Gets the type of multimodality used in the Winner Determination Problem.

Returns:
the name of the type of multimodality