FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > > Class Template Reference

JUnit test for the class ParamUTIL. More...

Inheritance diagram for frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >:

Classes

class  Listener
 The listener that checks the messages sent by the ParamUTIL listeners. More...

Public Member Functions

 ParamUTILtest (boolean useTCP, boolean useXML, Class< U > utilClass)
 Constructor.
Public Member Functions inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >
 UTILpropagationTest (String method)
 Constructor that instantiates a test only for the input method.
 UTILpropagationTest (boolean useTCP, boolean useXML, Class< U > utilClass, boolean minNCCCs)
 Constructor.
void testComputeDFS ()
 A test method that tests the test helper method computeDFS().
void test () throws Exception
 Tests the UTIL propagation protocol on a random graph.

Static Public Member Functions

static TestSuite suite ()
Static Public Member Functions inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >
static< V extends Addable< V > U extends Addable< U > Map< String, DFSview< V, U > > computeDFS (Graph graph, DCOPProblemInterface< V, U > problem)
static< V extends Addable< V > U extends Addable< U > Map< String, DFSview< V, U > > computeDFS (Graph graph, DCOPProblemInterface< V, U > problem, boolean withSharedVars)
static< U extends Addable< U > Map< String, UtilitySolutionSpace< AddableInteger, U > > startUTIL (RandGraphFactory.Graph graph, Map< String, DFSview< AddableInteger, U > > dfs, Map< String, Queue > queues, List< ? extends UtilitySolutionSpace< AddableInteger, U > > constraints)
 Sends messages to the queues to initiate the UTIL propagation.

Protected Member Functions

void setUp ()
Listener newListenerInstance (boolean useTCP, boolean useXML, Element parameters) throws Exception
 Creates a new Listener.
Protected Member Functions inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >
void tearDown () throws Exception
 Ends all queues.

Private Attributes

final int maxNbrVars = 5
 Maximum number of variables in the random graph.
final int maxNbrEdges = 25
 Maximum number of edges in the random graph.
final int maxNbrAgents = 5
 Maximum number of agents.

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >
final int maxNbrVars = 10
 Maximum number of variables in the random graph.
final int maxNbrEdges = 40
 Maximum number of edges in the random graph.
final int maxNbrAgents = 10
 Maximum number of agents.
RandGraphFactory.Graph graph
 Random graph used to generate a constraint graph.
Map< String, DFSview< AddableInteger, U > > dfs
 The DFS corresponding to the random graph.
Element parameters
 The parameters for the module under test.
boolean maximize
 Whether we should maximize or minimize.
int sign = 0
 The desired sign for the utilities (if 0, utilities can be either sign).

Detailed Description

JUnit test for the class ParamUTIL.

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

Constructor & Destructor Documentation

◆ ParamUTILtest()

frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.ParamUTILtest ( boolean useTCP,
boolean useXML,
Class< U > utilClass )

Constructor.

Parameters
useTCPwhether to use TCP pipes or shared memory pipes
useXMLwhether to use the XML-based constructor
utilClassthe class to use for utility values

References frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useTCP, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useXML, and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.utilClass.

Referenced by suite().

Member Function Documentation

◆ newListenerInstance()

Listener frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.newListenerInstance ( boolean useTCP,
boolean useXML,
Element parameters ) throws Exception
protected

Creates a new Listener.

Parameters
useTCPtrue whether TCP pipes should be used instead of QueueIOPipes
useXMLwhether we should use the constructor that takes in XML elements or the manual constructor
parametersthe parameters for the module under test
Returns
the new listener
Exceptions
Exceptionif an error occurs

Reimplemented from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.

References frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.parameters, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useTCP, and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useXML.

◆ setUp()

◆ suite()

TestSuite frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.suite ( )
static
Returns
the test suite for this test

Reimplemented from frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.

References ParamUTILtest().

Referenced by frodo2.algorithms.dpop.param.test.AllTestsParamDPOP.suite().

Here is the call graph for this function:

Member Data Documentation

◆ maxNbrAgents

final int frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.maxNbrAgents = 5
private

Maximum number of agents.

Referenced by setUp().

◆ maxNbrEdges

final int frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.maxNbrEdges = 25
private

Maximum number of edges in the random graph.

Referenced by setUp().

◆ maxNbrVars

final int frodo2.algorithms.dpop.param.test.ParamUTILtest< U extends Addable< U > >.maxNbrVars = 5
private

Maximum number of variables in the random graph.

Note
Must be at least 2.

Referenced by setUp().


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