|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
The UTIL propagation phase for O-DPOP. More...

Public Member Functions | |
| UTILpropagation (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| Constructor for the statsreporter. | |
| UTILpropagation (DCOPProblemInterface< Val, U > problem, Element parameters) | |
| Constructor. | |
| UTILpropagation (DCOPProblemInterface< Val, U > problem) | |
| Alternative constructor not using XML. | |
| void | notifyIn (Message msg) |
| The algorithm. | |
| VariableInfo | newVariableInfoInstanceInnerNode (String var, List< String > children, String parent, Val[] ownVariableDomain, List< UtilitySolutionSpace< Val, U > > usedSpaces, int numberOfChildren, U zeroUtility) |
| VariableInfo | newVariableInfoInstanceLeafNode (String var, List< String > children, String parent, Val[] ownVariableDomain, List< UtilitySolutionSpace< Val, U > > usedSpaces, int numberOfChildren, U zeroUtility) |
| void | startProcess (VariableInfo variable, int varIndex) |
| This method starts the algorithm for the specified variable, i.e. | |
| void | processDONE (VariableInfo variable, String sender) |
| Method sets the entry for the corresponding agent of the done array in variable to true. | |
| Public Member Functions inherited from frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > > | |
| UTILpropagationFullDomain (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| Constructor for the statsreporter. | |
| void | getStatsFromQueue (Queue queue) |
| U | getOptUtil () |
| long | getFinalTime () |
| Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages. | |
| void | setSilent (boolean silent) |
| Integer | getMaxMsgDim () |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| The algorithm. | |
| VariableInfo | newVariableInfoInstanceInnerNode (String var, List< String > children, String parent, Val[] ownVariableDomain, List< UtilitySolutionSpace< Val, U > > usedSpaces, int numberOfChildren, U zeroUtility) |
Method to be used when var is an innernode. | |
| VariableInfo | newVariableInfoInstanceLeafNode (String var, List< String > children, String parent, Val[] ownVariableDomain, List< UtilitySolutionSpace< Val, U > > usedSpaces, int numberOfChildren, U zeroUtility) |
Method to be used when var is an leafnode. | |
| void | setQueue (Queue queue) |
| void | startProcess (VariableInfo variable, int varIndex) |
| This method starts the algorithm for the specified variable, i.e. | |
| void | reset () |
Protected Member Functions | |
| LeafNode< U > | leafNodeInstance () |
| void | utilPropagationFinished (String variableID, GoodsTree< Val, U, LeafNode< U > > tree, U utility, int domainSize) |
| void | processASK (VariableInfo variable) |
| Method to process the ASK messages received by this agent. | |
| Protected Member Functions inherited from frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > > | |
| L | leafNodeInstance () |
| void | init () |
| Method used to initialize the agents fields. | |
| void | processGOOD (VariableInfo variable, Good< Val, U > g, String sender, HashMap< String, Val[]> domains) |
| Method used to process the GOOD messages received by this agent. | |
| void | processASK (VariableInfo variable) |
| Method to process the ASK messages received by this agent. | |
| void | processDONE (VariableInfo variable, String sender) |
| Method sets the entry for the corresponding agent of the done array in variable to true. | |
| void | sendMessageToVariable (String receiver, Message msg, String variableID) |
| Send a message to a variable. | |
| void | log (String variableID, String message) |
| Log function used to print the variables state during debugging. | |
| void | utilPropagationFinished (String variableID, GoodsTree< Val, U, L > tree, U utility, int inducedWidth) |
| Method called when util propagation phase for a certain variable has finished. | |
Private Member Functions | |
| void | processGOOD (VariableInfo variable, Good< Val, U > g, String sender, int[] domInfo, String[] variables) |
| Method used to process the GOOD messages received by this agent. | |
Additional Inherited Members | |
| Static Public Attributes inherited from frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > > | |
| static MessageType | START_MSG_TYPE |
| The type of the message telling the module to start. | |
| static final MessageType | UTIL_MSG |
| The type of the UTIL message. | |
| static final MessageType | UTIL_MSG_VARS |
| The type of a UTIL message with variables. | |
| static final MessageType | UTIL_MSG_DOM |
| The type of the UTIL message with domain information. | |
| static final MessageType | UTIL_MSG_DOM_VARS |
| The type of the UTIL message with domain information. | |
| static final MessageType | ASK_MSG |
| The type of the ASK message. | |
| static final MessageType | DONE_MSG |
| The type of the DONE message. | |
| static final MessageType | OPT_UTIL_MSG_TYPE |
| The type of the messages containing optimal utility values sent by roots. | |
| static final MessageType | VALUE_PROP_START_MSG_TYPE |
| The type of the message used to start the value propagation. | |
| static final MessageType | GOODS_TREE_MSG_TYPE |
| The type of the message used to send the GoodsTree to the VALUE propagation module. | |
| static final MessageType | UTIL_STATS_MSG_TYPE |
| The type of messages sent to the statistics monitor. | |
| Protected Attributes inherited from frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > > | |
| boolean | reportStats |
| Whether to report stats. | |
| U | optTotalUtil |
| The optimal, total utility reported to the stats gatherer. | |
| Queue | queue |
| The queue through which all communication flows. | |
| DCOPProblemInterface< Val, U > | problem |
| The agent's problem. | |
| HashMap< String, Integer > | variablePointer |
| Gives the variables' indexes in the arrays. | |
| VariableInfo[] | infos |
| The VariableInfo for each variable. | |
| boolean[] | ready |
| Tells one when a variable is ready to start the algorithm. | |
| Map< String, String > | owners |
| For each variable the agent that owns it. | |
| boolean | started |
| Whether the algorithm has been started. | |
| boolean[] | receivedASK |
| For each variable it stores whether an ASK message has been received. | |
| HashMap< String, BufferedWriter > | loggers |
| A list of buffered writers used to log information during debugging. | |
| U | infeasibleUtil |
| The minus infinty object. | |
| boolean | agentFinished |
true when the agent has finished, and false otherwise | |
| Integer | maxMsgDim |
| In stats gatherer mode, the maximum number of variables in a UTIL message. | |
| long | finalTime |
| The time at which all UTIL propagation modules are finished. | |
| boolean | maximize |
true when solving a maximization problem, and false otherwise | |
| boolean | collectStats |
true when statistics should be collected in the tree, and false otherwise | |
| Static Protected Attributes inherited from frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > > | |
| static final boolean | LOG |
| To log or not to log. | |
The UTIL propagation phase for O-DPOP.
| <Val> | type used for variable values |
| <U> | type used for utility values |
| frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagation | ( | Element | parameters, |
| DCOPProblemInterface< Val, U > | problem ) |
Constructor for the statsreporter.
| problem | the overall problem |
| parameters | the description of what statistics should be reported (currently unused) |
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.
| frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagation | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) |
Constructor.
| problem | The problem description |
| parameters | The parameters |
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.
| frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagation | ( | DCOPProblemInterface< Val, U > | problem | ) |
Alternative constructor not using XML.
| problem | The problem description |
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.
|
protected |
Referenced by newVariableInfoInstanceInnerNode().
| VariableInfo frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.newVariableInfoInstanceInnerNode | ( | String | var, |
| List< String > | children, | ||
| String | parent, | ||
| Val[] | ownVariableDomain, | ||
| List< UtilitySolutionSpace< Val, U > > | usedSpaces, | ||
| int | numberOfChildren, | ||
| U | zeroUtility ) |
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.collectStats, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.infeasibleUtil, leafNodeInstance(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.maximize, and frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.

| VariableInfo frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.newVariableInfoInstanceLeafNode | ( | String | var, |
| List< String > | children, | ||
| String | parent, | ||
| Val[] | ownVariableDomain, | ||
| List< UtilitySolutionSpace< Val, U > > | usedSpaces, | ||
| int | numberOfChildren, | ||
| U | zeroUtility ) |
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.collectStats, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.infeasibleUtil, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.maximize, and frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.
| void frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
The algorithm.
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.agentFinished, frodo2.communication.MessageType.equals(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.finalTime, notifyIn(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.OPT_UTIL_MSG_TYPE, and frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.queue.
Referenced by notifyIn().

|
protected |
Method to process the ASK messages received by this agent.
| variable | The variable information |
References frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.LOG, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.log(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.queue, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.reportStats, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.sendMessageToVariable(), and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
Referenced by processDONE(), and startProcess().

| void frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.processDONE | ( | VariableInfo | variable, |
| String | sender ) |
Method sets the entry for the corresponding agent of the done array in variable to true.
| variable | The variables to whom this message has been sent |
| sender | The sender of the message |
References frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.LOG, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.log(), processASK(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.queue, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.reportStats, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.

|
private |
Method used to process the GOOD messages received by this agent.
| variable | The variable information |
| g | The good received |
| sender | The sender of the good |
| domInfo | domain size info reported by the child |
| variables | the variables for which domain size info is reported |
References frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.LOG, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.log(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.queue, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.reportStats, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.sendMessageToVariable(), and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.

| void frodo2.algorithms.odpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.startProcess | ( | VariableInfo | variable, |
| int | varIndex ) |
This method starts the algorithm for the specified variable, i.e.
if the variable is the root an ASK message is sent. If not an ASK message is sent if an ASK message has been received
| variable | The variable info |
| varIndex | The index of the variable |
References frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.LOG, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.log(), processASK(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.receivedASK, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.sendMessageToVariable(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.toString(), and utilPropagationFinished().

|
protected |
References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.queue, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.reportStats, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
Referenced by startProcess().