|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
The listener that checks the messages sent by the UTILpropagation and VALUEpropagation listeners. More...

Public Member Functions | |
| Listener (boolean useTCP, boolean useXML, Class< ? extends IncomingMsgPolicyInterface< MessageType > > UTILpropClass, Class< ? extends IncomingMsgPolicyInterface< MessageType > > VALUEpropClass, boolean withAnonymVars) throws IOException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException | |
| Constructor that tests the UTIL and VALUE propagation protocols on a random DFS. | |
| Collection< MessageType > | getMsgTypes () |
| Listens to the outputs of the UTIL and VALUE propagation protocols. | |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| Does nothing. | |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| void | reset () |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
Protected Member Functions | |
| void | checkOutput () |
| Checks that the output of the module is correct. | |
| Hypercube< AddableInteger, U > | simulateUTILslice (String var) |
| Simulates UTIL propagation on the subtree rooted at the input variable, doing slices instead of projections. | |
Protected Attributes | |
| Map< String, UtilitySolutionSpace< AddableInteger, U > > | hypercubes |
| For each variable, the constraint it is responsible for enforcing. | |
| XCSPparser< AddableInteger, U > | parser |
| The parser for the problem. | |
Private Member Functions | |
| void | waitForOutputs () |
| Waits for the outputs of the module and checks their validity. | |
Private Attributes | |
| U | optTotalUtil |
| Optimal, total utility across all connected components. | |
| Object | optTotalUtil_lock = new Object () |
Used to synchronize access to optTotalUtil, which can be null. | |
| Map< String, QueueOutputPipeInterface > | pipes |
| The pipes of the queue network, indexed by agent name. | |
| Queue | myQueue |
| The Listener's own queue. | |
| List< ? extends UtilitySolutionSpace< AddableInteger, U > > | spaces |
| The constraints in the problem. | |
| SolutionCollector< AddableInteger, U > | solCollector |
| The statistics gatherer. | |
The listener that checks the messages sent by the UTILpropagation and VALUEpropagation listeners.
| frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.Listener | ( | boolean | useTCP, |
| boolean | useXML, | ||
| Class< ? extends IncomingMsgPolicyInterface< MessageType > > | UTILpropClass, | ||
| Class< ? extends IncomingMsgPolicyInterface< MessageType > > | VALUEpropClass, | ||
| boolean | withAnonymVars ) throws IOException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException |
Constructor that tests the UTIL and VALUE propagation protocols on a random DFS.
| useTCP | true whether TCP pipes should be used instead of QueueIOPipes |
| useXML | whether we should use the constructor that takes in XML elements, or the manual constructor |
| UTILpropClass | the class of the UTIL propagation module under test |
| VALUEpropClass | the class of the VALUE propagation module under test |
| withAnonymVars | if true, variables without owners are taken into account |
| IOException | if the method fails to create pipes |
| NoSuchMethodException | if the VALUEpropagation class does not have a public constructor that takes in a ProblemInterface and a JDOM Element |
| InvocationTargetException | if the VALUEpropagation constructor throws an exception |
| IllegalAccessException | if the VALUEpropagation class does not have a public constructor that takes in a ProblemInterface and a JDOM Element |
| InstantiationException | would be thrown if VALUEpropagation were abstract |
| IllegalArgumentException | if the VALUEpropagation constructor does not take the proper arguments |
References frodo2.communication.Queue.addIncomingMessagePolicy(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS(), frodo2.algorithms.test.AllTests.createQueueNetwork(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.dfs, frodo2.algorithms.test.AllTests.generateProblem(), getStatsFromQueue(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSubProblem(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.graph, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.maximize, myQueue, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.nbrMsgsRemaining, parser, pipes, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.queues, frodo2.communication.Queue.setProblem(), frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.setUtilClass(), solCollector, spaces, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.useTCP, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.useXML, and frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.utilClass.

|
protected |
Checks that the output of the module is correct.
References frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.dfs, frodo2.solutionSpaces.hypercube.Hypercube< V extends Addable< V >, U extends Addable< U > >.getUtility(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.graph, optTotalUtil, and simulateUTILslice().
Referenced by waitForOutputs().

| Collection< MessageType > frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.getMsgTypes | ( | ) |
Listens to the outputs of the UTIL and VALUE propagation protocols.
Implements frodo2.communication.MessageListener< T >.
References frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.ASSIGNMENTS_MSG_TYPE, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.OPT_UTIL_MSG_TYPE.
| void frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.getStatsFromQueue | ( | Queue | queue | ) |
Implements frodo2.algorithms.StatsReporter.
References frodo2.communication.Queue.addIncomingMessagePolicy(), and frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.ASSIGNMENTS_MSG_TYPE.
Referenced by Listener().

| void frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.communication.MessageType.equals(), notifyIn(), and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.OPT_UTIL_MSG_TYPE.
Referenced by notifyIn().

| void frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
| void frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.setQueue | ( | Queue | queue | ) |
Does nothing.
Implements frodo2.communication.MessageListener< T >.
| void frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.Listener.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
|
protected |
Simulates UTIL propagation on the subtree rooted at the input variable, doing slices instead of projections.
| var | root variable |
References frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.dfs, hypercubes, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.optAssignments, parser, simulateUTILslice(), and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.slice().
Referenced by checkOutput(), and simulateUTILslice().

|
private |
Waits for the outputs of the module and checks their validity.
References checkOutput(), frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.dfs, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.finished, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.finished_lock, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.graph, hypercubes, myQueue, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.nbrMsgsRemaining, pipes, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.queues, spaces, and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.startUTIL().
Referenced by frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.test().

|
protected |
For each variable, the constraint it is responsible for enforcing.
Referenced by simulateUTILslice(), and waitForOutputs().
|
private |
The Listener's own queue.
Referenced by Listener(), and waitForOutputs().
|
private |
Optimal, total utility across all connected components.
Referenced by checkOutput().
|
private |
Used to synchronize access to optTotalUtil, which can be null.
|
protected |
The parser for the problem.
Referenced by Listener(), and simulateUTILslice().
|
private |
The pipes of the queue network, indexed by agent name.
Referenced by Listener(), and waitForOutputs().
|
private |
The statistics gatherer.
Referenced by Listener().
|
private |
The constraints in the problem.
Referenced by Listener(), and waitForOutputs().