|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
JUnit tests for ExpectedUTIL. More...

Classes | |
| class | Listener |
| The listener that checks the messages sent by the ExpectedUTIL listeners. More... | |
Public Member Functions | |
| ExpectedUTILtest (boolean useTCP, boolean useXML, Method method, int nbrSamples) | |
| Constructor. | |
| Public Member Functions inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > > | |
| UTILpropagationTest (String method) | |
| Constructor that instantiates a test only for the input method. | |
| UTILpropagationTest (boolean useTCP, boolean useXML, Class< U > utilClass, boolean minNCCCs) | |
| Constructor. | |
| void | testComputeDFS () |
| A test method that tests the test helper method computeDFS(). | |
| void | test () throws Exception |
| Tests the UTIL propagation protocol on a random graph. | |
Static Public Member Functions | |
| static TestSuite | suite () |
| Static Public Member Functions inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > > | |
| static< V extends Addable< V > U extends Addable< U > Map< String, DFSview< V, U > > | computeDFS (Graph graph, DCOPProblemInterface< V, U > problem) |
| static< V extends Addable< V > U extends Addable< U > Map< String, DFSview< V, U > > | computeDFS (Graph graph, DCOPProblemInterface< V, U > problem, boolean withSharedVars) |
| static< U extends Addable< U > Map< String, UtilitySolutionSpace< AddableInteger, U > > | startUTIL (RandGraphFactory.Graph graph, Map< String, DFSview< AddableInteger, U > > dfs, Map< String, Queue > queues, List< ? extends UtilitySolutionSpace< AddableInteger, U > > constraints) |
| Sends messages to the queues to initiate the UTIL propagation. | |
Protected Member Functions | |
| void | setUp () |
| Listener | newListenerInstance (boolean useTCP, boolean useXML, Element parameters) throws Exception |
| Creates a new Listener. | |
| Protected Member Functions inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > > | |
| void | tearDown () throws Exception |
| Ends all queues. | |
Protected Attributes | |
| final int | maxNbrVars = 5 |
| Maximum number of variables in the random graph. | |
| final int | maxNbrEdges = 10 |
| Maximum number of edges in the random graph. | |
| final int | maxNbrAgents = 5 |
| Maximum number of agents. | |
| Protected Attributes inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > > | |
| final int | maxNbrVars = 10 |
| Maximum number of variables in the random graph. | |
| final int | maxNbrEdges = 40 |
| Maximum number of edges in the random graph. | |
| final int | maxNbrAgents = 10 |
| Maximum number of agents. | |
| RandGraphFactory.Graph | graph |
| Random graph used to generate a constraint graph. | |
| Map< String, DFSview< AddableInteger, U > > | dfs |
| The DFS corresponding to the random graph. | |
| Element | parameters |
| The parameters for the module under test. | |
| boolean | maximize |
| Whether we should maximize or minimize. | |
| int | sign = 0 |
| The desired sign for the utilities (if 0, utilities can be either sign). | |
Private Attributes | |
| int | nbrSamples |
| The number of samples. | |
| Method | method |
| The method to use. | |
JUnit tests for ExpectedUTIL.
| frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.ExpectedUTILtest | ( | boolean | useTCP, |
| boolean | useXML, | ||
| Method | method, | ||
| int | nbrSamples ) |
Constructor.
| useTCP | whether to use TCP pipes or shared memory pipes |
| useXML | whether to use the XML-based constructor |
| method | the method to use |
| nbrSamples | the number of samples |
References frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION_MONOTONE, method, nbrSamples, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useTCP, and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useXML.
Referenced by suite().
|
protected |
Creates a new Listener.
| 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 |
| parameters | the parameters for the module under test |
| Exception | if an error occurs |
Reimplemented from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.
References frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.parameters, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useTCP, and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useXML.
|
protected |
Reimplemented from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.
References frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS_ALL_SOLS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION_MONOTONE, frodo2.algorithms.RandGraphFactory.getNiceRandGraph(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.graph, maxNbrAgents, maxNbrEdges, maxNbrVars, and method.

|
static |
Reimplemented from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.
References frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS_ALL_SOLS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION_MONOTONE, and ExpectedUTILtest().
Referenced by frodo2.algorithms.dpop.stochastic.test.AllTestsStochDPOP.suite().

|
protected |
Maximum number of agents.
Referenced by setUp().
|
protected |
Maximum number of edges in the random graph.
Referenced by setUp().
|
protected |
|
private |
The method to use.
Referenced by frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), ExpectedUTILtest(), and setUp().
|
private |
The number of samples.
Referenced by frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), ExpectedUTILtest(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.notifyIn(), and frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.setUpPrelimModules().