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

Classical UTIL propagation protocol. More...

Inheritance diagram for frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >:

Classes

class  SolutionMessage
 A message holding the optimal assignments to variables, conditioned on the assignments to the variables in its separator. More...
class  SeparatorMessage
 A message holding the separator of a given child variable. More...
class  OptUtilMessage
 Message sent by roots containing the optimal utility value of their DFS tree. More...
class  StatsMessage
 Message containing statistics. More...
class  ClusterInfo
 A convenience class used to store information about a cluster. More...

Public Member Functions

MessageType getStartMsgType ()
MessageType getDFSMsgType ()
 UTILpropagation ()
 Default constructor.
 UTILpropagation (DCOPProblemInterface< Val, U > problem)
 Constructor.
 UTILpropagation (DCOPProblemInterface< Val, U > problem, Element parameters)
 Constructor from XML descriptions.
void reset ()
 UTILpropagation (Element parameters, DCOPProblemInterface< Val, U > problem)
 The constructor called in "statistics gatherer" mode.
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
 The algorithm.
void setQueue (Queue queue)
void getStatsFromQueue (Queue queue)
void setSilent (boolean silent)
Integer getMaxMsgDim ()
getOptUtil ()
long getFinalTime ()
 Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages.
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 final MessageType UTIL_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "UTIL")
 The type of the messages containing utilities.
static final MessageType OUTPUT_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "UTILoutput")
 The type of the messages containing conditional optimal assignments.
static final MessageType SEPARATOR_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "Separator")
 The type of the messages containing separators.
static final MessageType OPT_UTIL_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "OptUtil")
 The type of the messages containing optimal utility values sent by roots.
static final MessageType UTIL_STATS_MSG_TYPE = new MessageType ("DPOP", "UTILpropagation", "UTILstats")
 The type of messages sent to the statistics monitor.

Protected Member Functions

void init ()
 Parses the problem.
ClusterInfo newClusterInfo ()
void sendSeparator (String senderVar, String senderAgent, String dest, String[] separator)
 Sends a message to the VALUEpropagation module containing the separator of a variable.
void record (String senderVar, UtilitySolutionSpace< Val, U > space, ClusterInfo info)
 Records the input space until spaces from all children have been received.
void projectAndSend (ClusterInfo info)
 Projects out a variable and sends the result to its parent (if any) or to itself (to initiate VALUE propagation).
ProjOutput< Val, U > project (UtilitySolutionSpace< Val, U > space, String[] vars)
 Projects the input variable from the input space.
void sendToParent (String var, String parentVar, String parentAgent, UtilitySolutionSpace< Val, U > space)
 Sends a UTIL message.
