FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener Class Reference

The listener that checks the messages sent by the ExpectedUTIL listeners. More...

Inheritance diagram for frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener:

Public Member Functions

 Listener (boolean useTCP, Element parameters) throws Exception
 Constructor that tests ExpectedUTIL on a random DFS.
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)

Protected Member Functions

void setUpPrelimModules (Queue queue, DCOPProblemInterface< AddableInteger, AddableReal > subProblem)
void checkOutput ()

Private Attributes

HashMap< String, UtilitySolutionSpace< AddableInteger, AddableReal > > sentUtils = new HashMap< String, UtilitySolutionSpace<AddableInteger, AddableReal> > ()
 For each variable, the utility space it sent to its parent.
HashMap< String, UtilitySolutionSpace< AddableInteger, AddableReal > > joins = new HashMap< String, UtilitySolutionSpace<AddableInteger, AddableReal> > ()
 For each variable, the join of all received utility spaces.
HashMap< String[], BasicUtilitySolutionSpace< AddableInteger, ArrayList< AddableInteger > > > condOptAssignments
 For arrays of variables, their chosen conditional optimal assignments.
HashMap< String, HashSet< String > > whereToProject = new HashMap< String, HashSet<String> > ()
 For each decision variable, the random variables it is responsible for projecting out.

Detailed Description

The listener that checks the messages sent by the ExpectedUTIL listeners.

Constructor & Destructor Documentation

◆ Listener()

frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.Listener ( boolean useTCP,
Element parameters ) throws Exception

Constructor that tests ExpectedUTIL on a random DFS.

Parameters
useTCPtrue whether TCP pipes should be used instead of QueueIOPipes
parametersthe parameters for the module under test
Exceptions
Exceptionif an error occurs

References frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.graph, frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.parameters, and frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.useTCP.

Member Function Documentation

◆ checkOutput()

void frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput ( )
protected
See also
frodo2.algorithms.dpop.test.UTILpropagationTest.Listener.checkOutput()
Todo
Check output also when sampling
Bug
Sometimes fails
Bug
Rarely fails with -infinity != -infinity
Bug
Rarely fails

References frodo2.solutionSpaces.AddableInteger.add(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.ProjOutput< V extends Addable< V >, U extends Addable< U > >.assignments, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.blindProject(), frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.changeVariablesOrder(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.changeVariablesOrder(), frodo2.solutionSpaces.AddableReal.compareTo(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.compose(), frodo2.solutionSpaces.AddableInteger.equals(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.expectation(), frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.SparseIterator< V, U >.getCurrentUtility(), frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.getUtility(), frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.getVariables(), frodo2.solutionSpaces.SolutionSpace< V extends Addable< V > >.Iterator< V >.hasNext(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.iterator(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.maximize, frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.method, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.multiply(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.nbrSamples, frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.SparseIterator< V, U >.nextUtility(), frodo2.algorithms.dpop.test.UTILpropagationTest< U extends Addable< U > >.parameters, frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.project(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.resolve(), and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.ProjOutput< V extends Addable< V >, U extends Addable< U > >.space.

Here is the call graph for this function:

◆ getMsgTypes()

◆ notifyIn()

void frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.notifyIn ( Message msg)
See also
frodo2.algorithms.dpop.test.UTILpropagationTest.Listener.notifyIn(Message)

References frodo2.communication.MessageType.equals(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.SolutionMessage< Val extends Addable< Val > >.getCondOptAssignments(), frodo2.algorithms.dpop.UTILmsg< Val extends Addable< Val >, U extends Addable< U > >.getDestination(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RandVarsProjMsg.getRandVars(), frodo2.algorithms.dpop.UTILmsg< Val extends Addable< Val >, U extends Addable< U > >.getSender(), frodo2.algorithms.dpop.UTILmsg< Val extends Addable< Val >, U extends Addable< U > >.getSpace(), frodo2.communication.Message.getType(), frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RandVarsProjMsg.getVariable(), frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.SolutionMessage< Val extends Addable< Val > >.getVariables(), frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.join(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.nbrSamples, frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.OUTPUT_MSG_TYPE, frodo2.algorithms.dpop.stochastic.SamplingPhase< V extends Addable< V >, U extends Addable< U > >.RAND_VARS_PROJ_MSG_TYPE, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTIL_MSG_TYPE.

Here is the call graph for this function:

◆ setUpPrelimModules()

void frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.setUpPrelimModules ( Queue queue,
DCOPProblemInterface< AddableInteger, AddableReal > subProblem )
protected
See also
frodo2.algorithms.dpop.test.UTILpropagationTest.Listener#setUpPrelimModules(Queue, DCOPProblemInterface)

References frodo2.communication.Queue.addIncomingMessagePolicy(), and frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.nbrSamples.

Here is the call graph for this function:

Member Data Documentation

◆ condOptAssignments

HashMap< String[], BasicUtilitySolutionSpace < AddableInteger, ArrayList <AddableInteger> > > frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.condOptAssignments
private
Initial value:
=
new HashMap< String[], BasicUtilitySolutionSpace < AddableInteger, ArrayList <AddableInteger> > > ()

For arrays of variables, their chosen conditional optimal assignments.

◆ joins

HashMap< String, UtilitySolutionSpace<AddableInteger, AddableReal> > frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.joins = new HashMap< String, UtilitySolutionSpace<AddableInteger, AddableReal> > ()
private

For each variable, the join of all received utility spaces.

◆ sentUtils

HashMap< String, UtilitySolutionSpace<AddableInteger, AddableReal> > frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.sentUtils = new HashMap< String, UtilitySolutionSpace<AddableInteger, AddableReal> > ()
private

For each variable, the utility space it sent to its parent.

◆ whereToProject

HashMap< String, HashSet<String> > frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.whereToProject = new HashMap< String, HashSet<String> > ()
private

For each decision variable, the random variables it is responsible for projecting out.


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