|
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. | |
| 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 Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > | |
| Node () | |
| A constructor. | |
| Node< U > | makeDummyCopy () |
| Method used when creating a dummy part of the tree. | |
| boolean | isAlive () |
| void | setAlive (boolean alive) |
| Change the alive status of this node. | |
| boolean | utilCandidate (U maxUtil, final boolean maximize) |
| boolean | ubCandidate (U maxUB, boolean maximize) |
| U | getUtil () |
| U | getUB () |
| boolean | hasUtil () |
| boolean | hasUB () |
| boolean | recalculateUtil () |
Static Public Member Functions | |
| static int | fromBooleanArrayToInt (boolean[] chosen, int[] powersOf2) |
| Given a boolean array, representing a boolean value, this method calculates the corresponding integer value. | |
Public Attributes | |
| 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 | |
| Public Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > | |
| boolean | alive |
| False if this node leads to a path that has been deleted. | |
Protected Attributes | |
| 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. | |
Package Functions | |
| public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L | newInstance (int confirmedCounter, int[] powersOf2) |
| public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L | newInstance (int confirmedCounter, U util, int[] powersOf2) |
| Package Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > | |
| public< L extends Node< U > > L | newInstance (int confirmedCounter, int[] powersOf2) |
| Create a new instance of the leaf node. | |
The leaf node of a tree.
| <U> | the type used to represent a utility value |
| frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.LeafNode | ( | ) |
Empty constructor.
Referenced by newInstance(), and newInstance().
| frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.LeafNode | ( | int | counter, |
| int[] | powersOf2 ) |
| frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.LeafNode | ( | int | counter, |
| U | util, | ||
| int[] | powersOf2 ) |
| U frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.calculateUB | ( | U[] | upperBoundsSum, |
| final boolean | maximize ) |
| upperBoundsSum | precomputed sums of the upperbounds |
| maximize | when true we are maximizing, when false we are minimizing |
References counter, ubSum, upToDate, and util.
Referenced by frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.setChildDone(), and updateLeafWithUB().
| U frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.calculateUBTest | ( | U[] | upperBoundsSum | ) |
|
static |
Given a boolean array, representing a boolean value, this method calculates the corresponding integer value.
| chosen | the boolean value represented as an array |
| powersOf2 | TODO |
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.createLeaf(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.createLeaf(), frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.createLeaf(), frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.createLeaf(), updateLeafNoUB(), and updateLeafWithUB().
| U frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.getUB | ( | ) |
References UB.
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.checkLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.setChildDone().
| U frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.getUtil | ( | ) |
References util.
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.checkLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.Utilexists().
| boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.hasUtil | ( | ) |
References util.
| boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.isUpToDate | ( | ) |
true when the utility is nor greate than the upper bound, and false otherwise
|
package |
References LeafNode(), newInstance(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U >.Node().
Referenced by newInstance(), and newInstance().

|
package |
References LeafNode(), newInstance(), frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U >.Node(), and util.

| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.setInfeasable | ( | U | infeasibleUtil | ) |
| infeasibleUtil | the infeasible utility |
References util.
| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.setUB | ( | U | UB | ) |
Set the upper bound on the utility of this leaf node.
| UB | the new upper bound |
References UB.
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), and frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf().
| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.setUbSum | ( | int | sum | ) |
| sum | the upper bound sum |
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), and frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf().
| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.setUpToDate | ( | boolean | upToDate | ) |
Set whether the utility is up to date.
| upToDate | true when the utility is up to date, and false otherwise |
References upToDate.
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), and frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf().
| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.setUtil | ( | U | util | ) |
Set the utility of this leaf node.
| util | the new utility value |
References util.
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), and frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf().
| boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.ubCandidate | ( | U | maxUB, |
| final boolean | maximize ) |
| maxUB | the maximal upper bound found so far |
| maximize | true if we are maximizing utility |
References UB.
| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.updateLeafNoUB | ( | Good<?, U > | g, |
| U | utilityDelta, | ||
| int | sender, | ||
| int[] | powersOf2, | ||
| final boolean | maximize ) |
| g | the good that initiated the update |
| utilityDelta | the difference between the reported util and the previous util |
| sender | the sender of the good |
| powersOf2 | precomputed powers of 2 |
| maximize | when true we are maximizing, when false we are minimizing |
References counter, fromBooleanArrayToInt(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), ubSum, updateUB, and util.

| void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.updateLeafWithUB | ( | Good<?, U > | g, |
| U | utilityDelta, | ||
| int | sender, | ||
| U[] | upperBoundSums, | ||
| int[] | powersOf2, | ||
| boolean | compatibleAssignmentReceived, | ||
| final boolean | maximize ) |
| g | the good that initiated the update |
| utilityDelta | the difference between the reported util and the previous util |
| sender | the sender of the good |
| upperBoundSums | the sums of the upperbounds |
| powersOf2 | precomputed powers of 2 |
| compatibleAssignmentReceived | true when an assignment compatible to this assignment has been received |
| maximize | when true we are maximizing, when false we are minimizing |
References calculateUB(), counter, fromBooleanArrayToInt(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), UB, ubSum, updateUB, and util.

| boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.utilCandidate | ( | U | maxUtil, |
| final boolean | maximize ) |
References util.
| int frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.counter |
Number of children that have not yet reported a value for the current assignment.
Referenced by calculateUB(), calculateUBTest(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), LeafNode(), LeafNode(), updateLeafNoUB(), and updateLeafWithUB().
|
protected |
Contains the last upper bound to have been calculated.
Referenced by getUB(), LeafNode(), setUB(), ubCandidate(), and updateLeafWithUB().
|
protected |
The index to the sum of all upperbounds.
Referenced by calculateUB(), calculateUBTest(), LeafNode(), LeafNode(), updateLeafNoUB(), and updateLeafWithUB().
| boolean [] frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U extends Addable< U > >.updateUB |
for each child, it stores whether a good has been received or not
Referenced by frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf(), LeafNode(), LeafNode(), updateLeafNoUB(), and updateLeafWithUB().
|
protected |
true when the upperbound is still greater than the utility value, and false otherwise.
This can occur when the UB is -infinity
Referenced by calculateUB(), LeafNode(), LeafNode(), and setUpToDate().
|
protected |
Contains the sum of the received utilities for this leaf.
Used for recalculating the upper bound
Referenced by calculateUB(), calculateUBTest(), getUtil(), hasUtil(), LeafNode(), newInstance(), setInfeasable(), setUtil(), updateLeafNoUB(), updateLeafWithUB(), and utilCandidate().