|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Test for the ODPOP VALUE propagation module. More...

Public Member Functions | |
| VALUEpropagationTest (boolean useTCP, boolean useXML, Class< V > domClass, Class< U > utilClass) | |
| Constructor. | |
| void | test () throws IOException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, ClassNotFoundException, InvocationTargetException |
| Runs a random test. | |
| 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 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. | |
| U | optUtil |
| The optimal utility reported by the UTILpropagation. | |
| HashMap< String, V > | assignments |
| The assignments reported by the variables. | |
| boolean | useTCP |
| Whether to use TCP or SharedMemory pipes. | |
| boolean | useXML |
| Whether to test the XML-enabled constructor. | |
| Class< V > | domClass |
| The class of variable values. | |
| Class< U > | utilClass |
| The class of utility values. | |
Test for the ODPOP VALUE propagation module.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.VALUEpropagationTest | ( | boolean | useTCP, |
| boolean | useXML, | ||
| Class< V > | domClass, | ||
| Class< U > | utilClass ) |
| Collection< MessageType > frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References frodo2.algorithms.SolutionCollector< V extends Addable< V >, U extends Addable< U > >.ASSIGNMENT_MSG_TYPE, and frodo2.algorithms.odpop.UTILpropagationFullDomain< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.OPT_UTIL_MSG_TYPE.
| void frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References notifyIn(), and frodo2.algorithms.odpop.UTILpropagationFullDomain< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.OPT_UTIL_MSG_TYPE.
Referenced by notifyIn().

| void frodo2.algorithms.odpop.tests.VALUEpropagationTest< 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, optUtil, 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 VALUEpropagationTest().
Referenced by frodo2.algorithms.odpop.tests.AllTestsODPOP.suite().

|
protected |
| void frodo2.algorithms.odpop.tests.VALUEpropagationTest< V extends Addable< V >, U extends Addable< U > >.test | ( | ) | throws IOException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, ClassNotFoundException, InvocationTargetException |
Runs a random test.
| IOException | if the method fails to create pipes |
| NoSuchMethodException | if the ADOPT class does not have a public constructor that takes in a ProblemInterface and a JDOM Element |
| IllegalAccessException | if the ADOPT class does not have a public constructor that takes in a ProblemInterface and a JDOM Element |
| InstantiationException | if the instantiation of ADOPT failed |
| IllegalArgumentException | if an error occurs in passing arguments to the constructor of ADOPT |
| ClassNotFoundException | if the utility class is not found |
| InvocationTargetException | if a module constructor throws an exception |
References frodo2.communication.Queue.addIncomingMessagePolicy(), assignments, frodo2.algorithms.test.AllTests.createQueueNetwork(), dfs, domClass, 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.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, optUtil, parameters, parser, problem, queues, frodo2.communication.Queue.setProblem(), solver, startUTILpropagation(), frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, test(), useTCP, and useXML.
Referenced by 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 setUp(), test(), and VALUEpropagationTest().
|
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 |
The optimal utility reported by the UTILpropagation.
|
private |
|
protected |
|
private |
|
private |
List of queues, indexed by agent name.
Referenced by startUTILpropagation(), tearDown(), and test().
|
private |
|
private |
Whether to use TCP or SharedMemory pipes.
Referenced by test(), and VALUEpropagationTest().
|
private |
Whether to test the XML-enabled constructor.
Referenced by test(), and VALUEpropagationTest().
|
private |
The class of utility values.
Referenced by setUp(), and VALUEpropagationTest().