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

A module that waits for the root variable to compute its optimal value, and then calls for a rerooting. More...

Inheritance diagram for frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >:

Classes

class  RootValueMsg
 The class of statistics messages containing the optimal assignment to a variable. More...

Public Member Functions

 RerootRequester (Element params, DCOPProblemInterface< V, U > problem)
 Constructor in "stats gatherer" mode.
 RerootRequester (DCOPProblemInterface< V, U > problem, Element params)
 Constructor.
getOptUtil ()
HashMap< String, V > getSolution ()
void notifyIn (Message msg)
Collection< MessageTypegetMsgTypes ()
void setQueue (Queue queue)
void getStatsFromQueue (Queue queue)
void reset ()
void setSilent (boolean silent)
Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T >
default void notifyIn (Message msg, Object toAgent)
 Notifies the listener of an incoming message.

Private Attributes

Queue queue
 This agent's queue.
HashMap< String, List< String > > children = new HashMap< String, List<String> > ()
 For each internal variable, its list of children in the current DFS.
HashMap< String, Boolean > roots = new HashMap<String, Boolean> ()
 For each internal variable, whether it is a root.
DCOPProblemInterface< V, U > problem
 The problem.
boolean reportStats = true
 Whether to report stats.
HashMap< String, Integer > countdownsInit = new HashMap<String, Integer> ()
 For each internal variable, the number of variables in its constraint graph component.
HashMap< String, Integer > countdowns = new HashMap<String, Integer> ()
 For each internal variable, the number of remaining UTIL propagations.
optUtil
 The total optimal utility across all constraint graph components.
int nbrVars
 The total number of variables in the problem (in stats gatherer mode).
HashMap< String, V > solution
 The optimal assignment to each variable.
boolean infeasible = false
 Whether the problem has been found infeasible.

Static Private Attributes

static final MessageType OPT_ASSIGNMENT_MSG_TYPE = new MessageType ("P3/2-DPOP", "RerootRequester", "OptAssignment")
 The type of the statistics messages containing the optimal assignment to a variable.
static final MessageType OPT_UTIL_MSG_TYPE = new MessageType ("P3/2-DPOP", "RerootRequester", "TotalOptUtil")
 The type of the MessageWithPayload's containing the total optimal utility for one component of the constraint graph.

Detailed Description

A module that waits for the root variable to compute its optimal value, and then calls for a rerooting.

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

Constructor & Destructor Documentation

◆ RerootRequester() [1/2]

frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.RerootRequester ( Element params,
DCOPProblemInterface< V, U > problem )

Constructor in "stats gatherer" mode.

Parameters
paramsthe parameters of the module
problemthe overall problem

References frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getDomain(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getVariables(), and problem.

Here is the call graph for this function:

◆ RerootRequester() [2/2]

frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.RerootRequester ( DCOPProblemInterface< V, U > problem,
Element params )

Constructor.

Parameters
problemthe agent's subproblem
paramsthe parameters of the module

References problem.

Member Function Documentation

◆ getMsgTypes()

◆ getOptUtil()

U frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.getOptUtil ( )
Returns
The total optimal utility across all constraint graph components

References frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.getZeroUtility(), and optUtil.

Referenced by frodo2.algorithms.dpop.privacy.P3halves_DPOPsolver< V extends Addable< V > >.buildSolution().

Here is the call graph for this function:

◆ getSolution()

HashMap< String, V > frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.getSolution ( )
Returns
the solution

References solution.

◆ getStatsFromQueue()

◆ notifyIn()

void frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.notifyIn ( Message msg)

◆ reset()

void frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.reset ( )

◆ setQueue()

void frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.setQueue ( Queue queue)

◆ setSilent()

void frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.setSilent ( boolean silent)

Member Data Documentation

◆ children

HashMap< String, List<String> > frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.children = new HashMap< String, List<String> > ()
private

For each internal variable, its list of children in the current DFS.

◆ countdowns

HashMap<String, Integer> frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.countdowns = new HashMap<String, Integer> ()
private

For each internal variable, the number of remaining UTIL propagations.

◆ countdownsInit

HashMap<String, Integer> frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.countdownsInit = new HashMap<String, Integer> ()
private

For each internal variable, the number of variables in its constraint graph component.

◆ infeasible

boolean frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.infeasible = false
private

Whether the problem has been found infeasible.

◆ nbrVars

int frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.nbrVars
private

The total number of variables in the problem (in stats gatherer mode).

◆ OPT_ASSIGNMENT_MSG_TYPE

final MessageType frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.OPT_ASSIGNMENT_MSG_TYPE = new MessageType ("P3/2-DPOP", "RerootRequester", "OptAssignment")
staticprivate

The type of the statistics messages containing the optimal assignment to a variable.

Referenced by getStatsFromQueue(), notifyIn(), and frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.RootValueMsg.RootValueMsg().

◆ OPT_UTIL_MSG_TYPE

final MessageType frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.OPT_UTIL_MSG_TYPE = new MessageType ("P3/2-DPOP", "RerootRequester", "TotalOptUtil")
staticprivate

The type of the MessageWithPayload's containing the total optimal utility for one component of the constraint graph.

Referenced by getStatsFromQueue().

◆ optUtil

U frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.optUtil
private

The total optimal utility across all constraint graph components.

Referenced by getOptUtil().

◆ problem

DCOPProblemInterface<V, U> frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.problem
private

The problem.

Referenced by RerootRequester(), RerootRequester(), and reset().

◆ queue

Queue frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.queue
private

This agent's queue.

Referenced by getStatsFromQueue(), and setQueue().

◆ reportStats

boolean frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.reportStats = true
private

Whether to report stats.

◆ roots

HashMap<String, Boolean> frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.roots = new HashMap<String, Boolean> ()
private

For each internal variable, whether it is a root.

◆ solution

HashMap<String, V> frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.solution
private

The optimal assignment to each variable.

Referenced by getSolution().


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