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

JUnit test for the class ParamVALUE. More...

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

Classes

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

Public Member Functions

 ParamVALUEtest (boolean useTCP, boolean useXML, Class< U > utilClass)
 Constructor.
Public Member Functions inherited from frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >
 VALUEpropagationTest (boolean useTCP, boolean useXML, Class< U > utilClass)
 Constructor.
void test () throws Exception
 Tests the UTIL and VALUE propagation protocols on a random graph.

Static Public Member Functions

static TestSuite suite ()

Protected Member Functions

void setUp ()
void tearDown () throws Exception
Listener newListenerInstance (boolean useTCP, boolean useXML) throws Exception

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.
Map< String[], BasicUtilitySolutionSpace< AddableInteger, ArrayList< AddableInteger > > > optAssignments
 The optimal assignment to variables, conditioned on the values of the parameters.

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >
Map< String, Queuequeues = new HashMap<String, Queue> ()
 List of queues, indexed by agent name.
RandGraphFactory.Graph graph
 Random graph used to generate a constraint graph.
Map< String, DFSview< AddableInteger, U > > dfs
 The DFS corresponding to the random graph.
boolean maximize
 Whether we should maximize or minimize.
Integer nbrMsgsRemaining
 The number of output messages remaining to be received from the UTIL propagation protocol.
final ReentrantLock finished_lock = new ReentrantLock ()
 Used to make the test thread wait.
final Condition finished = finished_lock.newCondition()
 Used to wake up the test thread when all agents have finished.

Detailed Description

JUnit test for the class ParamVALUE.

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

Constructor & Destructor Documentation

◆ ParamVALUEtest()

frodo2.algorithms.dpop.param.test.ParamVALUEtest< U extends Addable< U > >.ParamVALUEtest ( 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.VALUEpropagationTest< U extends Addable< U > >.useTCP, frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.useXML, and frodo2.algorithms.dpop.test.VALUEpropagationTest< U extends Addable< U > >.utilClass.

Referenced by suite().

Member Function Documentation

◆ newListenerInstance()

◆ setUp()

◆ suite()

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

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

References ParamVALUEtest().

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

Here is the call graph for this function:

◆ tearDown()

Member Data Documentation

◆ maxNbrAgents

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

Maximum number of agents.

Referenced by setUp().

◆ maxNbrEdges

final int frodo2.algorithms.dpop.param.test.ParamVALUEtest< 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.ParamVALUEtest< U extends Addable< U > >.maxNbrVars = 5
private

Maximum number of variables in the random graph.

Note
Must be at least 2.

Referenced by setUp().

◆ optAssignments

Map< String[], BasicUtilitySolutionSpace<AddableInteger, ArrayList<AddableInteger> > > frodo2.algorithms.dpop.param.test.ParamVALUEtest< U extends Addable< U > >.optAssignments
private

The optimal assignment to variables, conditioned on the values of the parameters.

Referenced by setUp(), and frodo2.algorithms.dpop.param.test.ParamVALUEtest< U extends Addable< U > >.Listener.simulateUTILslice().


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