|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
JUnit test for the class ASODPOP. More...

Public Member Functions | |
| ASODPOPBinaryTest (String method, Class< V > domClass, Class< U > utilClass) | |
| Constructor that instantiates a test only for the input method. | |
| void | testRandomSharedMemory () throws Exception |
| Tests the ADOPT protocol on a random graph using QueueIOPipes. | |
| void | testRandomTCP () throws Exception |
| Tests the ADOPT protocol on a random graph using TCP pipes. | |
| void | testRandomSharedMemoryNoXML () throws Exception |
| Tests the ADOPT protocol on a random graph using QueueIOPipes. | |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| 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 Member Functions | |
| static TestSuite | suite () |
| static< V extends Addable< V > U extends Addable< U > void | startUTILpropagation (RandGraphFactory.Graph graph, Map< String, DFSview< V, U > > dfs, Map< String, Queue > queues) |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Protected Attributes | |
| XCSPparser< V, U > | parser |
| The XCSP parser. | |
Private Member Functions | |
| void | test (String combination, boolean useTCP, boolean useXML) throws Exception |
| Runs a random test. | |
Private 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. | |
| int | nbrMsgsRemaining |
| The number of output messages remaining to be received from the UTIL propagation protocol. | |
| final Object | nbrMsgsRemaining_lock = new Object () |
| Used to synchronize the access to nbrMsgsRemaining. | |
| Map< String, Queue > | queues |
| List of queues, indexed by agent name. | |
| Element | parameters |
| The parameters for adopt. | |
| RandGraphFactory.Graph | graph |
| Random graph used to generate a constraint graph. | |
| Map< String, DFSview< V, U > > | dfs |
| The DFS corresponding to the random graph. | |
| Document | problem |
| The problem to be solved. | |
| DPOPsolver< V, U > | solver |
| Solver used to calculate the optimal utility. | |
| HashMap< String, V > | assignments |
| The assignments reported by the variables. | |
| Class< V > | domClass |
| The class of variable values. | |
| Class< U > | utilClass |
| The class of utility values. | |
JUnit test for the class ASODPOP.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.ASODPOPBinaryTest | ( | String | method, |
| Class< V > | domClass, | ||
| Class< U > | utilClass ) |
| Collection< MessageType > frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.getMsgTypes | ( | ) |
| void frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.ASSIGNMENT_MSG_TYPE, and notifyIn().
Referenced by notifyIn().

| void frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
|
protected |
References assignments, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS(), dfs, domClass, frodo2.algorithms.test.AllTests.generateProblem(), frodo2.algorithms.RandGraphFactory.getRandGraph(), graph, maxNbrAgents, maxNbrEdges, maxNbrVars, parameters, parser, problem, solver, and utilClass.

|
static |
References dfs, graph, queues, frodo2.communication.Queue.sendMessageToSelf(), and frodo2.algorithms.AgentInterface< V extends Addable< V > >.START_AGENT.
Referenced by test().

|
static |
References ASODPOPBinaryTest().
Referenced by frodo2.algorithms.asodpop.tests.AllTestsASODPOP.suite().

|
protected |
|
private |
Runs a random test.
| combination | the version of ADOPT |
| useTCP | whether to use TCP pipes or shared memory pipes |
| useXML | whether to use the XML-based constructor |
| Exception | if an error occurs |
References frodo2.communication.Queue.addIncomingMessagePolicy(), assignments, frodo2.algorithms.test.AllTests.createQueueNetwork(), dfs, frodo2.communication.Queue.end(), frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.getAgents(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getDomain(), frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.getDomClass(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getOwners(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getProbabilitySpacePerRandVar(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getRandVars(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSolutionSpaces(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getSubProblem(), frodo2.solutionSpaces.ProblemInterface< V extends Addable< V >, U extends Addable< U > >.getUtilClass(), frodo2.algorithms.Solution< V, U >.getUtility(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getVariables(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getVarScopes(), graph, nbrMsgsRemaining, nbrMsgsRemaining_lock, parameters, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), parser, problem, queues, frodo2.communication.Queue.setProblem(), solver, startUTILpropagation(), frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, and test().
Referenced by test(), testRandomSharedMemory(), testRandomSharedMemoryNoXML(), and testRandomTCP().

| void frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.testRandomSharedMemory | ( | ) | throws Exception |
Tests the ADOPT protocol on a random graph using QueueIOPipes.
| Exception | if an error occurs |
References test().

| void frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.testRandomSharedMemoryNoXML | ( | ) | throws Exception |
Tests the ADOPT protocol on a random graph using QueueIOPipes.
| Exception | if an error occurs |
References test().

| void frodo2.algorithms.asodpop.tests.ASODPOPBinaryTest< V extends Addable< V >, U extends Addable< U > >.testRandomTCP | ( | ) | throws Exception |
Tests the ADOPT protocol on a random graph using TCP pipes.
| Exception | if an error occurs |
References test().

|
private |
|
private |
The DFS corresponding to the random graph.
Referenced by setUp(), startUTILpropagation(), tearDown(), and test().
|
private |
The class of variable values.
Referenced by ASODPOPBinaryTest(), and setUp().
|
private |
Random graph used to generate a constraint graph.
Referenced by setUp(), startUTILpropagation(), tearDown(), and test().
|
private |
Maximum number of agents.
Referenced by setUp().
|
private |
Maximum number of edges in the random graph.
Referenced by setUp().
|
private |
|
private |
The number of output messages remaining to be received from the UTIL propagation protocol.
Referenced by test().
|
private |
Used to synchronize the access to nbrMsgsRemaining.
We cannot synchronize directly over nbrMsgsRemaining because it will be decremented, and hence the object will change.
Referenced by test().
|
private |
|
protected |
|
private |
|
private |
List of queues, indexed by agent name.
Referenced by startUTILpropagation(), tearDown(), and test().
|
private |
|
private |
The class of utility values.
Referenced by ASODPOPBinaryTest(), and setUp().