|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A DFS Generation module that integrates a root election mechanism. More...

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< MessageType > | getMsgTypes () |
| 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, FakeQueue > | queues = 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< MessageType > | dfsHeuristic |
| The DFS heuristic module (if the heuristic needs to exchange messages). | |
| ArrayList< Message > | heuristicMsgs = new ArrayList<Message> () |
| The DFS heuristic messages received. | |
| Element | myParams |
| This module's parameters. | |
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.
| <S> | the type used for the root election scores |
| frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.DFSgenerationParallel | ( | DCOPProblemInterface<?, ?> | problem, |
| Element | params ) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException |
Constructor.
| problem | the agent's subproblem |
| params | the parameters of the module |
| NoSuchMethodException | if the root election heuristic or the underlying DFS generation module doesn't have a constructor that takes in (ProblemInterface, Element) |
| InvocationTargetException | if the root election heuristic constructor throws an exception |
| IllegalAccessException | if the root election heuristic constructor is not accessible |
| InstantiationException | if the root election heuristic is abstract |
| IllegalArgumentException | should never happen |
| ClassNotFoundException | if 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().

| frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.DFSgenerationParallel | ( | Element | params, |
| DCOPProblemInterface<?, ?> | problem ) |
Constructor in stats gatherer mode.
| params | the parameters of the module |
| problem | the overall problem |
References problem.
| Collection< MessageType > frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.getMsgTypes | ( | ) |
| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.getStatsFromQueue(), queue, and frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.setSilent().

|
private |
Initializes the module.
| notRoot | a variable we already know is not a root |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getMyVars(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNbrIntVars(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNeighborhoods(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getOwner(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getOwners(), frodo2.algorithms.heuristics.ScoringHeuristic< S extends Comparable< S > &Serializable >.getScores(), newFakeQueue(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners(), and frodo2.communication.Queue.sendMessageToSelf().
Referenced by notifyIn().

|
private |
Creates a FakeQueue associated with the input candidate root.
| root | the candidate root |
References frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.addIncomingMessagePolicyForReal(), and frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners().
Referenced by init(), and notifyIn().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.CHILD_MSG_TYPE, frodo2.communication.MessageType.equals(), init(), frodo2.communication.MessageType.isParent(), newFakeQueue(), notifyIn(), and frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners().
Referenced by notifyIn().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
References frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.reset().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue, and frodo2.communication.MessageListener< T >.setQueue().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
References silent.
|
private |
Constructor for the underlying DFS generation module.
|
private |
The parameters of the underlying DFS generation module.
|
private |
The DFS heuristic module (if the heuristic needs to exchange messages).
|
private |
The DFS heuristic messages received.
|
private |
This module's parameters.
|
private |
For each known variable, its owner agent.
Referenced by frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.releaseOutput().
|
static |
The type of the messages containing DFS messages for a particular candidate root.
Referenced by getMsgTypes(), frodo2.algorithms.varOrdering.dfs.ParallelDFSmsg< S extends Comparable< S > &Serializable >.ParallelDFSmsg(), and frodo2.algorithms.varOrdering.dfs.ParallelDFSmsg< S extends Comparable< S > &Serializable >.ParallelDFSmsg().
|
private |
The problem.
Referenced by DFSgenerationParallel(), and DFSgenerationParallel().
|
private |
The queue used to exchange messages.
Referenced by getStatsFromQueue(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.releaseOutput(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessage(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessage(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessageToMulti(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessageToSelf(), and setQueue().
|
private |
For each candidate root (identified by its root election score), the corresponding FakeQueue.
|
staticpackage |
The type of the messages telling variables to release their DFS output messages.
Referenced by frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners(), frodo2.algorithms.varOrdering.dfs.ReleaseDFSmsg.ReleaseDFSmsg(), and frodo2.algorithms.varOrdering.dfs.ReleaseDFSmsg.ReleaseDFSmsg().
|
private |
The heuristic used to choose the root.
|
private |
For each of my variables, its root election score.
Referenced by frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners().
|
private |
Whether the stats gatherer should display stats.
Referenced by setSilent().
|
static |
The type of the message telling the module to start.
Referenced by getMsgTypes().
|
private |
Whether the module has already been started.
|
private |
The module used for displaying the DFS in stats gatherer mode.