|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
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. | |
| U | 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 | |
| U | infeasibleUtil |
| The infeasible utility/cost. | |
Counts the number of optimal solutions in a DCOP.
| <V> | type used for variable values |
| <U> | type used for utility values |
| frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.SolutionCounter | ( | ) |
Default constructor.
References SolutionCounter().
Referenced by SolutionCounter().

| frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.SolutionCounter | ( | Class< U > | utilClass | ) |
Constructor.
| utilClass | the class to use for utilities |
References frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse().

|
private |
Method used to combine the different partial solutions, by recursively walking through the different leafs.
| index | the index of the current leaf in leafs |
| leafs | the list of leafs |
| variablesEncountered | the variables encountered so far |
| currentSolutions | the solutions found so far |
| reportedVariables | for each leaf, the variables it reported |
| reportedValues | for each leaf, the value assignments it reported |
References allSolutions, combineSolutions(), orderedVars, and valuesReported.
Referenced by combineSolutions(), and count().

| int frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.count | ( | Document | problem | ) |
Solves the input problem.
| problem | the problem |
References agentDesc, combineSolutions(), count(), frodo2.algorithms.AgentFactory< V extends Addable< V >, U extends Addable< U > >.end(), frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.getOptUtil(), frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.getReportedValues(), frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.getReportedVariables(), frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.maximize(), optimalUtil, frodo2.algorithms.XCSPparser< V extends Addable< V >, U extends Addable< U > >.parse(), frodo2.algorithms.dpop.count.CountSolutionsUTIL< Val extends Addable< Val >, U extends Addable< U > >.setSilent(), frodo2.algorithms.dpop.count.CountSolutionsVALUE< Val extends Addable< Val >, U extends Addable< U > >.setSilent(), valuesReported, and variablesReported.
Referenced by count(), frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.test(), and frodo2.algorithms.dpop.count.test.TestCountSolutions.testRandom().

|
protected |
Description of the agent to be used.
Referenced by count().
| 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().
|
private |
The infeasible utility/cost.
| U frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.optimalUtil |
The optimal utility.
Referenced by count().
| ArrayList<String> frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.orderedVars |
The ordered variables.
Referenced by combineSolutions().
| 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().
| HashMap<String, String[]> frodo2.algorithms.dpop.count.SolutionCounter< V extends Addable< V >, U extends Addable< U > >.variablesReported |
The reported variables.
Referenced by count().