|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
JUnit tests for Util reuse in S-DPOP. More...

Public Member Functions | |
| TestSDPOP (String method, Class< V > domClass, Class< U > utilClass) | |
| Constructor. | |
| void | testCorrectness () |
| running the test by comparing Solution of S-DPOP to solution of DPOP | |
| Solution< V, U > | testGeneric (int changeType) |
| provides a generic test method which takes the test type as argument | |
| void | testAddDisconnected () |
| Add a disconnected variable to the problem, no UTIL message should be sent. | |
| void | testAddOneToRoot () |
| adds a single variable to the root, only 1 util-msg should be sent | |
| void | testChangeLeafVariableName () |
| change the name of a leaf variable with no backedges, only 1 util-msg should be sent | |
| void | testReuse () |
| Checks that no UTIL message is sent when the problem doesn't change. | |
Static Public Member Functions | |
| static TestSuite | suite () |
| static Document | modifyProblemRandomly (Document problem, double nodeRatio) |
Static Public Attributes | |
| static int | maxNbrVars = 10 |
| Maximum number of variables. | |
| static int | maxNbrEdges = 40 |
| Maximum number of edges in the primal constraint graph. | |
| static int | maxNbrAgents = 10 |
| Maximum number of agents. | |
| static final int | TEST_RANDOM_CHANGE = 1 |
| test type | |
| static final int | TEST_CHANGE_LEAF_NAME = 2 |
| test type | |
| static final int | TEST_ADD_ROOT_NEIGHBOR = 3 |
| test type | |
| static final int | TEST_ADD_DISCONNECTED = 4 |
| test type | |
| static double | changeRatio = 0.5 |
| Probability of changing any given relation when randomly modifying problem. | |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () |
Private Member Functions | |
| Document | changeLeafName (Document problem2) |
| changes name of one leaf variable with no back-edges | |
| Document | addDisconnected (Document problem2) |
| adds one disconnected variable to the problem | |
| Document | addRootNeighbor (Document problem2) |
| adds a neighbor to the root of the problem | |
Private Attributes | |
| Document | SDPOPagent = null |
| S-DPOP agent. | |
| Document | DPOPagent = null |
| DPOP agent. | |
| DPOPsolver< V, U > | DPOPsolver = null |
| DPOP solver. | |
| DPOPsolver< V, U > | SDPOPsolver = null |
| S-DPOP solver. | |
| Document | problem = null |
| The problem. | |
| Class< V > | domClass |
| The class used for variable values. | |
| Class< U > | utilClass |
| The class used for utility values. | |
JUnit tests for Util reuse in S-DPOP.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.TestSDPOP | ( | String | method, |
| Class< V > | domClass, | ||
| Class< U > | utilClass ) |
|
private |
adds one disconnected variable to the problem
| problem2 | original problem |
Referenced by testGeneric().
|
private |
adds a neighbor to the root of the problem
| problem2 | original problem |
Referenced by testGeneric().
|
private |
changes name of one leaf variable with no back-edges
| problem2 | original problem |
Referenced by testGeneric().
|
static |
| problem | the initial problem |
| nodeRatio | probability of changing any given relation |
References problem.
Referenced by testGeneric().
|
protected |
References frodo2.algorithms.test.AllTests.createRandProblem(), DPOPagent, DPOPsolver, maxNbrAgents, maxNbrEdges, maxNbrVars, and frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse().

|
static |
References suite(), and TestSDPOP().
Referenced by frodo2.algorithms.dpop.restart.test.AllTestsS_DPOP.suite(), and suite().

|
protected |
| void frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testAddDisconnected | ( | ) |
Add a disconnected variable to the problem, no UTIL message should be sent.
References frodo2.algorithms.Solution< V, U >.getMsgNbrs(), TEST_ADD_DISCONNECTED, testGeneric(), and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTIL_MSG_TYPE.

| void frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testAddOneToRoot | ( | ) |
adds a single variable to the root, only 1 util-msg should be sent
References TEST_ADD_ROOT_NEIGHBOR, and testGeneric().

| void frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testChangeLeafVariableName | ( | ) |
change the name of a leaf variable with no backedges, only 1 util-msg should be sent
References TEST_CHANGE_LEAF_NAME, and testGeneric().

| void frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testCorrectness | ( | ) |
running the test by comparing Solution of S-DPOP to solution of DPOP
References TEST_RANDOM_CHANGE, and testGeneric().

| Solution< V, U > frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testGeneric | ( | int | changeType | ) |
provides a generic test method which takes the test type as argument
| changeType | specifies the type of change to be tested |
References addDisconnected(), addRootNeighbor(), changeLeafName(), changeRatio, DPOPsolver, frodo2.algorithms.Solution< V, U >.getReportedUtil(), frodo2.algorithms.Solution< V, U >.getUtility(), modifyProblemRandomly(), problem, SDPOPagent, SDPOPsolver, frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve(), TEST_ADD_DISCONNECTED, TEST_ADD_ROOT_NEIGHBOR, TEST_CHANGE_LEAF_NAME, and TEST_RANDOM_CHANGE.
Referenced by testAddDisconnected(), testAddOneToRoot(), testChangeLeafVariableName(), and testCorrectness().

| void frodo2.algorithms.dpop.restart.test.TestSDPOP< V extends Addable< V >, U extends Addable< U > >.testReuse | ( | ) |
Checks that no UTIL message is sent when the problem doesn't change.
References DPOPsolver, frodo2.algorithms.Solution< V, U >.getMsgSizes(), frodo2.algorithms.Solution< V, U >.getReportedUtil(), frodo2.algorithms.Solution< V, U >.getUtility(), problem, SDPOPagent, SDPOPsolver, frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve(), and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTIL_MSG_TYPE.

|
static |
Probability of changing any given relation when randomly modifying problem.
Referenced by testGeneric().
|
private |
The class used for variable values.
Referenced by TestSDPOP().
|
private |
DPOP agent.
Referenced by setUp().
|
private |
DPOP solver.
Referenced by setUp(), testGeneric(), and testReuse().
|
static |
Maximum number of agents.
Referenced by setUp().
|
static |
Maximum number of edges in the primal constraint graph.
Referenced by setUp().
|
static |
Maximum number of variables.
Referenced by setUp().
|
private |
The problem.
Referenced by modifyProblemRandomly(), testGeneric(), and testReuse().
|
private |
S-DPOP agent.
Referenced by testGeneric(), and testReuse().
|
private |
S-DPOP solver.
Referenced by testGeneric(), and testReuse().
|
static |
test type
Referenced by testAddDisconnected(), and testGeneric().
|
static |
test type
Referenced by testAddOneToRoot(), and testGeneric().
|
static |
test type
Referenced by testChangeLeafVariableName(), and testGeneric().
|
static |
|
private |
The class used for utility values.
Referenced by TestSDPOP().