|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
O-DPOP's VALUE propagation module. More...

Classes | |
| class | AssignmentMessage |
| A message holding an assignment to a variable. More... | |
Public Member Functions | |
| VALUEpropagation (Element parameters, DCOPProblemInterface< Val, U > problem) | |
| Constructor used for stats reporter. | |
| VALUEpropagation (DCOPProblemInterface< Val, U > problem, Element parameters) | |
| Constructor used in the AgentFactory. | |
| void | getStatsFromQueue (Queue queue) |
| long | getFinalTime () |
| Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages. | |
| double | getAverageFillTreePercentage () |
| double | getAverageDummyFillTreePercentage () |
| double | getAverageNumberOfDummies () |
| double | getPercentageOfGoodsSent () |
| U | getMaximalCutSum () |
| void | setSilent (boolean silent) |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | reset () |
| 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 final MessageType | VALUE_MSG_TYPE = new MessageType ("O-DPOP", "VALUEpropagation", "VALUE") |
| The type of the value message. | |
| static final MessageType | GOODS_TREE_REQUEST_MESSAGE = new MessageType ("O-DPOP", "VALUEpropagation", "Goodstree request") |
| The type of the message used to request the GoodsTree from the UTIL propagation module. | |
| static final MessageType | OUTPUT_MSG_TYPE = new MessageType ("O-DPOP", "VALUEpropagation", "OutputVALUEpropagation") |
| The type of the output messages containing the optimal assignment to a variable. | |
Protected Member Functions | |
| void | sendMessageToVariable (String receiver, Message msg) |
| Sends a message to a variable. | |
| void | log (String variableID, String message) |
| Log function used to print the variables state during debugging. | |
Protected Attributes | |
| Val[][] | domains |
| For each variable owned by this agent, its domain. | |
| HashMap< String, BufferedWriter > | loggers |
| A list of buffered writers used to log information during debugging. | |
Static Protected Attributes | |
| static final boolean | LOG = false |
| To log or not to log. | |
Private Member Functions | |
| void | init () |
| Initializes the agent's variables. | |
| void | findOptimalAssignmentAndSend (String varID, int varIndex, GoodsTree< Val, U, LeafNode< U > > tree) |
| Given the GoodsTree and the context, this method determines the value a variable should take. | |
Private Attributes | |
| boolean | reportStats = true |
| Whether to report stats. | |
| DCOPProblemInterface< Val, U > | problem |
| The agent's problem. | |
| HashMap< String, Integer > | variablePointer |
| For each variable its index in the arrays. | |
| Map< String, String > | owners |
| For each variable the agent that owns it. | |
| ArrayList< List< String > > | children |
| Per variable a list of its children. | |
| boolean[] | root |
| For each variable whether it is a root. | |
| ArrayList< HashMap< String, Val > > | contextMap |
| For each variable its context. | |
| boolean | started |
true when this agent has been initialized | |
| Queue | queue |
| This agent's queue. | |
| int | variablesReadyCounter |
| Counts the number of variables that have not yet terminated, 0 if all variables have terminated. | |
| boolean | agentFinished |
true when the agent has finished, and false otherwise | |
| double | cumulativeFillPercentage |
| The percentage of the problem that has been stored. | |
| double | cumulativeDummyFillPercentage |
| The cumulative dummy fill percentage. | |
| long | cumulativeNumberOfDummies |
| The total number of dummie present in the problem. | |
| int | fillPercentageCounter |
| Represents to what extent the trees owned by this agent are filled. | |
| long | finalTime |
| The time all modules of the type VALUE propagation have finished. | |
| long | numberOfGoodsSent |
| The number of goods that has been sent. | |
| long | spaceSize |
| The total size of the space. | |
| U | maximalCutSum |
| The sum of maximal cuts. | |
| HashMap< String, List< VALUEmsgWithVars< Val > > > | postponed = new HashMap< String, List< VALUEmsgWithVars<Val> > > () |
| For each variable, a list of VALUE messages that are waiting to be processed until the DFS output has been received. | |
O-DPOP's VALUE propagation module.
| <Val> | The type used for domain values |
| <U> | The type used for utility values |
| frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.VALUEpropagation | ( | Element | parameters, |
| DCOPProblemInterface< Val, U > | problem ) |
Constructor used for stats reporter.
| problem | the overall problem |
| parameters | the description of what statistics should be reported (currently unused) |
References problem.
Referenced by findOptimalAssignmentAndSend().
| frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.VALUEpropagation | ( | DCOPProblemInterface< Val, U > | problem, |
| Element | parameters ) |
Constructor used in the AgentFactory.
| problem | The problem definition |
| parameters | Parameters to the listener |
References problem.
|
private |
Given the GoodsTree and the context, this method determines the value a variable should take.
| varID | The variable ID |
| varIndex | The index of the variable |
| tree | The GoodsTree containing all relevant information to determine the value of the variable |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, children, contextMap, domains, LOG, log(), problem, queue, reportStats, sendMessageToVariable(), frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, VALUEpropagation(), and variablesReadyCounter.

