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

Public Member Functions | |
| TestDSA (String name, String strategy, boolean maximize, Class< U > utilClass) | |
| void | testStrategyA () |
| Test the strategy A. | |
| void | testStrategyC () |
| Test the strategy C. | |
| void | testStrategyE () |
| Test the strategy E. | |
Static Public Member Functions | |
| static TestSuite | suite () |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Attributes | |
| final int | maxNbrVars = 40 |
| Maximum number of variables in the problem. | |
| final int | maxNbrEdges = 800 |
| Maximum number of binary constraints in the problem. | |
| final int | maxNbrAgents = 10 |
| Maximum number of agents. | |
| XCSPparser< AddableInteger, U > | problem |
| A random problem used to test. | |
| String | agent |
| The agent for which the decision strategy is to be tested. | |
| String | variable |
| The variable for which the decision strategy is to be tested. | |
| AddableInteger[] | ownDomain |
The domain of variable. | |
| int | domainSize |
The size of ownDomain. | |
| String[] | neighbours |
| The neighboring variables of variable. | |
| int | numberOfNeighbours |
| The number of neighbours. | |
| AddableInteger | initialValue |
| The initial value of variable. | |
| AddableInteger[] | context |
| Array for storing the context values. | |
| String[] | contextVariables |
| Array for storing the context variables. | |
| List< ? extends UtilitySolutionSpace< AddableInteger, U > > | spaces |
| A list of spaces known by agent. | |
| XCSPparser< AddableInteger, U > | subProblem |
| The subproblem belonging to the agent. | |
| boolean | maximize |
true when the problem is a maximization problem, and false otherwise | |
| U | optimal |
| The utility of the optimal assignment. | |
| U | originalUtil |
| The utility of the original assignment. | |
| AddableInteger | optimalValue |
| The optimal value assignment given the context. | |
| AddableInteger | value |
| The final value of the variable. | |
| Queue | q |
| The queue used to send messages. | |
| Queue | q2 |
| Dummy queue to be used as a sink. | |
| Element | parameters |
| The modules parameters. | |
| DSA< AddableInteger, U > | module |
| Instance of the module to be tested. | |
| String | strategy |
| Decision strategy to be tested. | |
| int | comparison |
| The difference between the optimal utility and the current utility. | |
| Class< U > | utilClass |
| The class used for utility values. | |
JUnit tests for the DSA algorithm.
Since DSA it is not complete, the only things that can be tested are the different decision strategies.
| <U> | the type used for utility values |
| frodo2.algorithms.localSearch.dsa.tests.TestDSA< U extends Addable< U > >.TestDSA | ( | String | name, |
| String | strategy, | ||
| boolean | maximize, | ||
| Class< U > | utilClass ) |
|
protected |
References agent, comparison, context, contextVariables, domainSize, frodo2.algorithms.test.AllTests.generateProblem(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getMinInfUtility(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getPlusInfUtility(), frodo2.algorithms.RandGraphFactory.getRandGraph(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getVariables(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getZeroUtility(), initialValue, maximize, maxNbrAgents, maxNbrEdges, maxNbrVars, module, neighbours, numberOfNeighbours, optimal, optimalValue, originalUtil, ownDomain, parameters, problem, q, q2, spaces, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, strategy, subProblem, utilClass, value, and variable.

|
static |
References suite(), and TestDSA().
Referenced by frodo2.algorithms.localSearch.dsa.tests.AllTestsDSA.suite(), and suite().

|
protected |
| void frodo2.algorithms.localSearch.dsa.tests.TestDSA< U extends Addable< U > >.testStrategyA | ( | ) |
Test the strategy A.
References comparison, initialValue, optimalValue, and value.
| void frodo2.algorithms.localSearch.dsa.tests.TestDSA< U extends Addable< U > >.testStrategyC | ( | ) |
Test the strategy C.
References comparison, initialValue, optimalValue, and value.
| void frodo2.algorithms.localSearch.dsa.tests.TestDSA< U extends Addable< U > >.testStrategyE | ( | ) |
Test the strategy E.
References comparison, initialValue, module, optimal, value, and variable.
|
private |
The agent for which the decision strategy is to be tested.
Referenced by setUp().
|
private |
The difference between the optimal utility and the current utility.
Referenced by setUp(), testStrategyA(), testStrategyC(), and testStrategyE().
|
private |
Array for storing the context values.
Referenced by setUp().
|
private |
Array for storing the context variables.
Referenced by setUp().
|
private |
The size of ownDomain.
Referenced by setUp().
|
private |
The initial value of variable.
Referenced by setUp(), testStrategyA(), testStrategyC(), and testStrategyE().
|
private |
|
private |
Maximum number of agents.
Referenced by setUp().
|
private |
Maximum number of binary constraints in the problem.
Referenced by setUp().
|
private |
|
private |
Instance of the module to be tested.
Referenced by setUp(), and testStrategyE().
|
private |
The neighboring variables of variable.
Referenced by setUp().
|
private |
The number of neighbours.
Referenced by setUp().
|
private |
The utility of the optimal assignment.
Referenced by setUp(), and testStrategyE().
|
private |
The optimal value assignment given the context.
Referenced by setUp(), testStrategyA(), and testStrategyC().
|
private |
The utility of the original assignment.
Referenced by setUp().
|
private |
The domain of variable.
Referenced by setUp().
|
private |
The modules parameters.
Referenced by setUp().
|
private |
A random problem used to test.
Referenced by setUp().
|
private |
The queue used to send messages.
Referenced by setUp(), and tearDown().
|
private |
Dummy queue to be used as a sink.
Referenced by setUp(), and tearDown().
|
private |
A list of spaces known by agent.
Referenced by setUp().
|
private |
|
private |
The subproblem belonging to the agent.
Referenced by setUp().
|
private |
|
private |
The final value of the variable.
Referenced by setUp(), testStrategyA(), testStrategyC(), and testStrategyE().
|
private |
The variable for which the decision strategy is to be tested.
Referenced by setUp(), and testStrategyE().