void sendOutput (UtilitySolutionSpace< Val, U > space, String root)
 Sends the output optimal utility to itself (i.e.

Protected Attributes

boolean withAnonymVars = false
 Whether the parser should consider variables with no specified owner.
DCOPProblemInterface< Val, U > problem
 The problem.
boolean started = false
 Whether the execution of the algorithm has been started.
boolean maximize = true
 true if we want to maximize utility, false if we want to minimize cost
Queue queue
 The queue on which it should call sendMessage().
Map< String, ClusterInfoinfos
 For each variable this agent owns, its relevant information.
String myID
 This agent's name.
optUtil
 The optimal utility found to the problem.
boolean reportStats = true
 Whether to report stats.

Private Attributes

long finalTime
 The time when the last stat message has been received.
Integer maxMsgDim = 0
 In stats gatherer mode, the maximum number of variables in a UTIL message.
final boolean minNCCCs
 Whether to minimize the NCCC count, at the expense of an increase in runtime.

Detailed Description

Classical UTIL propagation protocol.

Author
Thomas Leaute
Parameters
<Val>type used for variable values
<U>type used for utility values

Constructor & Destructor Documentation

◆ UTILpropagation() [1/4]

frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagation ( )

Default constructor.

◆ UTILpropagation() [2/4]

frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTILpropagation ( DCOPProblemInterface< Val, U > problem)

Constructor.

Parameters
problemthe problem description

References problem.

◆ UTILpropagation() [3/4]

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

Constructor from XML descriptions.

Parameters
problemdescription of the problem
parametersdescription of the parameters of UTILpropagation

References problem.

◆ UTILpropagation() [4/4]

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

The constructor called in "statistics gatherer" mode.

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

References problem.

Member Function Documentation

◆ getDFSMsgType()

MessageType frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.getDFSMsgType ( )
Returns
the type of the DFS output

Reimplemented in frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.

References DFS_MSG_TYPE.

Referenced by getMsgTypes().

◆ getFinalTime()

long frodo2.algorithms.dpop.UTILpropagation< 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.

Author
Brammert Ottens, 22 feb 2010
Returns
the time at which this module has finished

References finalTime.

◆ getMaxMsgDim()

Integer frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.getMaxMsgDim ( )
Returns
the maximum number of variables in a UTIL message (in stats gatherer mode only)

◆ getMsgTypes()

◆ getOptUtil()

U frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.getOptUtil ( )
Returns
the optimal utility found to the problem
Warning
Only works if the module is instantiated in stats gatherer mode.

Referenced by frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.checkOutput().

◆ getStartMsgType()

MessageType frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.getStartMsgType ( )
Returns
the type of the start message

Reimplemented in frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.

References START_MSG_TYPE.

Referenced by getMsgTypes().

◆ getStatsFromQueue()

◆ init()

◆ newClusterInfo()

◆ notifyIn()

◆ project()

ProjOutput< Val, U > frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.project ( UtilitySolutionSpace< Val, U > space,
String[] vars )
protected

◆ projectAndSend()

void frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.projectAndSend ( ClusterInfo info)
protected

◆ record()

void frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.record ( String senderVar,
UtilitySolutionSpace< Val, U > space,
ClusterInfo info )
protected

Records the input space until spaces from all children have been received.

Parameters
senderVarthe sender variable; null if the space is a local constraint
spacethe space to be recorded
infothe information on the variable responsible for the space
Todo
Use the MessageWithRawData paradigm to deserialize the biggest space first, and then deserialize the smaller spaces on-the-fly into the biggest space (when they are subspaces of it) to save memory

Reimplemented in frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.

References frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.ClusterInfo.spaces.

◆ reset()

◆ sendOutput()

◆ sendSeparator()

void frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.sendSeparator ( String senderVar,
String senderAgent,
String dest,
String[] separator )
protected

Sends a message to the VALUEpropagation module containing the separator of a variable.

Parameters
senderVarsender variable
senderAgentsender agent
destdestination variable
separatorthe separator of the destination variable

Reimplemented in frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >, and frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.

References queue.

◆ sendToParent()

void frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.sendToParent ( String var,
String parentVar,
String parentAgent,
UtilitySolutionSpace< Val, U > space )
protected

Sends a UTIL message.

Parameters
varthe sender of the message
parentVarthe destination variable of the message
parentAgentthe destination agent of the message
spacethe content of the message
Todo
First try to prune variable domains, and notify other branches of the pseudo-tree of the pruning.

Reimplemented in frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >, and frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.

References infos, queue, and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.

◆ setQueue()

void frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.setQueue ( Queue queue)

◆ setSilent()

void frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.setSilent ( boolean silent)

Member Data Documentation

◆ DFS_MSG_TYPE

MessageType frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.DFS_MSG_TYPE = DFSgeneration.OUTPUT_MSG_TYPE
static

The type of the messages containing information about the DFS.

Referenced by getDFSMsgType().

◆ finalTime

long frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.finalTime
private

The time when the last stat message has been received.

Referenced by getFinalTime(), and notifyIn().

◆ FINISH_MSG_TYPE

MessageType frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.FINISH_MSG_TYPE = AgentInterface.AGENT_FINISHED
static

The type of the message telling the agent finished.

Referenced by getMsgTypes().

◆ infos

◆ maximize

◆ maxMsgDim

Integer frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.maxMsgDim = 0
private

In stats gatherer mode, the maximum number of variables in a UTIL message.

◆ minNCCCs

final boolean frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.minNCCCs
private

Whether to minimize the NCCC count, at the expense of an increase in runtime.

◆ myID

◆ OPT_UTIL_MSG_TYPE

◆ optUtil

◆ OUTPUT_MSG_TYPE

◆ problem

DCOPProblemInterface<Val, U> frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.problem
protected

The problem.

Referenced by frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.centralization(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.CompleteUTIL(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.CompleteUTIL(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.dfsToString(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.ExpectedUTIL(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.ExpectedUTIL(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.init(), init(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.MemoryBoundedUTIL(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.MemoryBoundedUTIL(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.dpop.param.ParamUTIL< Val extends Addable< Val >, U extends Addable< U > >.ParamUTIL(), frodo2.algorithms.dpop.param.ParamUTIL< Val extends Addable< Val >, U extends Addable< U > >.ParamUTIL(), frodo2.algorithms.dpop.param.ParamUTIL< Val extends Addable< Val >, U extends Addable< U > >.ParamUTIL(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.project(), frodo2.algorithms.dpop.memory.MemoryBoundedUTIL< V extends Addable< V >, U extends Addable< U > >.projectAndSend(), frodo2.algorithms.dpop.stochastic.CompleteUTIL< Val extends Addable< Val >, U extends Addable< U > >.projectAndSend(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.reset(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendOutput(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendOutput(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendSeparator(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.sendToParent(), frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.sliceSpaces(), UTILpropagation(), UTILpropagation(), UTILpropagation(), frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.WorstCaseUTIL(), and frodo2.algorithms.dpop.stochastic.robust.WorstCaseUTIL< Val extends Addable< Val >, U extends Addable< U > >.WorstCaseUTIL().

◆ queue

◆ reportStats

◆ SEPARATOR_MSG_TYPE

◆ START_MSG_TYPE

MessageType frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.START_MSG_TYPE = AgentInterface.START_AGENT
static

The type of the message telling the module to start.

Referenced by getStartMsgType().

◆ started

boolean frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.started = false
protected

Whether the execution of the algorithm has been started.

Referenced by frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.notifyIn().

◆ UTIL_MSG_TYPE

◆ UTIL_STATS_MSG_TYPE

◆ withAnonymVars

boolean frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.withAnonymVars = false
protected

Whether the parser should consider variables with no specified owner.

Referenced by frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.ExpectedUTIL().


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