| double frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getAverageDummyFillTreePercentage | ( | ) |
| double frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getAverageFillTreePercentage | ( | ) |
| double frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getAverageNumberOfDummies | ( | ) |
| long frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getFinalTime | ( | ) |
Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages.
References finalTime.
| U frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getMaximalCutSum | ( | ) |
| Collection< MessageType > frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.algorithms.odpop.UTILpropagationFullDomain< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.GOODS_TREE_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, START_MSG_TYPE, and VALUE_MSG_TYPE.
| double frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getPercentageOfGoodsSent | ( | ) |
| void frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References OUTPUT_MSG_TYPE, and queue.
|
private |
Initializes the agent's variables.
References children, contextMap, domains, init(), loggers, owners, problem, root, variablePointer, and variablesReadyCounter.
Referenced by init(), and notifyIn().

|
protected |
Log function used to print the variables state during debugging.
| variableID | The ID of the variable that is logging |
| message | The message that must be logged |
Referenced by findOptimalAssignmentAndSend().
| void frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.communication.MessageType.equals(), frodo2.algorithms.odpop.UTILpropagationFullDomain< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.GOODS_TREE_MSG_TYPE, init(), notifyIn(), OUTPUT_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, and started.
Referenced by notifyIn().

| void frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
|
protected |
Sends a message to a variable.
| receiver | The recipient of the message |
| msg | The message to be sent |
Referenced by findOptimalAssignmentAndSend().
| void frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
|
private |
true when the agent has finished, and false otherwise
|
private |
Per variable a list of its children.
Referenced by findOptimalAssignmentAndSend(), and init().
|
private |
For each variable its context.
Referenced by findOptimalAssignmentAndSend(), and init().
|
private |
The cumulative dummy fill percentage.
|
private |
The percentage of the problem that has been stored.
|
private |
The total number of dummie present in the problem.
|
protected |
For each variable owned by this agent, its domain.
Referenced by findOptimalAssignmentAndSend(), and init().
|
private |
Represents to what extent the trees owned by this agent are filled.
|
private |
The time all modules of the type VALUE propagation have finished.
Referenced by getFinalTime().
|
static |
The type of the message used to request the GoodsTree from the UTIL propagation module.
|
staticprotected |
To log or not to log.
Referenced by findOptimalAssignmentAndSend(), and log().
|
protected |
|
private |
The sum of maximal cuts.
|
private |
The number of goods that has been sent.
|
static |
The type of the output messages containing the optimal assignment to a variable.
Referenced by frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.AssignmentMessage< Val extends Addable< Val >, U extends Addable< U > >.AssignmentMessage(), frodo2.algorithms.odpop.VALUEpropagation< Val extends Addable< Val >, U extends Addable< U > >.AssignmentMessage< Val extends Addable< Val >, U extends Addable< U > >.AssignmentMessage(), getStatsFromQueue(), and notifyIn().
|
private |
For each variable the agent that owns it.
Referenced by init(), and sendMessageToVariable().
|
private |
For each variable, a list of VALUE messages that are waiting to be processed until the DFS output has been received.
|
private |
The agent's problem.
Referenced by findOptimalAssignmentAndSend(), init(), VALUEpropagation(), and VALUEpropagation().
|
private |
This agent's queue.
Referenced by findOptimalAssignmentAndSend(), getStatsFromQueue(), sendMessageToVariable(), and setQueue().
|
private |
Whether to report stats.
Referenced by findOptimalAssignmentAndSend().
|
private |
For each variable whether it is a root.
Referenced by init().
|
private |
The total size of the space.
|
static |
The type of the message telling the module to start.
Referenced by getMsgTypes().
|
private |
true when this agent has been initialized
Referenced by notifyIn().
|
static |
The type of the value message.
Referenced by getMsgTypes(), frodo2.algorithms.odpop.VALUEmsg< Val extends Addable< Val > >.VALUEmsg(), frodo2.algorithms.odpop.VALUEmsg< Val extends Addable< Val > >.VALUEmsg(), frodo2.algorithms.odpop.VALUEmsgWithVars< Val extends Addable< Val > >.VALUEmsgWithVars(), and frodo2.algorithms.odpop.VALUEmsgWithVars< Val extends Addable< Val > >.VALUEmsgWithVars().
|
private |
For each variable its index in the arrays.
Referenced by init().
|
private |
Counts the number of variables that have not yet terminated, 0 if all variables have terminated.
Referenced by findOptimalAssignmentAndSend(), and init().