FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest Class Reference

JUnit test for the class SecureVarElection. More...

Inheritance diagram for frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest:

Public Member Functions

 SecureVarElectionTest (boolean useTCP)
 Constructor that instantiates a test only for the input method.
Public Member Functions inherited from frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< Integer >
 VariableElectionTest (boolean useTCP, boolean useXML, Class< ? extends ScoringHeuristic<?> > heuristic, Class< ? extends ScoringHeuristic<?> > tiebreaking)
 Constructor that instantiates a test only for the input method.
void testRandom () throws IOException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
 Tests the variable election protocol on a random graph.
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
 Keeps track of the output of the leader election protocol sent by each variable.
void setQueue (Queue queue)
 Does nothing in this case.

Static Public Member Functions

static TestSuite suite ()
Static Public Member Functions inherited from frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< Integer >
static TestSuite suite ()

Protected Member Functions

void initiateParamAndListener (XCSPparser< AddableInteger, AddableReal > parser, Class< ? extends ScoringHeuristic<?> > heuristic, Class< ? extends ScoringHeuristic<?> > tiebreaking, int diameter) throws NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
void checkOutputs (Class<?> heuristic, Map< String, Integer > allUniqueIDs)
Protected Member Functions inherited from frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< Integer >
void setUp ()
void tearDown () throws Exception
 Ends all queues.
void checkOutputs (Class<?> heuristic, Map< String, S > allUniqueIDs)
 Checks that the outputs of the module are consistent with the correct outputs for the given heuristic.
void initiateParamAndListener (XCSPparser< AddableInteger, AddableReal > parser, Class< ? extends ScoringHeuristic<?> > heuristic, Class< ? extends ScoringHeuristic<?> > tiebreaking, int diameter) throws NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
 Initiate the parameter and the listener by reflection.
VariableElection<?> getNewInstance (Constructor<?> constr, Object[] args) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< Integer >
Map< String, MessageLEoutput< S > > outputs
 For each variable, the output of VariableElection.
int remainingOutputs
 Current number of variables that have not yet sent their output of the leader election protocol.
final ReentrantLock finished_lock
 Used to make the test thread wait.
final Condition finished
 Used to wake up the test thread when all agents have finished.
Map< String, Queuequeues
 List of queues, indexed by agent name.
RandGraphFactory.Graph graph
 Random graph used to generate a constraint graph.
Map< String, QueueOutputPipeInterfacepipes
 One output pipe used to send messages to each queue, indexed by the queue's agent name.
boolean useTCP
 true whether TCP pipes should be used instead of QueueIOPipes

Detailed Description

JUnit test for the class SecureVarElection.

Constructor & Destructor Documentation

◆ SecureVarElectionTest()

frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest.SecureVarElectionTest ( boolean useTCP)

Constructor that instantiates a test only for the input method.

Parameters
useTCPtrue whether TCP pipes should be used instead of QueueIOPipes

References frodo2.algorithms.varOrdering.election.tests.VariableElectionTest< Integer >.useTCP.

Referenced by suite().

Member Function Documentation

◆ checkOutputs()

void frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest.checkOutputs ( Class<?> heuristic,
Map< String, Integer > allUniqueIDs )
protected

◆ initiateParamAndListener()

void frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest.initiateParamAndListener ( XCSPparser< AddableInteger, AddableReal > parser,
Class< ? extends ScoringHeuristic<?> > heuristic,
Class< ? extends ScoringHeuristic<?> > tiebreaking,
int diameter ) throws NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
protected

◆ suite()

TestSuite frodo2.algorithms.varOrdering.election.tests.SecureVarElectionTest.suite ( )
static
Returns
the test suite for this test

References SecureVarElectionTest().

Referenced by frodo2.algorithms.varOrdering.election.tests.AllTestsElection.suite().

Here is the call graph for this function:

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