|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
There is one such FakeQueue for each candidate root. More...

Public Member Functions | |
| FakeQueue (S root) | |
| Constructor. | |
| void | sendMessage (Object to, Message msg) |
| void | sendMessage (Object to, MessageWrapper msgWrap) |
| void | sendMessageToSelf (Message msg) |
| void | notifyInListeners (Message msg, Object toAgent) |
| Does the same as the superclass, but without the need to synchronize on a lock. | |
| void | addIncomingMessagePolicyForReal (DFSgeneration<?, ?> dfsModule) |
| Adds the input DFS module to the queue's listeners. | |
| void | addIncomingMessagePolicy (IncomingMsgPolicyInterface< MessageType > policy) |
| The module's queue is set to a SinkQueue so that all messages sent are discarded. | |
| Public Member Functions inherited from frodo2.communication.Queue | |
| Queue (boolean measureMsgs) | |
| Constructor. | |
| Queue (boolean measureMsgs, boolean init) | |
| Constructor. | |
| void | toBeClosedUponKill (QueueInputPipeInterface input) |
| Reminds the queue to close the given pipe when it is killed. | |
| void | removeInputPipe (QueueInputPipeInterface input) |
| Removes the given input pipe from the list of input pipes. | |
| void | addOutputPipe (Object recipient, QueueOutputPipeInterface output) |
| Adds an output pipe to this queue. | |
| QueueOutputPipeInterface | getOutputPipe (Object recipient) |
| Returns the output pipe corresponding to the given recipient. | |
| void | removeOutputPipe (Object recipient) |
| Removes the output pipe corresponding to the given recipient. | |
| QueueIOPipe | addOutputQueue (Object recipient, Queue queue) |
| Adds a new output pipe to the provided queue. | |
| void | addIncomingMessagePolicy (Collection< MessageType > msgTypes, IncomingMsgPolicyInterface< MessageType > policy) |
| Adds a listener to be notified of new incoming messages. | |
| void | addIncomingMessagePolicy (MessageType type, IncomingMsgPolicyInterface< MessageType > policy) |
| Adds a listener to be notified of new incoming messages of type type. | |
| void | addOutgoingMessagePolicy (OutgoingMsgPolicyInterface< MessageType > policy) |
| Adds a listener to be notified of new outgoing messages. | |
| void | addOutgoingMessagePolicy (Collection< MessageType > msgTypes, OutgoingMsgPolicyInterface< MessageType > policy) |
| Adds a listener to be notified of new outgoing messages. | |
| void | addOutgoingMessagePolicy (MessageType type, OutgoingMsgPolicyInterface< MessageType > policy) |
| Adds a listener to be notified of new outgoing messages of type type. | |
| void | addToInbox (MessageWrapper msg) |
| Adds the input message to this queue's inbox. | |
| void | end () |
| Kills the queue, making it unusable. | |
| void | run () |
| Continuously processes all messages in the inbox. | |
| void | deleteIncomingMessagePolicy (IncomingMsgPolicyInterface< MessageType > policy) |
| Completely removes the input policy from all lists of listeners. | |
| void | deleteStatsReporters () |
| Delete all StatsReporters. | |
| void | deleteOutgoingMessagePolicy (OutgoingMsgPolicyInterface< MessageType > policy) |
| Completely removes the outgoing message policy from all lists of listeners. | |
| void | cleanQueue () |
| Removes all messages from the inbox. | |
| void | setProblem (ProblemInterface<?, ?> problem) |
| Sets the problem that is queried for NCCCs. | |
| void | updateNCCCs (long msgNCCCs) |
| Updates the queue's NCCC counter to the input count if the input is greater. | |
| long | getCurrentTime () |
| int | getInboxSize () |
| MessageWrapper | getCurrentMessageWrapper () |
| HashMap< MessageType, Integer > | getMsgNbrs () |
| HashMap< Object, Integer > | getMsgNbrsSent () |
| HashMap< MessageType, Long > | getMsgSizes () |
| HashMap< Object, Long > | getMsgSizesSent () |
| HashMap< MessageType, Long > | getMaxMsgSizes () |
| void | resetStats () |
| Resets the metrics statistics. | |
| void | resetMsgSizeMonitor () |
| Closes the MsgSizeMonitor and creates a new one. | |
Package Functions | |
| public< T extends Object > void | sendMessageToMulti (Collection< T > recipients, Message msg) |
Private Member Functions | |
| void | releaseOutput (String var, boolean isRoot) |
| Releases the DFSoutput message for the input variable, and tell its children to do the same. | |
Private Attributes | |
| final S | root |
| The candidate root. | |
| HashMap< String, MessageDFSoutput<?, ?> > | dfsOutputMsgs = new HashMap< String, MessageDFSoutput<?, ?> > () |
| For each internal variable, the DFSoutput message that is being held until it becomes clear that the candidate root is indeed a root. | |
| HashMap< String, DFSorderOutputMessage > | dfsOrderMsgs = new HashMap<String, DFSorderOutputMessage> () |
| For each internal variable, the DFSorder message that is being held until it becomes clear that the candidate root is indeed a root. | |
| HashMap< String, MessageDFSoutput<?, ?> > | dfsStatsMsgs = new HashMap< String, MessageDFSoutput<?, ?> > () |
| For each internal variable, the DFSstats message that is being held until it becomes clear that the candidate root is indeed a root. | |
| HashMap< String, VarNbrMsg > | varNbrMsgs = new HashMap<String, VarNbrMsg> () |
| For each internal variable, the VarNbrMsg message that is being held until it becomes clear that the candidate root is indeed a root. | |
| HashMap< String, List< String > > | children = new HashMap< String, List<String> > () |
| For each variable I own, its list of children. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from frodo2.communication.Queue | |
| static String | networkToDOT (Queue[] queues) |
| Generates a String representation in DOT format of a network of queues. | |
| Protected Member Functions inherited from frodo2.communication.Queue | |
| Queue () | |
| Empty constructor that does absolutely nothing. | |
| boolean | notifyOutListeners (Object fromAgent, Message msg, Collection<? extends Object > toAgents) |
| Notifies the outgoing message listeners of a message. | |
| void | recordStats (Object to, Message msg) |
| Records statistics about the input message. | |
| Protected Attributes inherited from frodo2.communication.Queue | |
| Set< QueueInputPipeInterface > | inputs |
| List of input pipes. | |
| HashMap< Object, QueueOutputPipeInterface > | outputs |
| Map associating an output pipe to each destination ID. | |
| MsgSizeMonitor | monitor |
| A monitor used to measure the sizes of the messages. | |
| HashMap< MessageType, ArrayList< IncomingMsgPolicyInterface< MessageType > > > | inPolicies |
| A list of listeners notified of incoming objects. | |
| HashMap< MessageType, ArrayList< OutgoingMsgPolicyInterface< MessageType > > > | outPolicies |
| A list of listeners notified of outgoing messages. | |
| ProblemInterface<?, ?> | problem |
| The problem used to obtain the current NCCC count. | |
| final boolean | measureMsgs |
| Whether to measure the number of messages and the total amount of information sent. | |
| HashMap< MessageType, Integer > | msgNbrs |
| For each message type, the number of messages sent of that type. | |
| HashMap< MessageType, Long > | msgSizes |
| For each message type, the total amount of information sent in messages of that type, in bytes. | |
| HashMap< MessageType, Long > | maxMsgSizes |
| For each message type, the size (in bytes) of the largest message of that type. | |
| MessageWrapper | msgWrap |
| The last wrapped message to have been received. | |
There is one such FakeQueue for each candidate root.
| frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.FakeQueue | ( | S | root | ) |
Constructor.
| root | The candidate root |
References frodo2.communication.Queue.inPolicies, frodo2.communication.Queue.outPolicies, frodo2.communication.MessageType.ROOT, and root.
| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.addIncomingMessagePolicy | ( | IncomingMsgPolicyInterface< MessageType > | policy | ) |
The module's queue is set to a SinkQueue so that all messages sent are discarded.
Reimplemented from frodo2.communication.Queue.
References frodo2.communication.MessageListener< T >.setQueue().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.addIncomingMessagePolicyForReal | ( | DFSgeneration<?, ?> | dfsModule | ) |
Adds the input DFS module to the queue's listeners.
| dfsModule | DFS module |
Referenced by frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.newFakeQueue().
| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners | ( | Message | msg, |
| Object | toAgent ) |
Does the same as the superclass, but without the need to synchronize on a lock.
Reimplemented from frodo2.communication.Queue.
References frodo2.communication.MessageType.equals(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.getDest(), frodo2.communication.MessageType.getParent(), frodo2.communication.Message.getType(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.MessageDFSoutput< V extends Addable< V >, U extends Addable< U > >.getVar(), frodo2.communication.Queue.inPolicies, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queue, frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.RELEASE_OUTPUT_MSG_TYPE, releaseOutput(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.rootElectionScores, and frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.VARIABLE_COUNT_TYPE.
Referenced by frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.init(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.newFakeQueue(), and frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.notifyIn().

|
private |
Releases the DFSoutput message for the input variable, and tell its children to do the same.
| var | the variable whose DFSoutput message must be released |
| isRoot | whether the variable is the root |
References frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.owners, frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queue, sendMessage(), and frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR.
Referenced by notifyInListeners().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessage | ( | Object | to, |
| Message | msg ) |
Reimplemented from frodo2.communication.Queue.
References frodo2.communication.MessageType.equals(), frodo2.communication.Message.getType(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.MessageDFSoutput< V extends Addable< V >, U extends Addable< U > >.getVar(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queue, and frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.STATS_MSG_TYPE.
Referenced by releaseOutput().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessage | ( | Object | to, |
| MessageWrapper | msgWrap ) |
Reimplemented from frodo2.communication.Queue.
References frodo2.communication.Queue.msgWrap, and frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queue.
|
package |
Reimplemented from frodo2.communication.Queue.
References frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queue.
| void frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessageToSelf | ( | Message | msg | ) |
Reimplemented from frodo2.communication.Queue.
References frodo2.communication.MessageType.equals(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.getDest(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.MessageDFSoutput< V extends Addable< V >, U extends Addable< U > >.getNeighbors(), frodo2.communication.Message.getType(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.MessageDFSoutput< V extends Addable< V >, U extends Addable< U > >.getVar(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.getVar(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.OUTPUT_ORDER_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.queue, and frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.VARIABLE_COUNT_TYPE.

|
private |
For each variable I own, its list of children.
|
private |
For each internal variable, the DFSorder message that is being held until it becomes clear that the candidate root is indeed a root.
|
private |
For each internal variable, the DFSoutput message that is being held until it becomes clear that the candidate root is indeed a root.
|
private |
For each internal variable, the DFSstats message that is being held until it becomes clear that the candidate root is indeed a root.
|
private |
The candidate root.
Referenced by FakeQueue().
|
private |
For each internal variable, the VarNbrMsg message that is being held until it becomes clear that the candidate root is indeed a root.