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

Public Member Functions | |
| VALUEpropagation () | |
| Default constructor. | |
| VALUEpropagation (DCOPProblemInterface< Val, ?> problem, Boolean swap) | |
| Manual constructor that does not use XML elements. | |
| VALUEpropagation (DCOPProblemInterface< Val, ?> problem, Element parameters) | |
| Constructor from XML elements. | |
| void | reset () |
| Resets the state, only keeping the problem. | |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| The algorithm. | |
| void | setQueue (Queue queue) |
| 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 | FINISH_MSG_TYPE = AgentInterface.AGENT_FINISHED |
| The type of the message telling the agent finished. | |
| static MessageType | DFS_MSG_TYPE = DFSgeneration.OUTPUT_MSG_TYPE |
| The type of the messages containing information about the DFS. | |
| static MessageType | UTIL_MSG_TYPE = UTILpropagation.OUTPUT_MSG_TYPE |
| The type of the messages containing optimal conditional assignments. | |
| static MessageType | SEPARATOR_MSG_TYPE = UTILpropagation.SEPARATOR_MSG_TYPE |
| The type of the messages containing information about separators. | |
| static final MessageType | VALUE_MSG_TYPE = new MessageType ("DPOP", "VALUEpropagation", "VALUE") |
| The type of the VALUE messages. | |
Protected Member Functions | |
| void | init () |
| Parses the problem. | |
Protected Attributes | |
| Queue | queue |
| The queue on which it should call sendMessage(). | |
| DCOPProblemInterface< Val, ?> | problem |
| The problem. | |
| boolean | started = false |
| Whether the execution of the algorithm has started. | |
| HashMap< String, String[]> | separators |
| For each variable, its separator. | |
| HashMap< String, List< String > > | allChildren |
| For each variable, the list of its children. | |
| HashMap< String, SolutionMessage< Val > > | condAssignments |
| For each variable, its optimal assignment conditioned on the assignments to its separator. | |
| int | nbrVarsDone = 0 |
| The number of variables owned by this agents that have already sent VALUE messages to all their children. | |
Private Member Functions | |
| void | sendVALUEmessage (String child, String[] separator, HashMap< String, Val > optVals, VALUEmsg< Val > valueMsg) |
| Instantiates a VALUE message and sends it. | |
| void | computeOptValAndSendVALUEmsgs (String[] vars, BasicUtilitySolutionSpace< Val, ArrayList< Val > > optAssignments, VALUEmsg< Val > valueMsg) |
| Compute the optimal assignments to some variables, and sends VALUE messages to children accordingly. | |
Private Attributes | |
| HashMap< String, VALUEmsg< Val > > | valueMessages |
| For each variable, the VALUE message received containing its separator's optimal assignments. | |
| HashMap< String, String > | allParents |
| The parent for each of my variables. | |
| HashMap< String, String > | condAssignmentsFiles |
| For each variable, the file containing its optimal assignment conditioned on the assignments to its separator. | |
| HashMap< String, Val > | solution |
| For each variable, its optimal value. | |
| final boolean | swap |
If true, conditional optimal assignments are swapped until the VALUE message is received. | |
| HashMap< String, Integer > | clusterSizes = new HashMap<String, Integer> () |
| How many variables there are in each cluster, identified by its root. | |
| HashMap< String, String > | owners = new HashMap<String, String> () |
| For each child variable, its corresponding agent. | |
VALUE propagation protocol.
| <Val> | type used for variable values |
| frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.VALUEpropagation | ( | ) |
Default constructor.
| frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.VALUEpropagation | ( | DCOPProblemInterface< Val, ?> | problem, |
| Boolean | swap ) |
| frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.VALUEpropagation | ( | DCOPProblemInterface< Val, ?> | problem, |
| Element | parameters ) |
Constructor from XML elements.
| problem | description of the problem |
| parameters | the parameters of the module |
References problem.
|
private |
Compute the optimal assignments to some variables, and sends VALUE messages to children accordingly.
| vars | the variables to be optimized |
| optAssignments | the conditional optimal assignments to the variables |
| valueMsg | the VALUE message received for the variables |
References allChildren, FINISH_MSG_TYPE, frodo2.algorithms.dpop.VALUEmsg< Val extends Addable< Val > >.getDest(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNbrIntVars(), frodo2.algorithms.dpop.VALUEmsg< Val extends Addable< Val > >.getValues(), frodo2.algorithms.dpop.VALUEmsg< Val extends Addable< Val > >.getVariables(), queue, frodo2.communication.Queue.sendMessageToSelf(), sendVALUEmessage(), separators, solution, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
Referenced by notifyIn().

| Collection< MessageType > frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
Reimplemented in frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.
References DFS_MSG_TYPE, FINISH_MSG_TYPE, SEPARATOR_MSG_TYPE, START_MSG_TYPE, UTIL_MSG_TYPE, and VALUE_MSG_TYPE.
|
protected |
Parses the problem.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.notifyIn(), and notifyIn().
| void frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.notifyIn | ( | Message | msg | ) |
The algorithm.
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
Reimplemented in frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.
References computeOptValAndSendVALUEmsgs(), condAssignments, frodo2.communication.MessageType.equals(), FINISH_MSG_TYPE, init(), notifyIn(), UTIL_MSG_TYPE, and valueMessages.
Referenced by notifyIn().

| void frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.reset | ( | ) |
Resets the state, only keeping the problem.
Reimplemented in frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.
|
private |
Instantiates a VALUE message and sends it.
| child | destination variable of the message |
| separator | variables to be mentioned in the message |
| optVals | the optimal values for some variables |
| valueMsg | VALUE message received from parent |
References queue, and sendVALUEmessage().
Referenced by computeOptValAndSendVALUEmsgs(), and sendVALUEmessage().

| void frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
|
protected |
For each variable, the list of its children.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.computeOptValAndSendVALUEmsgs(), and computeOptValAndSendVALUEmsgs().
|
private |
The parent for each of my variables.
|
private |
How many variables there are in each cluster, identified by its root.
|
protected |
For each variable, its optimal assignment conditioned on the assignments to its separator.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.notifyIn(), and notifyIn().
|
private |
For each variable, the file containing its optimal assignment conditioned on the assignments to its separator.
|
static |
The type of the messages containing information about the DFS.
Referenced by getMsgTypes().
|
static |
The type of the message telling the agent finished.
Referenced by computeOptValAndSendVALUEmsgs(), getMsgTypes(), and notifyIn().
|
protected |
The number of variables owned by this agents that have already sent VALUE messages to all their children.
|
private |
For each child variable, its corresponding agent.
|
protected |
The problem.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE(), frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE(), frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE(), frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.sendVALUEmessage(), VALUEpropagation(), and VALUEpropagation().
|
protected |
The queue on which it should call sendMessage().
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.computeOptValAndSendVALUEmsgs(), computeOptValAndSendVALUEmsgs(), frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.getStatsFromQueue(), frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.sendVALUEmessage(), sendVALUEmessage(), and setQueue().
|
static |
The type of the messages containing information about separators.
Referenced by getMsgTypes().
|
protected |
For each variable, its separator.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.computeOptValAndSendVALUEmsgs(), and computeOptValAndSendVALUEmsgs().
|
private |
For each variable, its optimal value.
Referenced by computeOptValAndSendVALUEmsgs().
|
static |
The type of the message telling the module to start.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.getMsgTypes(), and getMsgTypes().
|
protected |
Whether the execution of the algorithm has started.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.notifyIn().
|
private |
If true, conditional optimal assignments are swapped until the VALUE message is received.
Referenced by frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE(), and VALUEpropagation().
|
static |
The type of the messages containing optimal conditional assignments.
Referenced by getMsgTypes(), and notifyIn().
|
static |
The type of the VALUE messages.
Referenced by frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.getMsgTypes(), frodo2.algorithms.dpop.privacy.VariableObfuscation< V extends Addable< V >, U extends Addable< U > >.getMsgTypes(), getMsgTypes(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.VALUEmsg< Val extends Addable< Val > >.VALUEmsg(), and frodo2.algorithms.dpop.VALUEmsg< Val extends Addable< Val > >.VALUEmsg().
|
private |
For each variable, the VALUE message received containing its separator's optimal assignments.
Referenced by notifyIn().