FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > > Class Template Reference

JUnit test for JaCoPutilSpace. More...

Inheritance diagram for frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >:

Classes

enum  Algorithm
 The different algorithms to be tested. More...

Public Member Functions

 JaCoPtests (String name, Algorithm algorithm, String agentDescFile, Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass, Class< V > classOfValuations, boolean useTCP, boolean maximize)
 Constructor.
 JaCoPtests (String name, Algorithm algorithm, String agentDescFile, Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass, Class< V > classOfValuations, boolean useTCP, boolean maximize, File probFile)
 Constructor that takes in a File.
void setUp () throws Exception
void testProblemFromRepository () throws Exception
 Tests on this.probFile.
void testRandomExtensionalProblem () throws Exception
 Tests on a random problem in extension.

Static Public Member Functions

static TestSuite suite ()

Protected Member Functions

void tearDown () throws Exception

Private Member Functions

void addRandomOwners (Document problemDoc, int maxAgent)
 Add a random owner to variables if they do not have already one.

Static Private Member Functions

static< V extends Addable< V > TestSuite createSuite (Algorithm algorithm, Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass, Class< V > classOfValuations, String agentDescFile)

Private Attributes

Document agentDescDoc
 The description file of the agent.
Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass
 The solver used.
boolean useTCP
 If we use the TCP pipes or not.
boolean maximize
 The optimization type of random problems.
File probFile
 The problem file.
Algorithm currentAlgorithm
 The algorithm being tested.
final Class< V > classOfValuations
 The class of valuations.

Detailed Description

JUnit test for JaCoPutilSpace.

Author
Arnaud Jutzeler, Thomas Leaute
Parameters
<V>class of valuations

Constructor & Destructor Documentation

◆ JaCoPtests() [1/2]

frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.JaCoPtests ( String name,
Algorithm algorithm,
String agentDescFile,
Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass,
Class< V > classOfValuations,
boolean useTCP,
boolean maximize )

Constructor.

Parameters
namename of the test method
algorithmthe algorithm tested
agentDescFilethe description file of the agent
solverClassthe class of the tested solver
classOfValuationsthe class of valuations
useTCPwhether we test with TCP pipes or not
maximizethe optimization type of random problems

References classOfValuations, maximize, solverClass, and useTCP.

Referenced by createSuite().

◆ JaCoPtests() [2/2]

frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.JaCoPtests ( String name,
Algorithm algorithm,
String agentDescFile,
Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass,
Class< V > classOfValuations,
boolean useTCP,
boolean maximize,
File probFile )

Constructor that takes in a File.

Parameters
namename of the test method
algorithmthe algorithm tested
agentDescFilethe description file of the agent
solverClassthe class of the tested solver
classOfValuationsthe class of valuations
useTCPwhether we test with TCP pipes or not
maximizethe optimization type of random problems
probFilethe problem file

References classOfValuations, maximize, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), probFile, solverClass, and useTCP.

Here is the call graph for this function:

Member Function Documentation

◆ addRandomOwners()

void frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.addRandomOwners ( Document problemDoc,
int maxAgent )
private

Add a random owner to variables if they do not have already one.

Parameters
problemDocthe description file of the problem
maxAgentthe maximum number of possible agents

Referenced by testProblemFromRepository().

◆ createSuite()

static< V extends Addable< V > TestSuite frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.createSuite ( Algorithm algorithm,
Class<? extends AbstractDCOPsolver< AddableInteger, V, ?> > solverClass,
Class< V > classOfValuations,
String agentDescFile )
staticprivate
Parameters
algorithmthe name of the tested algorithm
solverClassthe class of the solver corresponding to the tested algorithm
classOfValuationsthe class of valuations
agentDescFilethe agent description file that use the JaCoPxcspParser and the tested algorithm
<V>the class used for valuations
Returns
the testSuite containing the tests with every combination of parameters: minimization/maximization, with/without TCP pipes, on random extensional/intensional/global constrained problems
Todo
create a real set of test problems

References frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.ADOPT, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.AFB, classOfValuations, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.DPOP, JaCoPtests(), frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MB_DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MPC_DisCSP4, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MPC_DisWCSP4, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.P2_DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.P3halves_DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.P_DPOP, probFile, and solverClass.

Referenced by suite().

Here is the call graph for this function:

◆ setUp()

void frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.setUp ( ) throws Exception
See also
junit.framework.TestCase#setUp()

◆ suite()

TestSuite frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.suite ( )
static
Returns
the test suite
Bug
MPC-DisCSP4 occasionally fails tests
Bug
MPC-DisWCSP4 occasionally fails tests

References frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.ADOPT, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.AFB, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.ASODPOP, createSuite(), frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.DSA, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MAXSUM, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MB_DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MGM, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MGM2, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MPC_DisCSP4, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.MPC_DisWCSP4, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.ODPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.P2_DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.P3halves_DPOP, frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.P_DPOP, suite(), and frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.Algorithm.SYNCHBB.

Referenced by frodo2.solutionSpaces.JaCoP.tests.AllTestsJaCoP.suite(), and suite().

Here is the call graph for this function:

◆ tearDown()

void frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.tearDown ( ) throws Exception
protected
See also
junit.framework.TestCase#tearDown()

◆ testProblemFromRepository()

◆ testRandomExtensionalProblem()

Member Data Documentation

◆ agentDescDoc

Document frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.agentDescDoc
private

The description file of the agent.

◆ classOfValuations

final Class<V> frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.classOfValuations
private

The class of valuations.

Referenced by createSuite(), JaCoPtests(), and JaCoPtests().

◆ currentAlgorithm

Algorithm frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.currentAlgorithm
private

The algorithm being tested.

Referenced by testProblemFromRepository(), and testRandomExtensionalProblem().

◆ maximize

boolean frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.maximize
private

The optimization type of random problems.

Referenced by JaCoPtests(), JaCoPtests(), testProblemFromRepository(), and testRandomExtensionalProblem().

◆ probFile

File frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.probFile
private

The problem file.

Referenced by createSuite(), and JaCoPtests().

◆ solverClass

◆ useTCP

boolean frodo2.solutionSpaces.JaCoP.tests.JaCoPtests< V extends Addable< V > >.useTCP
private

If we use the TCP pipes or not.

Referenced by JaCoPtests(), and JaCoPtests().


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