FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > > Class Template Reference

Unit tests for the Max-Sum algorithm. More...

Inheritance diagram for frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >:

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.

Detailed Description

Unit tests for the Max-Sum algorithm.

Author
Thomas Leaute
Parameters
<V>the type used for variable values
<U>the type used for utility values

Constructor & Destructor Documentation

◆ MaxSumTests()

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.

Parameters
maximizeWhether to maximize utility or minimize cost
classOfUThe class of U
p2The constraint tightness
useTCPWhether to use TCP pipes
acyclicWhether the graph should be acyclic
randomInitWhether to initialize the algorithm with random messages
perturbThe maximum amount of perturbation to add to each variable's unary constraint
synchronousWhether to run in synchronous mode

References acyclic, classOfU, maximize, p2, randomInit, synchronous, and useTCP.

Referenced by suite().

Member Function Documentation

◆ suite()

TestSuite frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.suite ( )
static
Returns
the suite of unit tests
Bug
Max-Sum may not terminate when using TCP pipes because there is not idleness detection
Bug
Max-Sum may not terminate when using TCP pipes because there is not idleness detection

References frodo2.algorithms.test.AllTests.DEFAULT_P2, MaxSumTests(), and suite().

Referenced by suite(), and frodo2.algorithms.test.AllTests.suite().

Here is the call graph for this function:

◆ test()

Member Data Documentation

◆ acyclic

final boolean frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.acyclic
private

Whether the graph should be acyclic.

Referenced by MaxSumTests(), and test().

◆ classOfU

Class<U> frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.classOfU
private

The class of U.

Referenced by MaxSumTests().

◆ maximize

boolean frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.maximize
private

Whether to maximize utility or minimize cost.

Referenced by MaxSumTests(), and test().

◆ maxNbrAgents

final int frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.maxNbrAgents = 20
staticprivate

Maximum number of agents in the test problems.

Referenced by test().

◆ maxNbrEdges

final int frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.maxNbrEdges = 190
staticprivate

Maximum number of edges in the test constraint graphs.

Referenced by test().

◆ maxNbrVars

final int frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.maxNbrVars = 20
staticprivate

Maximum number of variables in the test problems.

Referenced by test().

◆ maxPerturb

final double frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.maxPerturb
private

The maximum amount of perturbation to add to each variable's unary constraint.

◆ p2

final double frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.p2
private

The constraint tightness.

Referenced by MaxSumTests(), and test().

◆ randomInit

final boolean frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.randomInit
private

Whether to initialize the algorithm with random messages.

Referenced by MaxSumTests().

◆ synchronous

final boolean frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.synchronous
private

Whether to run in synchronous mode.

Referenced by MaxSumTests().

◆ useTCP

final boolean frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.useTCP
private

Whether to use TCP pipes.

Referenced by MaxSumTests().


The documentation for this class was generated from the following file: