|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
The leaf node of a tree. More...

Public Member Functions | |
| LeafNode () | |
| Empty constructor. | |
| LeafNode (int counter, int[] powersOf2) | |
| A constructor. | |
| LeafNode (int counter, U util, int[] powersOf2) | |
| A constructor. | |
| U | calculateUB (U[] upperBoundsSum, final boolean maximize) |
| Method to calculate the current upper bound. | |
| U | calculateUBTest (U[] upperBoundsSum) |
| Method to calculate the current upper bound. | |
| void | updateLeafWithUB (Good<?, U > g, U utilityDelta, int sender, U[] upperBoundSums, int[] powersOf2, boolean compatibleAssignmentReceived, final boolean maximize) |
| Update both the utility and the UB information in this leaf node. | |
| boolean | utilCandidate (U maxUtil, final boolean maximize) |
| Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U > | |
| LeafNode () | |
| Empty constructor. | |
| void | setUbSum (int sum) |
| U | calculateUB (U[] upperBoundsSum, final boolean maximize) |
| U | calculateUBTest (U[] upperBoundsSum) |
| void | updateLeafNoUB (Good<?, U > g, U utilityDelta, int sender, int[] powersOf2, final boolean maximize) |
| void | setInfeasable (U infeasibleUtil) |
| void | updateLeafWithUB (Good<?, U > g, U utilityDelta, int sender, U[] upperBoundSums, int[] powersOf2, boolean compatibleAssignmentReceived, final boolean maximize) |
| boolean | utilCandidate (U maxUtil, final boolean maximize) |
| boolean | ubCandidate (U maxUB, final boolean maximize) |
| U | getUtil () |
| void | setUtil (U util) |
| Set the utility of this leaf node. | |
| U | getUB () |
| void | setUB (U UB) |
| Set the upper bound on the utility of this leaf node. | |
| boolean | hasUtil () |
| boolean | isUpToDate () |
| void | setUpToDate (boolean upToDate) |
| Set whether the utility is up to date. | |
Public Attributes | |
| boolean | real |
| True if this node is a dummy node, and false otherwise. | |
| Public Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U > | |
| int | counter |
| Number of children that have not yet reported a value for the current assignment. | |
| boolean[] | updateUB |
| for each child, it stores whether a good has been received or not | |
Package Functions | |
| public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L | newInstance (int confirmedCounter, int[] powersOf2) |
| Create a new instance of the leaf node. | |
| public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L | newInstance (int confirmedCounter, U util, int[] powersOf2) |
| Create a new instance of the leaf node. | |
| Package Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U > | |
| public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L | newInstance (int confirmedCounter, int[] powersOf2) |
Additional Inherited Members | |
| Static Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U > | |
| static int | fromBooleanArrayToInt (boolean[] chosen, int[] powersOf2) |
| Given a boolean array, representing a boolean value, this method calculates the corresponding integer value. | |
| Protected Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U > | |
| U | util |
| Contains the sum of the received utilities for this leaf. | |
| U | UB |
| Contains the last upper bound to have been calculated. | |
| boolean | upToDate |
true when the upperbound is still greater than the utility value, and false otherwise. | |
| int | ubSum |
| The index to the sum of all upperbounds. | |
The leaf node of a tree.
| <U> | the type used to represent a utility value |
| frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.LeafNode | ( | ) |
| frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.LeafNode | ( | int | counter, |
| int[] | powersOf2 ) |
A constructor.
| counter | the number of assignments to be received |
| powersOf2 | precomputed powers of 2 |
References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, and real.
| frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.LeafNode | ( | int | counter, |
| U | util, | ||
| int[] | powersOf2 ) |
A constructor.
| counter | the number of assignments to be received |
| util | the already receive utility |
| powersOf2 | precomputed powers of 2 |
References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, real, and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.
| U frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.calculateUB | ( | U[] | upperBoundsSum, |
| final boolean | maximize ) |
Method to calculate the current upper bound.
Note that the UB field is not updated. That should only happen when this method is called from a leaf node!
| upperBoundsSum | A list of all possible sums of the upper bounds |
| maximize | true if we are maximizing utility |
References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, real, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.ubSum, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.upToDate, and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.
Referenced by updateLeafWithUB().
| U frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.calculateUBTest | ( | U[] | upperBoundsSum | ) |
Method to calculate the current upper bound.
Note that the UB field is not updated. That should only happen when this method is called from a leaf node!
| upperBoundsSum | A list of all possible sums of the upper bounds |
References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.ubSum, and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.
|
package |
Create a new instance of the leaf node.
| <L> | the class used for leaf nodes |
| confirmedCounter | the number of children of this leaf node |
| powersOf2 | precomputed powers of 2 |
References LeafNode(), and newInstance().
Referenced by newInstance(), and newInstance().

|
package |
Create a new instance of the leaf node.
| <L> | the class used for leaf nodes |
| confirmedCounter | the number of children of this leaf node |
| util | the utility of the local problem |
| powersOf2 | precomputed powers of 2 |
References LeafNode(), newInstance(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.

| void frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.updateLeafWithUB | ( | Good<?, U > | g, |
| U | utilityDelta, | ||
| int | sender, | ||
| U[] | upperBoundSums, | ||
| int[] | powersOf2, | ||
| boolean | compatibleAssignmentReceived, | ||
| final boolean | maximize ) |
Update both the utility and the UB information in this leaf node.
| g | the good currently being processed |
| utilityDelta | the difference with the previous utility receive from sender for this node |
| sender | the sender of the good |
| upperBoundSums | precomputed sums of upperbounds |
| powersOf2 | precomputed powers of 2 |
| compatibleAssignmentReceived | = goodsReceived.get(sender).containsKey(currentPath.getPartialAssignment(childrenVariables[sender], this.separatorSizePerChild[sender])) |
| maximize | true if we are maximizing utility |
References calculateUB(), frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.fromBooleanArrayToInt(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), real, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.UB, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.ubSum, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.updateUB, and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.

| boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.utilCandidate | ( | U | maxUtil, |
| final boolean | maximize ) |
| maxUtil | the maximal utility found so far |
| maximize | true if we are maximizing utility |
References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.
| boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTree.LeafNode< U extends Addable< U > >.real |
True if this node is a dummy node, and false otherwise.
Referenced by calculateUB(), LeafNode(), LeafNode(), LeafNode(), and updateLeafWithUB().