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

Unit tests for Robust-E[DPOP]. More...

Inheritance diagram for frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >:

Public Member Functions

 Robust_E_DPOPagentTest (String agentFile, String whereToSample, String whereToProject, Method method, boolean useTCP, boolean useCentralMailer, int nbrSamples, Class< V > domClass)
 Constructor.
void setUp () throws Exception
Public Member Functions inherited from frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >
 E_DPOPagentTest (String whereToSample, String whereToProject, String method, boolean useTCP, boolean useCentralMailer, int nbrSamples, MessageType startMsgType, Class< V > domClass)
 Creates a JUnit test case corresponding to the input method.
Public Member Functions inherited from frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >
 DPOPagentTest (boolean useXCSP, boolean useTCP, boolean useCentralMailer, boolean useDelay, Class< V > domClass, Class< U > utilClass)
 Creates a JUnit test case corresponding to the input method.
 DPOPagentTest (boolean useXCSP, boolean swap, boolean minNCCCs, boolean countNCCCs, boolean ignoreHypercubeNCCCs)
 Constructor.
 DPOPagentTest (boolean useXCSP, boolean swap, boolean minNCCCs, boolean countNCCCs, boolean ignoreHypercubeNCCCs, String dpopPath)
 Constructor.
 DPOPagentTest (Class<? extends XCSPparser< V, U > > parserClass)
 Constructor for a test with a subsolver.
 DPOPagentTest (boolean useXCSP, boolean useTCP, boolean useCentralMailer, boolean useDelay, Class< V > domClass, Class< U > utilClass, MessageType startMsgType)
 Creates a JUnit test case corresponding to the input method.
 DPOPagentTest (boolean useXCSP, boolean useTCP, boolean useCentralMailer, boolean useDelay, Class< V > domClass, Class< U > utilClass, MessageType startMsgType, Class< ? extends XCSPparser< V, U > > parserClass, boolean swap, boolean minNCCCs, boolean countNCCCs, boolean measureMsgs, boolean ignoreHypercubeNCCCs)
 Creates a JUnit test case corresponding to the input method.
void testRandom () throws Exception
 Tests the DPOPagent on a random problem.
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
void setQueue (Queue queue)
 Does nothing.
Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T >
default void notifyIn (Message msg, Object toAgent)
 Notifies the listener of an incoming message.

Static Public Member Functions

static TestSuite suite ()

Protected Member Functions

void checkOutput ()
Protected Member Functions inherited from frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >
void setStartMsgType (MessageType startMsgType) throws JDOMException
 Sets the type of the start message for all modules.
void tearDown () throws Exception

Private Attributes

final int maxNbrVars = 6
 Maximum number of variables in the problem.
final int maxNbrEdges = 25
 Maximum number of binary constraints in the problem.
final int maxNbrAgents = 6
 Maximum number of agents.
final String agentFile
 The path to the agent configuration file.
final Method method
 The method to use.

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >
int nbrSamples
 The number of samples.
String whereToSample
 Either "AtRoots", "AtLCAs" or "AtLeaves".
String whereToProject
 Either "roots", "lcas" or "leaves".
Protected Attributes inherited from frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >
Document agentConfig
 The agent configuration file.
Queue queue
 The queue used to listen to the agents.
Map< Object, QueueOutputPipeInterfacepipes
 For each agent, the output pipe to it.
RandGraphFactory.Graph graph
 Random graph used to generate a constraint graph.
int nbrMsgsReceived
 Used to track the number of various types of messages received from the agents.
int nbrAgentsFinished
 Number of agents finished.
boolean useCentralMailer = false
 true if the algorithm should be tested with the central mailer
Document problemDoc
 The XCSP random problem file.
DCOPProblemInterface< V, U > problem
 The problem.
Class< V > domClass
 The class used for variable values.
Class< U > utilClass
 The class used for utility values.
UTILpropagation< V, U > utilModule
 The module listening for the optimal utility to the problem.
SolutionCollector< V, U > solCollector
 The module listening for the optimal assignment to the problem.
boolean useXCSP
 Whether to use XCSP.
MessageType startMsgType
 The type of the start message.
boolean countNCCCs
 Whether to count NCCCs.
boolean maximize = true
 Whether we should maximize or minimize.
CentralMailer mailman
 The CentralMailer.
boolean aggregate = false
 true when the weighted sum hypercube should be tested

Detailed Description

Unit tests for Robust-E[DPOP].

Parameters
<V>the type used for variable values
Author
Thomas Leaute
Bug
There seem to be interferences between consecutive tests, producing timeouts, "Non-monotone problem" AssertionErrors and "address already in use" errors

Constructor & Destructor Documentation

◆ Robust_E_DPOPagentTest()

frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.Robust_E_DPOPagentTest ( String agentFile,
String whereToSample,
String whereToProject,
Method method,
boolean useTCP,
boolean useCentralMailer,
int nbrSamples,
Class< V > domClass )

Constructor.

Parameters
agentFilethe path to the agent configuration file
whereToSampleeither "AtRoots", "AtLCAs" or "AtLeaves"
whereToProjecteither "roots", "lcas" or "leaves"
methodthe projection method for random variables
useTCPwhether TCP pipes should be used for communication between agents
useCentralMailertrue when the central mailer should be used
nbrSamplesthe desired number of samples; if zero, no sampling is performed
domClassthe class used for variable values

References agentFile, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.domClass, method, frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.nbrSamples, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.useCentralMailer, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.useTCP, frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.whereToProject, and frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.whereToSample.

Referenced by suite().

Member Function Documentation

◆ checkOutput()

◆ setUp()

void frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.setUp ( ) throws Exception
See also
E_DPOPagentTest.setUp()

Reimplemented from frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.

References frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.agentConfig, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.CONSENSUS_ALL_SOLS, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.domClass, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.EXPECTATION_MONOTONE, frodo2.algorithms.test.AllTests.generateProblem(), frodo2.algorithms.RandGraphFactory.getNiceRandGraph(), frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.graph, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.mailman, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.maximize, maxNbrAgents, maxNbrEdges, maxNbrVars, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.nbrAgentsFinished, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.nbrMsgsReceived, frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.nbrSamples, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.pipes, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.problem, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.problemDoc, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.queue, frodo2.algorithms.dpop.stochastic.ExpectedUTIL< Val extends Addable< Val >, U extends Addable< U > >.Method.ROBUST, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.setDomClass(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.setUtilClass(), frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.startMsgType, frodo2.algorithms.AgentInterface< V extends Addable< V > >.STATS_MONITOR, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.useCentralMailer, frodo2.algorithms.dpop.test.DPOPagentTest< V extends Addable< V >, U extends Addable< U > >.utilModule, frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.whereToProject, and frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.whereToSample.

Here is the call graph for this function:

◆ suite()

Member Data Documentation

◆ agentFile

final String frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.agentFile
private

The path to the agent configuration file.

Referenced by Robust_E_DPOPagentTest().

◆ maxNbrAgents

final int frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.maxNbrAgents = 6
private

Maximum number of agents.

Referenced by setUp().

◆ maxNbrEdges

final int frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.maxNbrEdges = 25
private

Maximum number of binary constraints in the problem.

Referenced by setUp().

◆ maxNbrVars

final int frodo2.algorithms.dpop.stochastic.robust.test.Robust_E_DPOPagentTest< V extends Addable< V > >.maxNbrVars = 6
private

Maximum number of variables in the problem.

Note
Must be at least 2.

Referenced by setUp().

◆ method

The method to use.

Referenced by Robust_E_DPOPagentTest().


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