FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.odpop.UTILpropagationBinaryDomains< Val extends Addable< Val >, U extends Addable< U > > Class Template Reference

The UTIL propagation phase for O-DPOP. More...

Inheritance diagram for frodo2.algorithms.odpop.UTILpropagationBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >:

Public Member Functions

 UTILpropagationBinaryDomains (Element parameters, DCOPProblemInterface< Val, U > problem)
 Constructor for the statsreporter.
 UTILpropagationBinaryDomains (DCOPProblemInterface< Val, U > problem, Element parameters)
 Constructor.
 UTILpropagationBinaryDomains (DCOPProblemInterface< Val, U > problem)
 Alternative constructor not using XML.
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)
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)
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< MessageTypegetMsgTypes ()
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

void utilPropagationFinished (String variableID, GoodsTree< Val, U, LeafNode< U > > tree, U utility, int domainSize)
Protected Member Functions inherited from frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >
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.

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.
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.
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.

Detailed Description

The UTIL propagation phase for O-DPOP.

Author
brammert
Parameters
<Val>type used for variable values
<U>type used for utility values
Todo
make it work for minimisation problems as well!

Constructor & Destructor Documentation

◆ UTILpropagationBinaryDomains() [1/3]

frodo2.algorithms.odpop.UTILpropagationBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagationBinaryDomains ( Element parameters,
DCOPProblemInterface< Val, U > problem )

Constructor for the statsreporter.

Parameters
problemthe overall problem
parametersthe description of what statistics should be reported (currently unused)

References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.

◆ UTILpropagationBinaryDomains() [2/3]

frodo2.algorithms.odpop.UTILpropagationBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagationBinaryDomains ( DCOPProblemInterface< Val, U > problem,
Element parameters )

Constructor.

Parameters
problemThe problem description
parametersThe parameters

References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.

◆ UTILpropagationBinaryDomains() [3/3]

Alternative constructor not using XML.

Parameters
problemThe problem description

References frodo2.algorithms.odpop.UTILpropagationFullDomain< Val, U, LeafNode< U > >.problem.

Member Function Documentation

◆ newVariableInfoInstanceInnerNode()

◆ newVariableInfoInstanceLeafNode()

◆ utilPropagationFinished()


The documentation for this class was generated from the following file: