FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > > Class Template Reference

Counts the number of optimal solutions in a DCOP. More...

Public Member Functions

 SolutionCounter ()
 Default constructor.
 SolutionCounter (Class< U > utilClass)
 Constructor.
int count (Document problem)
 Solves the input problem.

Public Attributes

HashMap< String, String[]> variablesReported
 The reported variables.
HashMap< String, ArrayList< V[]> > valuesReported
 The reported values.
optimalUtil
 The optimal utility.
ArrayList< String > orderedVars
 The ordered variables.
ArrayList< V[]> allSolutions
 A list of all possible solutions.

Protected Attributes

Document agentDesc
 Description of the agent to be used.

Private Member Functions

int combineSolutions (int index, String[] leafs, ArrayList< String > variablesEncountered, ArrayList< V[]> currentSolutions, HashMap< String, String[]> reportedVariables, HashMap< String, ArrayList< V[]> > reportedValues)
 Method used to combine the different partial solutions, by recursively walking through the different leafs.

Private Attributes

infeasibleUtil
 The infeasible utility/cost.

Detailed Description

Counts the number of optimal solutions in a DCOP.

Author
Brammert Ottens
Parameters
<V>type used for variable values
<U>type used for utility values

Constructor & Destructor Documentation

◆ SolutionCounter() [1/2]

Default constructor.

References SolutionCounter().

Referenced by SolutionCounter().

Here is the call graph for this function:

◆ SolutionCounter() [2/2]

frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.SolutionCounter ( Class< U > utilClass)

Constructor.

Parameters
utilClassthe class to use for utilities

References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse().

Here is the call graph for this function:

Member Function Documentation

◆ combineSolutions()

int frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.combineSolutions ( int index,
String[] leafs,
ArrayList< String > variablesEncountered,
ArrayList< V[]> currentSolutions,
HashMap< String, String[]> reportedVariables,
HashMap< String, ArrayList< V[]> > reportedValues )
private

Method used to combine the different partial solutions, by recursively walking through the different leafs.

Parameters
indexthe index of the current leaf in leafs
leafsthe list of leafs
variablesEncounteredthe variables encountered so far
currentSolutionsthe solutions found so far
reportedVariablesfor each leaf, the variables it reported
reportedValuesfor each leaf, the value assignments it reported
Returns
the total number of solutions

References allSolutions, combineSolutions(), orderedVars, and valuesReported.

Referenced by combineSolutions(), and count().

Here is the call graph for this function:

◆ count()

Member Data Documentation

◆ agentDesc

Document frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.agentDesc
protected

Description of the agent to be used.

Referenced by count().

◆ allSolutions

ArrayList<V[]> frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.allSolutions

A list of all possible solutions.

Referenced by combineSolutions().

◆ infeasibleUtil

U frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.infeasibleUtil
private

The infeasible utility/cost.

◆ optimalUtil

U frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.optimalUtil

The optimal utility.

Referenced by count().

◆ orderedVars

ArrayList<String> frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.orderedVars

The ordered variables.

Referenced by combineSolutions().

◆ valuesReported

HashMap<String, ArrayList<V[]> > frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.valuesReported

The reported values.

Referenced by combineSolutions(), and count().

◆ variablesReported

HashMap<String, String[]> frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.variablesReported

The reported variables.

Referenced by count().


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