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

Public Member Functions | |
| SamplingPhaseTest (Class< ? extends IncomingMsgPolicyInterface< MessageType > > versionClass, String whereToProj) | |
| Constructor. | |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| Public Member Functions inherited from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest | |
| LowestCommonAncestorsTest (String method) | |
| Constructor that instantiates a test only for the input method. | |
| void | test () throws Exception |
| Tests the output of the LowestCommonAncestors module. | |
| void | setQueue (Queue queue) |
| Does nothing in this case. | |
| 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 () |
Protected Member Functions | |
| void | setUp () |
| void | tearDown () throws Exception |
| void | checkOutput () |
| void | setModules () throws Exception |
Private Attributes | |
| final int | maxNbrRandVars = 10 |
| Maximum number of random variables in the random graph. | |
| Document | problem |
| The random problem. | |
| XCSPparser< AddableInteger, AddableReal > | parser |
| The parser for the overall problem. | |
| HashMap< String, DCOPProblemInterface< AddableInteger, AddableReal > > | subProblems |
| Each agent's subproblem. | |
| HashMap< String, Collection< String > > | allHigherRelevantRandVars |
| For each variable, the random variables 1) that one of its ancestors must project out and 2) that one of its descendants is a neighbor of. | |
| Class< ? extends IncomingMsgPolicyInterface< MessageType > > | versionClass |
| The inner class under test. | |
| String | whereToProj |
| Where random variables should be projected out (leaves, lcas, or roots). | |
Additional Inherited Members | |
| Protected Attributes inherited from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest | |
| final int | maxNbrVars = 20 |
| Maximum number of variables in the random graph. | |
| RandGraphFactory.Graph | graph |
| Random graph. | |
| HashMap< String, HashSet< String > > | allFlags |
| For each node, its set of flags. | |
| HashMap< String, HashSet< String > > | lcas = new HashMap< String, HashSet<String> > () |
| For each node, the set of flags it is the lca of. | |
| Map< String, Queue > | queues |
| List of queues, indexed by agent name. | |
| Map< String, QueueOutputPipeInterface > | pipes |
| One output pipe used to send messages to each queue, indexed by the queue's agent name. | |
| int | remainingOutputs |
| Current number of outputs yet to be received from the LowestCommonAncestors module. | |
| final ReentrantLock | finished_lock = new ReentrantLock () |
| Used to make the test thread wait. | |
| final Condition | finished = finished_lock.newCondition() |
| Used to wake up the test thread when all agents have finished. | |
| Map< String, ? extends DFSview<?, ?> > | dfs |
| The chosen DFS. | |
JUnit tests for SamplingPhase.
| frodo2.algorithms.dpop.stochastic.test.SamplingPhaseTest.SamplingPhaseTest | ( | Class< ? extends IncomingMsgPolicyInterface< MessageType > > | versionClass, |
| String | whereToProj ) |
Constructor.
| versionClass | the inner class under test |
| whereToProj | where random variables should be projected out (leaves, lcas, or roots) |
References versionClass, and whereToProj.
Referenced by suite().
|
protected |
Reimplemented from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.
References frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.allFlags, frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.dfs, frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.graph, frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.lcas, parser, and subProblems.
| Collection< MessageType > frodo2.algorithms.dpop.stochastic.test.SamplingPhaseTest.getMsgTypes | ( | ) |
| void frodo2.algorithms.dpop.stochastic.test.SamplingPhaseTest.notifyIn | ( | Message | msg | ) |
Reimplemented from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.
References frodo2.communication.MessageType.equals(), frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.finished, frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.finished_lock, frodo2.algorithms.dpop.stochastic.LCAmsg2.getNode(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RandVarsProjMsg.getRandVars(), frodo2.algorithms.dpop.stochastic.SamplesMsg2< V extends Addable< V > >.getSamples(), frodo2.communication.Message.getType(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RandVarsProjMsg.getVariable(), frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.lcas, frodo2.algorithms.dpop.stochastic.LowestCommonAncestors.PHASE2_MSG_TYPE, frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RAND_VARS_PROJ_MSG_TYPE, and frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.remainingOutputs.

|
protected |
Reimplemented from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.
References frodo2.communication.Queue.addIncomingMessagePolicy(), parser, frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.queues, and frodo2.communication.Queue.setProblem().

|
protected |
Reimplemented from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.
References frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.allFlags, allHigherRelevantRandVars, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.computeDFS(), frodo2.algorithms.test.AllTests.generateProblem(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getNeighborVars(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getVariables(), frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.graph, maxNbrRandVars, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.setUtilClass(), and subProblems.

|
static |
Reimplemented from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.
References SamplingPhaseTest().
Referenced by frodo2.algorithms.dpop.stochastic.test.AllTestsStochDPOP.suite().

|
protected |
Reimplemented from frodo2.algorithms.dpop.stochastic.test.LowestCommonAncestorsTest.
|
private |
For each variable, the random variables 1) that one of its ancestors must project out and 2) that one of its descendants is a neighbor of.
Referenced by setUp().
|
private |
Maximum number of random variables in the random graph.
Referenced by setUp().
|
private |
The parser for the overall problem.
Referenced by checkOutput(), and setModules().
|
private |
The random problem.
|
private |
Each agent's subproblem.
Referenced by checkOutput(), and setUp().
|
private |
The inner class under test.
Referenced by SamplingPhaseTest().
|
private |
Where random variables should be projected out (leaves, lcas, or roots).
Referenced by SamplingPhaseTest().