FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable > Class Template Reference

Selects the next child as the one that has the highest score. More...

Inheritance diagram for frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >:

Public Member Functions

 ScoreBroadcastingHeuristic (DCOPProblemInterface<?, ?> problem, Element params) throws Exception
 Constructor.
 ScoreBroadcastingHeuristic (ScoringHeuristic< S > heuristic, Map< String, Set< String > > neighborAgents)
 Constructor.
String popNextChild (String var, DFSview<?, ?> unused, Collection< String > openNeighbors)
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
void setQueue (Queue queue)
Public Member Functions inherited from frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.BlindScoringHeuristic< S >
 BlindScoringHeuristic (ScoringHeuristic< S > heuristic)
 Constructor.
String popNextChild (String var, DFSview<?, ?> dfsView, Collection< String > openNeighbors)
Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T >
default void notifyIn (Message msg, Object toAgent)
 Notifies the listener of an incoming message.

Static Package Attributes

static final MessageType SCORE_MSG_TYPE = new MessageType ("VarOrdering", "DFSgeneration", "ScoreBroadcastingHeuristic", "HeuristicScores")
 The type of messages containing the scores of given variables.
static final MessageType SCORE_SINGLE_VAR_MSG_TYPE = new MessageType ("VarOrdering", "DFSgeneration", "ScoreBroadcastingHeuristic", "HeuristicScoreSingleVar")
 The type of messages containing the scores of given variables.

Private Member Functions

void init ()
 Parses the problem.
void buildKnownVars (Map< String, Set< String > > neighborAgents)
 Builds the knownVars map.
void reset ()
 Resets all problem-dependent fields (except the problem itself).

Private Attributes

DCOPProblemInterface<?, ?> problem
 The problem.
boolean started = false
 Whether the execution of the algorithm has started.
Map< String, Set< String > > neighborAgents
 For each variable owned by this agent, the set of agents that own a variable connected to this variable.
HashMap< String, HashSet< String > > knownVars = new HashMap< String, HashSet<String> > ()
 For each neighboring agent, the set of my variables it knows.
Map< String, S > scores
 For each known variable, its score.
Queue queue
 The queue used to exchange information about scores.

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.BlindScoringHeuristic< S >
ScoringHeuristic< S > heuristic
 The ScoringHeuristic used.

Detailed Description

Selects the next child as the one that has the highest score.

Parameters
<S>the type used for the scores

Constructor & Destructor Documentation

◆ ScoreBroadcastingHeuristic() [1/2]

frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.ScoreBroadcastingHeuristic ( DCOPProblemInterface<?, ?> problem,
Element params ) throws Exception

Constructor.

Parameters
problemdescription of the agent's problem
paramsthe heuristic parameters
Exceptions
Exceptionif the constructor of the superclass throws an exception

References problem.

◆ ScoreBroadcastingHeuristic() [2/2]

frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.ScoreBroadcastingHeuristic ( ScoringHeuristic< S > heuristic,
Map< String, Set< String > > neighborAgents )

Constructor.

Parameters
heuristicThe ScoringHeuristic used
neighborAgentsfor each variable owned by this agent, the set of agents that own a variable connected to this variable

References buildKnownVars(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.BlindScoringHeuristic< S >.heuristic, and neighborAgents.

Here is the call graph for this function:

Member Function Documentation

◆ buildKnownVars()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.buildKnownVars ( Map< String, Set< String > > neighborAgents)
private

Builds the knownVars map.

Parameters
neighborAgentsfor each internal variable, its collection of neighboring agents

References neighborAgents.

Referenced by init(), and ScoreBroadcastingHeuristic().

◆ getMsgTypes()

◆ init()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.init ( )
private

Parses the problem.

References buildKnownVars(), and problem.

Referenced by notifyIn(), and popNextChild().

Here is the call graph for this function:

◆ notifyIn()

◆ popNextChild()

String frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.popNextChild ( String var,
DFSview<?, ?> unused,
Collection< String > openNeighbors )

◆ reset()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.reset ( )
private

Resets all problem-dependent fields (except the problem itself).

◆ setQueue()

void frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.setQueue ( Queue queue)

Member Data Documentation

◆ knownVars

HashMap< String, HashSet<String> > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.knownVars = new HashMap< String, HashSet<String> > ()
private

For each neighboring agent, the set of my variables it knows.

◆ neighborAgents

Map< String, Set<String> > frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.neighborAgents
private

For each variable owned by this agent, the set of agents that own a variable connected to this variable.

Referenced by buildKnownVars(), and ScoreBroadcastingHeuristic().

◆ problem

DCOPProblemInterface<?, ?> frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.problem
private

The problem.

Referenced by init(), and ScoreBroadcastingHeuristic().

◆ queue

Queue frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.queue
private

The queue used to exchange information about scores.

Referenced by setQueue().

◆ SCORE_MSG_TYPE

final MessageType frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.SCORE_MSG_TYPE = new MessageType ("VarOrdering", "DFSgeneration", "ScoreBroadcastingHeuristic", "HeuristicScores")
staticpackage

◆ SCORE_SINGLE_VAR_MSG_TYPE

final MessageType frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.SCORE_SINGLE_VAR_MSG_TYPE = new MessageType ("VarOrdering", "DFSgeneration", "ScoreBroadcastingHeuristic", "HeuristicScoreSingleVar")
staticpackage

◆ scores

Map<String, S> frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.scores
private

For each known variable, its score.

◆ started

boolean frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ScoreBroadcastingHeuristic< S extends Comparable< S > &Serializable >.started = false
private

Whether the execution of the algorithm has started.


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