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

Public Member Functions | |
| MaxSumTests (boolean maximize, Class< U > classOfU, double p2, boolean useTCP, boolean acyclic, boolean randomInit, double perturb, boolean synchronous) | |
| Constructor. | |
| void | test () throws Exception |
| The test method. | |
Static Public Member Functions | |
| static TestSuite | suite () |
Private Attributes | |
| boolean | maximize |
| Whether to maximize utility or minimize cost. | |
| Class< U > | classOfU |
| The class of U. | |
| final double | p2 |
| The constraint tightness. | |
| final boolean | useTCP |
| Whether to use TCP pipes. | |
| final boolean | acyclic |
| Whether the graph should be acyclic. | |
| final boolean | randomInit |
| Whether to initialize the algorithm with random messages. | |
| final double | maxPerturb |
| The maximum amount of perturbation to add to each variable's unary constraint. | |
| final boolean | synchronous |
| Whether to run in synchronous mode. | |
Static Private Attributes | |
| static final int | maxNbrVars = 20 |
| Maximum number of variables in the test problems. | |
| static final int | maxNbrEdges = 190 |
| Maximum number of edges in the test constraint graphs. | |
| static final int | maxNbrAgents = 20 |
| Maximum number of agents in the test problems. | |
Unit tests for the Max-Sum algorithm.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.MaxSumTests | ( | boolean | maximize, |
| Class< U > | classOfU, | ||
| double | p2, | ||
| boolean | useTCP, | ||
| boolean | acyclic, | ||
| boolean | randomInit, | ||
| double | perturb, | ||
| boolean | synchronous ) |
Constructor.
| maximize | Whether to maximize utility or minimize cost |
| classOfU | The class of U |
| p2 | The constraint tightness |
| useTCP | Whether to use TCP pipes |
| acyclic | Whether the graph should be acyclic |
| randomInit | Whether to initialize the algorithm with random messages |
| perturb | The maximum amount of perturbation to add to each variable's unary constraint |
| synchronous | Whether to run in synchronous mode |
References acyclic, classOfU, maximize, p2, randomInit, synchronous, and useTCP.
Referenced by suite().
|
static |
References frodo2.algorithms.test.AllTests.DEFAULT_P2, MaxSumTests(), and suite().
Referenced by suite(), and frodo2.algorithms.test.AllTests.suite().

| void frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.test | ( | ) | throws Exception |
The test method.
| Exception | if an error occurs |
References frodo2.solutionSpaces.AddableInteger.abs(), acyclic, frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.count(), frodo2.algorithms.test.AllTests.createRandProblem(), frodo2.solutionSpaces.AddableInteger.equals(), frodo2.algorithms.test.AllTests.generateProblem(), frodo2.algorithms.RandGraphFactory.getAcyclicGraph(), frodo2.algorithms.Solution< V, U >.getAssignments(), frodo2.solutionSpaces.AddableInteger.getPlusInfinity(), frodo2.algorithms.Solution< V, U >.getUtility(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.getUtility(), maximize, maxNbrAgents, maxNbrEdges, maxNbrVars, p2, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), frodo2.algorithms.AbstractSolver< P extends ProblemInterface< V, U, V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.setUtilClass(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.setUtilClass(), and frodo2.algorithms.AbstractDCOPsolver< V extends Addable< V >, U extends Addable< U >, S extends Solution< V, U >.solve().

|
private |
Whether the graph should be acyclic.
Referenced by MaxSumTests(), and test().
|
private |
The class of U.
Referenced by MaxSumTests().
|
private |
Whether to maximize utility or minimize cost.
Referenced by MaxSumTests(), and test().
|
staticprivate |
Maximum number of agents in the test problems.
Referenced by test().
|
staticprivate |
Maximum number of edges in the test constraint graphs.
Referenced by test().
|
staticprivate |
Maximum number of variables in the test problems.
Referenced by test().
|
private |
The maximum amount of perturbation to add to each variable's unary constraint.
|
private |
The constraint tightness.
Referenced by MaxSumTests(), and test().
|
private |
Whether to initialize the algorithm with random messages.
Referenced by MaxSumTests().
|
private |
Whether to run in synchronous mode.
Referenced by MaxSumTests().
|
private |
Whether to use TCP pipes.
Referenced by MaxSumTests().