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

A DFS Generation module that integrates a root election mechanism. More...

Inheritance diagram for frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >:

Classes

class  SinkQueue
 A Queue that discards all messages sent. More...
class  FakeQueue
 There is one such FakeQueue for each candidate root. More...

Public Member Functions

 DFSgenerationParallel (DCOPProblemInterface<?, ?> problem, Element params) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException
 Constructor.
 DFSgenerationParallel (Element params, DCOPProblemInterface<?, ?> problem)
 Constructor in stats gatherer mode.
void reset ()
void setSilent (boolean silent)
void setQueue (Queue queue)
void getStatsFromQueue (Queue queue)
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
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 final MessageType PARALLEL_DFS_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationParallel", "ParallelDFSwrapper")
 The type of the messages containing DFS messages for a particular candidate root.

Static Package Attributes

static final MessageType RELEASE_OUTPUT_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationParallel", "ReleaseDFSoutput")
 The type of the messages telling variables to release their DFS output messages.

Private Member Functions

void init (String notRoot)
 Initializes the module.
FakeQueue newFakeQueue (S root)
 Creates a FakeQueue associated with the input candidate root.

Private Attributes

DCOPProblemInterface<?, ?> problem
 The problem.
boolean silent = false
 Whether the stats gatherer should display stats.
boolean started = false
 Whether the module has already been started.
Queue queue
 The queue used to exchange messages.
ScoringHeuristic< S > rootElectionHeuristic
 The heuristic used to choose the root.
Element dfsGenerationParams
 The parameters of the underlying DFS generation module.
Constructor< ? extends DFSgeneration<?, ?> > dfsGenerationConstructor
 Constructor for the underlying DFS generation module.
Map< String, S > rootElectionScores
 For each of my variables, its root election score.
HashMap< S, FakeQueuequeues = new HashMap<S, FakeQueue> ()
 For each candidate root (identified by its root election score), the corresponding FakeQueue.
Map< String, String > owners
 For each known variable, its owner agent.
DFSgeneration<?, ?> statsGatherer
 The module used for displaying the DFS in stats gatherer mode.
IncomingMsgPolicyInterface< MessageTypedfsHeuristic
 The DFS heuristic module (if the heuristic needs to exchange messages).
ArrayList< MessageheuristicMsgs = new ArrayList<Message> ()
 The DFS heuristic messages received.
Element myParams
 This module's parameters.

Detailed Description

A DFS Generation module that integrates a root election mechanism.

Each variable starts its own DFS Generation algorithm, with itself as the root, in which messages are labeled with the VariableElection score of the root. One particular DFS Generation instance is interrupted as soon as a variable receives a message labeled with a root score that is lower than its own Variable Election score. When a particular DFS Generation instance successfully terminates (there can be only one), it passes messages down the DFS to notify all variables.

Author
Thomas Leaute
Parameters
<S>the type used for the root election scores
Note
T must properly override equals(Object) and hashCode().
Todo
The DFS heuristic modules are added to each FakeQueue, which results in exchanging duplicate heuristic messages

Constructor & Destructor Documentation

◆ DFSgenerationParallel() [1/2]

frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.DFSgenerationParallel ( DCOPProblemInterface<?, ?> problem,
Element params ) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException

Constructor.

Parameters
problemthe agent's subproblem
paramsthe parameters of the module
Exceptions
NoSuchMethodExceptionif the root election heuristic or the underlying DFS generation module doesn't have a constructor that takes in (ProblemInterface, Element)
InvocationTargetExceptionif the root election heuristic constructor throws an exception
IllegalAccessExceptionif the root election heuristic constructor is not accessible
InstantiationExceptionif the root election heuristic is abstract
IllegalArgumentExceptionshould never happen
ClassNotFoundExceptionif the class for the the root election heuristic or for the underlying DFS generation module is not found

References DFSgenerationParallel(), frodo2.communication.MessageType.fromXML(), problem, and frodo2.algorithms.SingleQueueAgent< Val extends Addable< Val > >.setMsgType().

Referenced by DFSgenerationParallel().

Here is the call graph for this function:

◆ DFSgenerationParallel() [2/2]

frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.DFSgenerationParallel ( Element params,
DCOPProblemInterface<?, ?> problem )

Constructor in stats gatherer mode.

Parameters
paramsthe parameters of the module
problemthe overall problem

References problem.

Member Function Documentation

◆ getMsgTypes()

◆ getStatsFromQueue()

◆ init()

◆ newFakeQueue()

FakeQueue frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.newFakeQueue ( S root)
private

◆ notifyIn()

◆ reset()

◆ setQueue()

void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.setQueue ( Queue queue)

◆ setSilent()

void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.setSilent ( boolean silent)

Member Data Documentation

◆ dfsGenerationConstructor

Constructor< ? extends DFSgeneration<?, ?> > frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.dfsGenerationConstructor
private

Constructor for the underlying DFS generation module.

◆ dfsGenerationParams

Element frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.dfsGenerationParams
private

The parameters of the underlying DFS generation module.

◆ dfsHeuristic

IncomingMsgPolicyInterface<MessageType> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.dfsHeuristic
private

The DFS heuristic module (if the heuristic needs to exchange messages).

◆ heuristicMsgs

ArrayList<Message> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.heuristicMsgs = new ArrayList<Message> ()
private

The DFS heuristic messages received.

◆ myParams

Element frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.myParams
private

This module's parameters.

◆ owners

Map<String, String> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.owners
private

◆ PARALLEL_DFS_MSG_TYPE

final MessageType frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.PARALLEL_DFS_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationParallel", "ParallelDFSwrapper")
static

◆ problem

DCOPProblemInterface<?, ?> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.problem
private

The problem.

Referenced by DFSgenerationParallel(), and DFSgenerationParallel().

◆ queue

◆ queues

HashMap<S, FakeQueue> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queues = new HashMap<S, FakeQueue> ()
private

For each candidate root (identified by its root election score), the corresponding FakeQueue.

◆ RELEASE_OUTPUT_MSG_TYPE

final MessageType frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.RELEASE_OUTPUT_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationParallel", "ReleaseDFSoutput")
staticpackage

◆ rootElectionHeuristic

ScoringHeuristic<S> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.rootElectionHeuristic
private

The heuristic used to choose the root.

◆ rootElectionScores

Map<String, S> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.rootElectionScores
private

◆ silent

boolean frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.silent = false
private

Whether the stats gatherer should display stats.

Referenced by setSilent().

◆ START_MSG_TYPE

MessageType frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.START_MSG_TYPE = AgentInterface.START_AGENT
static

The type of the message telling the module to start.

Referenced by getMsgTypes().

◆ started

boolean frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.started = false
private

Whether the module has already been started.

◆ statsGatherer

DFSgeneration<?, ?> frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.statsGatherer
private

The module used for displaying the DFS in stats gatherer mode.


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