|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Classical UTIL propagation protocol. More...

Classes | |
| class | SolutionMessage |
| A message holding the optimal assignments to a variable, conditioned on the assignments to the variables in its separator. More... | |
| class | SeparatorMessage |
| A message holding the separator of a given child variable. More... | |
| class | OptUtilMessage |
| Message sent by roots containing the optimal utility value of their DFS tree. More... | |
| class | StatsMessage |
| Message containing statistics. More... | |
| class | VariableInfo |
| A convenience class used to store information about a variable. More... | |
Public Member Functions | |
| CountSolutionsUTIL (DCOPProblemInterface< Val, U > problem) | |
| Constructor. | |
| CountSolutionsUTIL (DCOPProblemInterface< Val, U > problem, Element parameters) throws ClassNotFoundException | |
| Constructor from XML descriptions. | |
| void | reset () |
| CountSolutionsUTIL (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| The constructor called in "statistics gatherer" mode. | |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| The algorithm. | |
| void | setQueue (Queue queue) |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| Integer | getMaxMsgDim () |
| U | getOptUtil () |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
Static Public Attributes | |
| static MessageType | START_MSG_TYPE = AgentInterface.START_AGENT |
| The type of the message telling the module to start. | |
| static MessageType | DFS_MSG_TYPE = DFSgeneration.OUTPUT_MSG_TYPE |
| The type of the messages containing information about the DFS. | |
| static final MessageType | UTIL_MSG_TYPE = UTILpropagation.UTIL_MSG_TYPE |
| The type of the messages containing utilities. | |
| static final MessageType | OUTPUT_MSG_TYPE = new MessageType ("Count-DPOP", "UTIL", "UTILoutput") |
| The type of the messages containing conditional optimal assignments. | |
| static final MessageType | SEPARATOR_MSG_TYPE = new MessageType ("Count-DPOP", "UTIL", "Separator") |
| The type of the messages containing separators. | |
| static final MessageType | OPT_UTIL_MSG_TYPE = new MessageType ("Count-DPOP", "UTIL", "OptUtil") |
| The type of the messages containing optimal utility values sent by roots. | |
| static final MessageType | UTIL_STATS_MSG_TYPE = new MessageType ("Count-DPOP", "UTIL", "UTILstats") |
| The type of messages sent to the statistics monitor. | |
Protected Member Functions | |
| void | init () |
| Parses the problem. | |
| void | sendSeparator (String sender, String dest, String[] separator) |
| Sends a message to the VALUEpropagation module containing the separator of a variable. | |
| ProjOutput< Val, U > | project (UtilitySolutionSpace< Val, U > space, String var) |
| Projects the input variable from the input space. | |
| void | sendToParent (String var, String parent, UtilitySolutionSpace< Val, U > space) |
| Sends a UTIL message. | |
| void | sendOutput (UtilitySolutionSpace< Val, U > space, String root) |
| Sends the output optimal utility to itself (i.e. | |
Protected Attributes | |
| boolean | withAnonymVars = false |
| Whether the parser should consider variables with no specified owner. | |
| DCOPProblemInterface< Val, U > | problem |
| The problem. | |
| boolean | started = false |
| Whether the execution of the algorithm has been started. | |
| boolean | maximize = true |
true if we want to maximize utility, false if we want to minimize cost | |
| Queue | queue |
| The queue on which it should call sendMessage(). | |
| Map< String, VariableInfo > | infos = new HashMap<String, VariableInfo> () |
| For each variable this agent owns, its relevant information. | |
| Map< String, String > | owners = new HashMap<String, String> () |
| For each known variable, the name of the agent that owns it. | |
| U | optUtil |
| The optimal utility found to the problem. | |
Private Member Functions | |
| void | record (UtilitySolutionSpace< Val, U > space, VariableInfo info) |
| Records the input space until spaces from all children have been received. | |
| void | projectAndSend (VariableInfo info) |
| Projects out a variable and sends the result to its parent (if any) or to itself (to initiate VALUE propagation). | |
Private Attributes | |
| boolean | reportStats = true |
| Whether to report stats. | |
| Integer | maxMsgDim = 0 |
| In stats gatherer mode, the maximum number of variables in a UTIL message. | |
Classical UTIL propagation protocol.
| <Val> | type used for variable values |
| <U> | type used for utility values |
| frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.CountSolutionsUTIL | ( | DCOPProblemInterface< Val, U > | problem | ) |
| frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.CountSolutionsUTIL | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) throws ClassNotFoundException |
Constructor from XML descriptions.
| problem | description of the problem |
| parameters | description of the parameters of UTILpropagation |
| ClassNotFoundException | if the module parameters specify an unknown class for utility values |
References problem.
| frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.CountSolutionsUTIL | ( | Element | parameters, |
| DCOPProblemInterface< Val, U > | problem ) |
The constructor called in "statistics gatherer" mode.
| problem | the overall problem |
| parameters | the description of what statistics should be reported (currently unused) |
References problem.
| Integer frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.getMaxMsgDim | ( | ) |
| Collection< MessageType > frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes | ( | ) |
| U frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.getOptUtil | ( | ) |
Referenced by frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.count().
| void frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References OPT_UTIL_MSG_TYPE, queue, and UTIL_STATS_MSG_TYPE.
|
protected |
Parses the problem.
References problem.
| void frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
The algorithm.
For each variable that it owns, the agent waits for the reception of all UTIL messages from all child variables, plus one corresponding to a private constraint sent by the DPOP agent.
| msg | the message received |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.communication.MessageType.equals(), notifyIn(), and OPT_UTIL_MSG_TYPE.
Referenced by notifyIn().

|
protected |
Projects the input variable from the input space.
| space | the space |
| var | the variable to project out |
References maximize, and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.project().

|
private |
Projects out a variable and sends the result to its parent (if any) or to itself (to initiate VALUE propagation).
| info | information about the variable to be projected out |
References projectAndSend(), queue, and sendOutput().
Referenced by projectAndSend().

|
private |
Records the input space until spaces from all children have been received.
| space | the space to be recorded |
| info | the variable info |
| void frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
|
protected |
Sends the output optimal utility to itself (i.e.
the VALUEpropagation listener) and to the statistics monitor
| space | the final frontier |
| root | the root of the DFS |
References infos, frodo2.output, queue, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
Referenced by projectAndSend().
|
protected |
Sends a message to the VALUEpropagation module containing the separator of a variable.
| sender | sender variable |
| dest | destination variable |
| separator | the separator of the destination variable |
References queue.
|
protected |
Sends a UTIL message.
| var | the sender of the message |
| parent | the destination of the message |
| space | the content of the message |
References infos, owners, queue, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
| void frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.setSilent | ( | boolean | silent | ) |
|
static |
The type of the messages containing information about the DFS.
Referenced by getMsgTypes().
|
protected |
For each variable this agent owns, its relevant information.
Referenced by sendOutput(), and sendToParent().
|
protected |
true if we want to maximize utility, false if we want to minimize cost
Referenced by project().
|
private |
In stats gatherer mode, the maximum number of variables in a UTIL message.
|
static |
The type of the messages containing optimal utility values sent by roots.
Referenced by getStatsFromQueue(), notifyIn(), and frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.OptUtilMessage< U extends Addable< U > >.OptUtilMessage().
|
protected |
The optimal utility found to the problem.
|
static |
The type of the messages containing conditional optimal assignments.
|
protected |
For each known variable, the name of the agent that owns it.
Referenced by sendToParent().
|
protected |
The problem.
Referenced by CountSolutionsUTIL(), CountSolutionsUTIL(), CountSolutionsUTIL(), and init().
|
protected |
The queue on which it should call sendMessage().
Referenced by getStatsFromQueue(), projectAndSend(), sendOutput(), sendSeparator(), sendToParent(), and setQueue().
|
private |
Whether to report stats.
|
static |
The type of the messages containing separators.
|
static |
The type of the message telling the module to start.
Referenced by getMsgTypes().
|
protected |
Whether the execution of the algorithm has been started.
|
static |
The type of the messages containing utilities.
Referenced by getMsgTypes().
|
static |
The type of messages sent to the statistics monitor.
Referenced by getStatsFromQueue(), and frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.StatsMessage.StatsMessage().
|
protected |
Whether the parser should consider variables with no specified owner.