|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Convenience class to store information associated to a specific state. More...
Public Member Functions | |
| SearchNode (int numberOfValues, boolean maximize, boolean ignore_inf) | |
| Constructor. | |
| void | initSampling (UtilitySolutionSpace< V, AddableReal > space, AddableReal infeasibleUtility, String[] contextVariables, V[] context, V[] domain) |
| Finds the first feasible local solution, given the current context. | |
| void | visited (Bound< V > b) |
| Method called whenever the state is sampled. | |
| int | solveLocalProblem (UtilitySolutionSpace< V, AddableReal > space, AddableReal infeasibleUtility, String[] contextVariables, V[] context, V[] domain) |
| Finds the next feasible local solution. | |
| AddableReal | storeCost (int valueIndex, AddableReal costSample, AddableReal infeasibleUtility, final boolean maximize) |
| Stores the sum of the costs reported by the children for this particular state. | |
| double | convergenceBound (int index, double delta) |
With probablity 1- delta the error between the real value and the estimated value lies in. | |
| String | toString (double delta) |
| int | getRandomUnknowLocal (UtilitySolutionSpace< V, AddableReal > space, AddableReal infeasibleUtility, String[] contextVariables, V[] context, V[] domain) |
| Method to randomly pick a value that has not been sampled yet. | |
Public Attributes | |
| AddableReal[] | localCosts |
| For each domain value, the local costs assocated to it. | |
| ArrayList< Integer > | unknowLocalSolutions |
| List of local solutions that have not yet been sampled. | |
| int | nbrFeasibleLocalSolutions |
| Counts the number of local infeasible solutions. | |
| boolean | feasible |
true when the local problem has at least one feasible solution, false otherwise | |
| int | numberOfValues |
| the size of the domain | |
| double[] | averageUtil |
| For each domain value, the average utility received so far. | |
| double[] | bestUtil |
| The best util received so far. | |
| double[] | bounds |
| For each domain value, the current bound. | |
| int[] | actionFrequencies |
| For each posible domain values, the number of times it has been selected. | |
| int | frequencie |
| The number of times the corresponding state has been visited. | |
| double | maxValue |
| The value woth the currently best utility. | |
| double | maxBound |
| The value with the currently highest upper bound. | |
| int | maxValueIndex |
| The index of the currently best value. | |
| int | maxBoundIndex |
| The index of the currently highest bound. | |
Protected Attributes | |
| final boolean | IGNORE_INF |
when true, infeasible values should always be ignored, when false the should be sampled once | |
| boolean | random |
true when not all domain values have been sampled, and false otherwise | |
| int | lastVisited |
| Last value visited. | |
Package Functions | |
| String | arrayToString (Object[] arr, int highlight) |
Method for printing an array, highlighting the entry at highlight. | |
| String | arrayToString (double[] arr, int highlight) |
Method for printing an array, highlighting the entry at highlight. | |
Package Attributes | |
| ArrayList< Integer > | samplingOrder = new ArrayList<Integer>() |
| The sampling order. | |
Convenience class to store information associated to a specific state.
| <V> | type used for domain values |
| frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.SearchNode | ( | int | numberOfValues, |
| boolean | maximize, | ||
| boolean | ignore_inf ) |
Constructor.
| numberOfValues | the domain size of the variable |
| maximize | true when maximizing, and false otherwise |
| ignore_inf | true when infeasible utilities should be totally ignored, false otherwise |
References actionFrequencies, averageUtil, bestUtil, bounds, feasible, IGNORE_INF, localCosts, numberOfValues, and random.
|
package |
Method for printing an array, highlighting the entry at highlight.
| arr | the array to be printed |
| highlight | the index to be highlighted |
|
package |
Method for printing an array, highlighting the entry at highlight.
| arr | the array to be printed |
| highlight | the index to be highlighted |
Referenced by toString().
| double frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.convergenceBound | ( | int | index, |
| double | delta ) |
With probablity 1- delta the error between the real value and the estimated value lies in.
| index | the index of the value for which the bound should be calculated |
| delta | the probability |
References actionFrequencies.
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateMean< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateRegret< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateRegret_Child< V extends Addable< V > >.converged(), and toString().
| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.getRandomUnknowLocal | ( | UtilitySolutionSpace< V, AddableReal > | space, |
| AddableReal | infeasibleUtility, | ||
| String[] | contextVariables, | ||
| V[] | context, | ||
| V[] | domain ) |
Method to randomly pick a value that has not been sampled yet.
| space | the space owned by the variable |
| infeasibleUtility | the infeasible utility |
| contextVariables | the variables in the separator |
| context | the current context (variable assignment) |
| domain | the domain of the variable |
References frodo2.solutionSpaces.AddableReal.add(), and unknowLocalSolutions.
Referenced by initSampling(), and solveLocalProblem().

| void frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.initSampling | ( | UtilitySolutionSpace< V, AddableReal > | space, |
| AddableReal | infeasibleUtility, | ||
| String[] | contextVariables, | ||
| V[] | context, | ||
| V[] | domain ) |
Finds the first feasible local solution, given the current context.
| space | the local space |
| infeasibleUtility | the infeasible utility |
| contextVariables | the context variables |
| context | the context |
| domain | the variable domain |
References getRandomUnknowLocal(), and lastVisited.
Referenced by frodo2.algorithms.duct.Sampling< V extends Addable< V > >.VariableInfo.setContext(), and frodo2.algorithms.duct.SamplingPruning< V extends Addable< V > >.VariableInfo.setContext().

| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.solveLocalProblem | ( | UtilitySolutionSpace< V, AddableReal > | space, |
| AddableReal | infeasibleUtility, | ||
| String[] | contextVariables, | ||
| V[] | context, | ||
| V[] | domain ) |
Finds the next feasible local solution.
| space | the local space |
| infeasibleUtility | the infeasible utility |
| contextVariables | the context variables |
| context | the context |
| domain | the variable domain |
References getRandomUnknowLocal(), lastVisited, and unknowLocalSolutions.

| AddableReal frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.storeCost | ( | int | valueIndex, |
| AddableReal | costSample, | ||
| AddableReal | infeasibleUtility, | ||
| final boolean | maximize ) |
Stores the sum of the costs reported by the children for this particular state.
| valueIndex | the index of the sampled value |
| costSample | the sum of the costs reported by the children |
| infeasibleUtility | utility of infeasible assignments |
| maximize | true when maximizing, and false otherwise |
References actionFrequencies, averageUtil, bestUtil, frodo2.solutionSpaces.AddableReal.doubleValue(), localCosts, and random.

| String frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.toString | ( | double | delta | ) |
| delta | the delta |
References actionFrequencies, arrayToString(), averageUtil, bestUtil, convergenceBound(), frodo2.solutionSpaces.AddableReal.doubleValue(), localCosts, maxBoundIndex, maxValueIndex, numberOfValues, and random.

| void frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.visited | ( | Bound< V > | b | ) |
Method called whenever the state is sampled.
| b | the type of bound used |
References bounds, frequencie, numberOfValues, and frodo2.algorithms.duct.bound.Bound< V extends Addable< V > >.sampleBound().

| int [] frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.actionFrequencies |
For each posible domain values, the number of times it has been selected.
Referenced by convergenceBound(), frodo2.algorithms.duct.bound.BoundInvLog< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundLog< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundLogSize< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundSqrt< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundSqrtSize< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.samplingMethods.SamplingProcedure< V extends Addable< V > >.sampling(), SearchNode(), storeCost(), and toString().
| double [] frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.averageUtil |
For each domain value, the average utility received so far.
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.samplingMethods.SamplingM< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), SearchNode(), storeCost(), and toString().
| double [] frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.bestUtil |
The best util received so far.
Referenced by frodo2.algorithms.duct.termination.TerminateRegret< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateRegret_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.samplingMethods.SamplingB< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingB_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingR< V extends Addable< V > >.processSample(), SearchNode(), storeCost(), and toString().
| double [] frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.bounds |
For each domain value, the current bound.
Referenced by frodo2.algorithms.duct.samplingMethods.SamplingB< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingB_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), SearchNode(), and visited().
| boolean frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.feasible |
true when the local problem has at least one feasible solution, false otherwise
Referenced by frodo2.algorithms.duct.samplingMethods.SamplingB_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingProcedure< V extends Addable< V > >.sampling(), and SearchNode().
| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.frequencie |
The number of times the corresponding state has been visited.
Referenced by frodo2.algorithms.duct.bound.BoundInvLog< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundLog< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundLogSize< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundSqrt< V extends Addable< V > >.sampleBound(), frodo2.algorithms.duct.bound.BoundSqrtSize< V extends Addable< V > >.sampleBound(), and visited().
|
protected |
when true, infeasible values should always be ignored, when false the should be sampled once
Referenced by SearchNode().
|
protected |
Last value visited.
Referenced by initSampling(), and solveLocalProblem().
| AddableReal [] frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.localCosts |
For each domain value, the local costs assocated to it.
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.samplingMethods.SamplingB< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingB_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingR< V extends Addable< V > >.processSample(), SearchNode(), storeCost(), and toString().
| double frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.maxBound |
The value with the currently highest upper bound.
Referenced by frodo2.algorithms.duct.samplingMethods.SamplingB_Child< V extends Addable< V > >.processSample(), and frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample().
| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.maxBoundIndex |
The index of the currently highest bound.
Referenced by frodo2.algorithms.duct.termination.TerminateMean< V extends Addable< V > >.converged(), frodo2.algorithms.duct.samplingMethods.SamplingProcedure< V extends Addable< V > >.sampling(), and toString().
| double frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.maxValue |
The value woth the currently best utility.
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), and frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged().
| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.maxValueIndex |
The index of the currently best value.
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateMean< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateRegret< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateRegret_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.SamplingChild< V extends Addable< V > >.VariableInfo.getFinalBound(), frodo2.algorithms.duct.SamplingChildSearch< V extends Addable< V > >.VariableInfo.getFinalBound(), and toString().
| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.nbrFeasibleLocalSolutions |
Counts the number of local infeasible solutions.
Referenced by frodo2.algorithms.duct.termination.TerminateRegret< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateRegret_Child< V extends Addable< V > >.converged(), and frodo2.algorithms.duct.samplingMethods.SamplingR< V extends Addable< V > >.processSample().
| int frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.numberOfValues |
the size of the domain
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged(), frodo2.algorithms.duct.samplingMethods.SamplingB< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingB_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingR< V extends Addable< V > >.processSample(), SearchNode(), toString(), and visited().
|
protected |
true when not all domain values have been sampled, and false otherwise
Referenced by SearchNode(), storeCost(), and toString().
|
package |
The sampling order.
| ArrayList<Integer> frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.unknowLocalSolutions |
List of local solutions that have not yet been sampled.
Referenced by getRandomUnknowLocal(), and solveLocalProblem().