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

VALUE propagation protocol. More...

Inheritance diagram for frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >:

Classes

class  AssignmentMessage
 A message holding the optimal assignment to some variables, conditioned on the values of the parameters (if any). More...

Public Member Functions

 ParamVALUE ()
 Default constructor.
 ParamVALUE (DCOPProblemInterface< Val, ? extends Addable<?> > problem, Boolean swap)
 Manual constructor that does not use XML elements.
 ParamVALUE (DCOPProblemInterface< Val, ? extends Addable<?> > problem, Element parameters)
 Constructor from XML elements.
 ParamVALUE (Element parameters, DCOPProblemInterface< Val, ?> problem)
 The constructor called in "statistics gatherer" mode.
void reset ()
Collection< MessageTypegetMsgTypes ()
void setSilent (boolean silent)
void notifyIn (Message msg)
void getStatsFromQueue (Queue queue)
Map< String[], BasicUtilitySolutionSpace< Val, ArrayList< Val > > > getParamSolution ()
Public Member Functions inherited from frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >
 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 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 final MessageType PARAM_VALUE_MSG_TYPE = new MessageType ("Param-DPOP", "VALUE", "VALUE")
 The type of the VALUE messages.
static final MessageType PARAM_OUTPUT_MSG_TYPE = new MessageType ("Param-DPOP", "VALUE", "Output")
 The type of the output messages containing the optimal assignment to a variable.
Static Public Attributes inherited from frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >
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.

Private Member Functions

void sendVALUEmessage (String child, String[] separator, String[] vars, BasicUtilitySolutionSpace< Val, ArrayList< Val > > opt, 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 assignment to some variables, and sends VALUE messages to children accordingly.

Private Attributes

HashMap< String, VALUEmsg< Val > > valueMessages = new HashMap< String, VALUEmsg<Val> > ()
 For each variable, the VALUE message received containing its separator's optimal assignments.
boolean reportStats = true
 Whether to report stats.
HashMap< String[], BasicUtilitySolutionSpace< Val, ArrayList< Val > > > solution = new HashMap< String[], BasicUtilitySolutionSpace< Val, ArrayList<Val> > > ()
 For an array of variables, their optimal values, conditioned on the values of the parameters (if any).
HashSet< String > roots = new HashSet<String> ()
 The subset of this agent's variables that are roots.

Additional Inherited Members

Protected Member Functions inherited from frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >
void init ()
 Parses the problem.
Protected Attributes inherited from frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >
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.

Detailed Description

VALUE propagation protocol.

Author
Thomas Leaute
Parameters
<Val>type used for variable values
Todo
Improve the implementation by reasoning on groups of variables to be projected together.

Constructor & Destructor Documentation

◆ ParamVALUE() [1/4]

Default constructor.

◆ ParamVALUE() [2/4]

frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE ( DCOPProblemInterface< Val, ? extends Addable<?> > problem,
Boolean swap )

Manual constructor that does not use XML elements.

Parameters
problemthe problem
swapif true, conditional optimal assignments are swapped until the VALUE message is received

References frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.problem, and frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.swap.

◆ ParamVALUE() [3/4]

frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE ( DCOPProblemInterface< Val, ? extends Addable<?> > problem,
Element parameters )

Constructor from XML elements.

Parameters
problemdescription of the problem
parametersnot used because ParamVALUE cannot be parameterized

References frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.problem.

◆ ParamVALUE() [4/4]

frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.ParamVALUE ( Element parameters,
DCOPProblemInterface< Val, ?> problem )

The constructor called in "statistics gatherer" mode.

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

References frodo2.algorithms.dpop.VALUEpropagation< Val extends Addable< Val > >.problem.

Member Function Documentation

◆ computeOptValAndSendVALUEmsgs()

◆ getMsgTypes()

◆ getParamSolution()

Map< String[], BasicUtilitySolutionSpace< Val, ArrayList< Val > > > frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.getParamSolution ( )
Returns
for each variable, its assignment in the optimal solution found to the problem conditioned on the parameters

◆ getStatsFromQueue()

◆ notifyIn()

◆ reset()

◆ sendVALUEmessage()

void frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.sendVALUEmessage ( String child,
String[] separator,
String[] vars,
BasicUtilitySolutionSpace< Val, ArrayList< Val > > opt,
VALUEmsg< Val > valueMsg )
private

◆ setSilent()

void frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.setSilent ( boolean silent)

Member Data Documentation

◆ PARAM_OUTPUT_MSG_TYPE

◆ PARAM_VALUE_MSG_TYPE

final MessageType frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.PARAM_VALUE_MSG_TYPE = new MessageType ("Param-DPOP", "VALUE", "VALUE")
static

◆ reportStats

boolean frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.reportStats = true
private

Whether to report stats.

◆ roots

HashSet<String> frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.roots = new HashSet<String> ()
private

The subset of this agent's variables that are roots.

Referenced by reset().

◆ solution

HashMap< String[], BasicUtilitySolutionSpace< Val, ArrayList<Val> > > frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.solution = new HashMap< String[], BasicUtilitySolutionSpace< Val, ArrayList<Val> > > ()
private

For an array of variables, their optimal values, conditioned on the values of the parameters (if any).

Todo
It might be more efficient to store a single BasicUtilitySolutionSpace holding the information about all variables.

Referenced by computeOptValAndSendVALUEmsgs(), and reset().

◆ valueMessages

HashMap< String, VALUEmsg<Val> > frodo2.algorithms.dpop.param.ParamVALUE< Val extends Addable< Val > >.valueMessages = new HashMap< String, VALUEmsg<Val> > ()
private

For each variable, the VALUE message received containing its separator's optimal assignments.

Referenced by notifyIn(), and reset().


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