FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.controller.TestController Class Reference
Inheritance diagram for frodo2.controller.TestController:

Classes

class  ControllerExtension
 An extension of the controller that allows external objects to. More...
class  DaemonExtension
 A daemon with an API to pass the configuration file. More...

Public Member Functions

 TestController (String name)
 Constructor.
 TestController (String name, int maxNbrAgents)
 Constructor.
void testControllerOnLocalProblem () throws Exception
 Tests the controller when it simultaneously functions as a daemon that spawns agents.
void testOmniscientControllerOnDistributedProblem () throws Exception
 This test function generates random graphs, lets the controller/daemon set up the agent structure and tests whether it has been properly set up.
void testNonOmniscientControllerOnDistributedProblem () throws Exception
 Test method for the distributed submode, in which the configuration file is passed to the daemons.

Static Public Member Functions

static TestSuite suite ()

Protected Member Functions

void setUp ()
void tearDown ()

Package Attributes

ControllerExtension control
 The controller.
DaemonExtension daemon
 The daemon.
Document problem
 The problem definition corresponding to the graph.
int timeOut = 10000
 A timeout on how long the test waits for the end.

Private Attributes

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

Static Private Attributes

static String testDir = TestController.class.getResource("testFiles").getFile() + "/"
 Directory containing the test files.

Detailed Description

Author
Brammert Ottens
Thomas Leaute

Constructor & Destructor Documentation

◆ TestController() [1/2]

frodo2.controller.TestController.TestController ( String name)

Constructor.

Parameters
namethe name of the test method

Referenced by suite().

◆ TestController() [2/2]

frodo2.controller.TestController.TestController ( String name,
int maxNbrAgents )

Constructor.

Parameters
namethe name of the test method
maxNbrAgentsthe maximum number of agents

References maxNbrAgents.

Member Function Documentation

◆ setUp()

void frodo2.controller.TestController.setUp ( )
protected
See also
junit.framework.TestCase#setUp()

References frodo2.algorithms.test.AllTests.generateProblem(), frodo2.algorithms.RandGraphFactory.getRandGraph(), maxNbrAgents, maxNbrEdges, maxNbrVars, and problem.

Here is the call graph for this function:

◆ suite()

TestSuite frodo2.controller.TestController.suite ( )
static
Returns
the test suite for this test

References TestController().

Referenced by frodo2.controller.AllTests.suite().

Here is the call graph for this function:

◆ tearDown()

void frodo2.controller.TestController.tearDown ( )
protected
See also
junit.framework.TestCase#tearDown()

References control, daemon, and testDir.

◆ testControllerOnLocalProblem()

void frodo2.controller.TestController.testControllerOnLocalProblem ( ) throws Exception

Tests the controller when it simultaneously functions as a daemon that spawns agents.

Exceptions
Exceptionif an error occurs

References control, problem, testDir, and timeOut.

◆ testNonOmniscientControllerOnDistributedProblem()

void frodo2.controller.TestController.testNonOmniscientControllerOnDistributedProblem ( ) throws Exception

Test method for the distributed submode, in which the configuration file is passed to the daemons.

Exceptions
Exceptionif an error occurs
Todo
Test with more than one agent
Todo
Todo
Test with more than one problem instance in the same experiment

References control, daemon, problem, testDir, and timeOut.

◆ testOmniscientControllerOnDistributedProblem()

void frodo2.controller.TestController.testOmniscientControllerOnDistributedProblem ( ) throws Exception

This test function generates random graphs, lets the controller/daemon set up the agent structure and tests whether it has been properly set up.

Exceptions
Exceptionif an error occurs

References control, daemon, problem, testDir, and timeOut.

Member Data Documentation

◆ control

◆ daemon

DaemonExtension frodo2.controller.TestController.daemon
package

◆ maxNbrAgents

final int frodo2.controller.TestController.maxNbrAgents
private

Maximum number of agents.

Referenced by setUp(), and TestController().

◆ maxNbrEdges

final int frodo2.controller.TestController.maxNbrEdges = 50
private

Maximum number of edges in the random graph.

Referenced by setUp().

◆ maxNbrVars

final int frodo2.controller.TestController.maxNbrVars = 15
private

Maximum number of variables in the random graph.

Note
Must be at least 2.

Referenced by setUp().

◆ problem

Document frodo2.controller.TestController.problem
package

◆ testDir

◆ timeOut

int frodo2.controller.TestController.timeOut = 10000
package

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