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

Classes | |
| class | SolutionSizeMessage |
Public Member Functions | |
| CountSolutionsVALUE (DCOPProblemInterface< Val, U > problem) | |
| Manual constructor that does not use XML elements. | |
| CountSolutionsVALUE (DCOPProblemInterface< Val, U > problem, Element parameters) | |
| Constructor from XML elements. | |
| void | reset () |
| CountSolutionsVALUE (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) |
| HashMap< String, String[]> | getReportedVariables () |
| HashMap< String, ArrayList< Val[]> > | getReportedValues () |
| 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 MessageType | UTIL_MSG_TYPE = CountSolutionsUTIL.OUTPUT_MSG_TYPE |
| The type of the messages containing optimal conditional assignments. | |
| static MessageType | SEPARATOR_MSG_TYPE = CountSolutionsUTIL.SEPARATOR_MSG_TYPE |
| The type of the messages containing information about separators. | |
| static final MessageType | VALUE_MSG_TYPE = new MessageType ("Count-DPOP", "VALUE", "VALUE") |
| The type of the VALUE messages. | |
| static final MessageType | OUTPUT_MSG_TYPE = new MessageType ("Count-DPOP", "VALUE", "Output") |
| The type of the output messages containing the optimal assignment to a variable. | |
| static final MessageType | SOL_SIZE_MSG_TYPE = new MessageType ("Count-DPOP", "VALUE", "Solution size") |
| The type of the message containing the number of possible solutions seen from a leaf's perspective. | |
Protected Member Functions | |
| void | init () |
| Parses the problem. | |
Protected Attributes | |
| Queue | queue |
| The queue on which it should call sendMessage(). | |
| boolean | started = false |
| Whether the execution of the algorithm has started. | |
| HashMap< String, String[]> | separators = new HashMap<String, String[]> () |
| For each variable, its separator. | |
| HashMap< String, List< String > > | allChildren = new HashMap< String, List<String> > () |
| For each variable, the list of its children. | |
| HashMap< String, Boolean > | isLeaf = new HashMap<String, Boolean> () |
| Stores, for each variable, whether it is a leaf or not s. | |
| HashMap< String, BasicUtilitySolutionSpace< Val, U > > | condAssignments |
| For each variable, its optimal assignment conditioned on the assignments to its separator. | |
| Map< String, String > | owners = new HashMap<String, String> () |
| For each known variable, the name of the agent that owns it. | |
| int | remainingVars |
| The number of variables owned by this agents that still have not sent VALUE messages to all their children. | |
| int | numberOfSolutions = 1 |
| The total number of solutions to the problem. | |
Private Member Functions | |
| void | sendVALUEmessage (String child, String[] variablesOut, ArrayList< Val[]> valuesOut) |
| Instantiates a VALUE message and sends it. | |
| void | computeOptValAndSendVALUEmsgs (String var, BasicUtilitySolutionSpace< Val, U > optSpace, VALUEmsg< Val > valueMsg) |
| Compute the optimal assignment to a variable, and sends VALUE messages to its children accordingly. | |
Private Attributes | |
| DCOPProblemInterface< Val, U > | problem |
| The problem. | |
| HashMap< String, VALUEmsg< Val > > | valueMessages = new HashMap< String, VALUEmsg<Val> > () |
| For each variable, the VALUE message received containing its separator's optimal assignments. | |
| HashMap< String, ArrayList< Val[]> > | solution = new HashMap<String, ArrayList<Val[]>> () |
| For each variable, its optimal value. | |
| HashMap< String, String[]> | reportedVariables = new HashMap<String, String[]>() |
| The variables reported to each variable. | |
| HashMap< String, ArrayList< Val[]> > | reportedValues = new HashMap<String, ArrayList<Val[]>>() |
| The values reported to each variable. | |
| HashMap< String, String[]> | outVariables = new HashMap<String, String[]> () |
| The out variables calculated for each variable. | |
| boolean | reportStats = true |
| Whether to report stats. | |
VALUE propagation protocol.
| <Val> | type used for variable values |
| <U> | type used for utility values |
Improve the implementation by reasoning on groups of variables to be projected together.
This should be inheriting VALUEpropagation.
| frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.CountSolutionsVALUE | ( | DCOPProblemInterface< Val, U > | problem | ) |
Manual constructor that does not use XML elements.
| problem | the problem |
References problem.
| frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.CountSolutionsVALUE | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) |
Constructor from XML elements.
| problem | description of the problem |
| parameters | not used because VALUEpropagation cannot be parameterized |
References problem.
| frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.CountSolutionsVALUE | ( | 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.
|
private |
Compute the optimal assignment to a variable, and sends VALUE messages to its children accordingly.
| var | the variable to be optimized |
| optSpace | the optimal utility as a function of the variable |
| valueMsg | the VALUE message received for variable var |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, allChildren, computeOptValAndSendVALUEmsgs(), frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.getMinInfUtility(), frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.getPlusInfUtility(), isLeaf, frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.maximize(), outVariables, frodo2.communication.Queue.sendMessage(), frodo2.communication.Queue.sendMessageToSelf(), sendVALUEmessage(), solution, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
Referenced by computeOptValAndSendVALUEmsgs(), and notifyIn().

| Collection< MessageType > frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes | ( | ) |
| HashMap< String, ArrayList< Val[]> > frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.getReportedValues | ( | ) |
References reportedValues.
Referenced by frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.count().
| HashMap< String, String[]> frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.getReportedVariables | ( | ) |
References reportedVariables.
Referenced by frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.count().
| void frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References OUTPUT_MSG_TYPE, queue, and SOL_SIZE_MSG_TYPE.
|
protected |
| void frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
The algorithm.
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, computeOptValAndSendVALUEmsgs(), condAssignments, frodo2.communication.MessageType.equals(), init(), notifyIn(), SOL_SIZE_MSG_TYPE, UTIL_MSG_TYPE, and valueMessages.
Referenced by notifyIn().

| void frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
References reportedValues, and reportedVariables.
|
private |
Instantiates a VALUE message and sends it.
| child | destination variable of the message |
| variablesOut | the variables |
| valuesOut | assignments to the variables |
References queue, and sendVALUEmessage().
Referenced by computeOptValAndSendVALUEmsgs(), and sendVALUEmessage().

| void frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.setSilent | ( | boolean | silent | ) |
|
protected |
For each variable, the list of its children.
Referenced by computeOptValAndSendVALUEmsgs().
|
protected |
For each variable, its optimal assignment conditioned on the assignments to its separator.
Referenced by notifyIn().
|
static |
The type of the messages containing information about the DFS.
Referenced by getMsgTypes().
|
protected |
Stores, for each variable, whether it is a leaf or not s.
Referenced by computeOptValAndSendVALUEmsgs().
|
protected |
The total number of solutions to the problem.
|
static |
The type of the output messages containing the optimal assignment to a variable.
Referenced by getStatsFromQueue().
|
private |
The out variables calculated for each variable.
Referenced by computeOptValAndSendVALUEmsgs().
|
protected |
For each known variable, the name of the agent that owns it.
|
private |
The problem.
Referenced by CountSolutionsVALUE(), CountSolutionsVALUE(), CountSolutionsVALUE(), and init().
|
protected |
The queue on which it should call sendMessage().
Referenced by getStatsFromQueue(), sendVALUEmessage(), and setQueue().
|
protected |
The number of variables owned by this agents that still have not sent VALUE messages to all their children.
|
private |
The values reported to each variable.
Referenced by getReportedValues(), and reset().
|
private |
The variables reported to each variable.
Referenced by getReportedVariables(), and reset().
|
private |
Whether to report stats.
|
static |
The type of the messages containing information about separators.
Referenced by getMsgTypes().
|
protected |
For each variable, its separator.
|
static |
The type of the message containing the number of possible solutions seen from a leaf's perspective.
Referenced by getStatsFromQueue(), notifyIn(), and frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.SolutionSizeMessage< Val extends Addable< Val > >.SolutionSizeMessage().
|
private |
For each variable, its optimal value.
Referenced by computeOptValAndSendVALUEmsgs().
|
static |
The type of the message telling the module to start.
Referenced by getMsgTypes().
|
protected |
Whether the execution of the algorithm has started.
|
static |
The type of the messages containing optimal conditional assignments.
Referenced by getMsgTypes(), and notifyIn().
|
static |
The type of the VALUE messages.
Referenced by getMsgTypes(), and frodo2.algorithms.dpop.count.VALUEmsg< Val extends Addable< Val > >.VALUEmsg().
|
private |
For each variable, the VALUE message received containing its separator's optimal assignments.
Referenced by notifyIn().