|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
JUnit for DFSgeneration with Order. More...

Public Member Functions | |
| DFSgenerationWithOrderTest (boolean useTCP, Class< ? extends ScoringHeuristic<?> > heuristic, int minIncr) | |
| Constructor. | |
| void | testRandom () throws IllegalArgumentException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException |
| Extends parent's method to include tests on correct order assignment. | |
| Collection< MessageType > | getMsgTypes () |
| Listens to the output of the DFS generation protocol. | |
| synchronized void | notifyIn (Message msg) |
| Public Member Functions inherited from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest | |
| DFSgenerationTest (boolean useTCP, boolean useXML, Class< ? extends ScoringHeuristic<?> > heuristic) | |
| Constructor. | |
| 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 () |
| Static Public Member Functions inherited from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest | |
| static void | checkDFS (Map< String, ? extends DFSview<?, ?> > dfs, Map< String, Set< String > > neighborhoods, LinkedList< String > path) |
| Checks that the input is indeed a DFS tree. | |
Protected Member Functions | |
| Element | createDFSparams (Element heuristicParams) |
| MessageType | getOutputMsgType () |
| Class<?> | getDFSclass () |
| Protected Member Functions inherited from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest | |
| void | setUp () |
| void | tearDown () throws Exception |
| Ends all queues. | |
| void | sendLEoutputs (String agent, Map< String, String > rootForVar) |
| Sends the LEoutput messages. | |
Private Attributes | |
| Map< String, Integer > | totals |
| For each variable, the total number of variables in its constraint graph component. | |
| ArrayList< String > | are_root |
| List of all roots. | |
| HashMap< String, Integer > | node_order |
| Stores order of the Variables in the DFS. | |
| final int | minIncr |
| Each variable overstates by rand(minIncr, 2*minIncr) its visiting order in the constraint graph traversal, in order to keep its number of neighbors secret. | |
Additional Inherited Members | |
| Protected Attributes inherited from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest | |
| int | nbrOutputMessagesPerVar = 2 |
| Number of output messages expected per variable. | |
| int | remainingOutputs |
| Current number of variables that still need to send their output of the DFS generation protocol. | |
| Map< String, DFSview< AddableInteger, AddableReal > > | dfs = new HashMap< String, DFSview<AddableInteger, AddableReal> > (maxNbrVars) |
| Output of the DFS generation protocol. | |
| RandGraphFactory.Graph | graph |
| Random graph used to generate a constraint graph. | |
JUnit for DFSgeneration with Order.
| frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.DFSgenerationWithOrderTest | ( | boolean | useTCP, |
| Class< ? extends ScoringHeuristic<?> > | heuristic, | ||
| int | minIncr ) |
Constructor.
| useTCP | whether to use TCP pipes |
| heuristic | the class of the ScoringHeuristic used |
| minIncr | each variable overstates by rand(minIncr, 2*minIncr) its visiting order in the constraint graph traversal, in order to keep its number of neighbors secret |
References minIncr, and frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.useTCP.
Referenced by suite().
|
protected |
Reimplemented from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.
|
protected |
Reimplemented from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.
| Collection< MessageType > frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.getMsgTypes | ( | ) |
Listens to the output of the DFS generation protocol.
Reimplemented from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.
References frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.CHILD_ORDER_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.OUTPUT_ORDER_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ROOT_VAR_MSG_TYPE, and frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.VARIABLE_COUNT_TYPE.
|
protected |
| synchronized void frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.notifyIn | ( | Message | msg | ) |
Reimplemented from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.
References are_root, frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.CHILD_ORDER_MSG_TYPE, frodo2.communication.MessageType.equals(), frodo2.algorithms.varOrdering.dfs.CHILDmsg.getDest(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.getDest(), frodo2.algorithms.varOrdering.dfs.CHILDorderMsg.getOrder(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.getTotal(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.getTrueOrder(), frodo2.communication.Message.getType(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.getVar(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.graph, node_order, frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.OUTPUT_ORDER_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.ROOT_VAR_MSG_TYPE, totals, and frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.VARIABLE_COUNT_TYPE.

|
static |
Reimplemented from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.
References DFSgenerationWithOrderTest().
Referenced by frodo2.algorithms.varOrdering.dfs.tests.AllTestsDFS.suite().

| void frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.testRandom | ( | ) | throws IllegalArgumentException, IOException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException |
Extends parent's method to include tests on correct order assignment.
Reimplemented from frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.
References are_root, frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.graph, frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationTest.nbrOutputMessagesPerVar, node_order, and totals.
|
private |
List of all roots.
Referenced by notifyIn(), and testRandom().
|
private |
Each variable overstates by rand(minIncr, 2*minIncr) its visiting order in the constraint graph traversal, in order to keep its number of neighbors secret.
Referenced by DFSgenerationWithOrderTest().
|
private |
Stores order of the Variables in the DFS.
Referenced by notifyIn(), and testRandom().
|
private |
For each variable, the total number of variables in its constraint graph component.
Referenced by notifyIn(), and testRandom().