FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > > Class Template Reference

The leaf node of a tree. More...

Inheritance diagram for frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > >:

Public Member Functions

 LeafNode ()
 Empty constructor.
 LeafNode (int confirmedCounter, int[] powersOf2)
 A constructor.
 LeafNode (int confirmedCounter, U util, int[] powersOf2)
 A constructor.
calculateUB (U[] upperBoundsSum, final boolean maximize)
 Method to calculate the current upper bound.
calculateUBTest (U[] upperBoundsSum)
 Method to calculate the current upper bound.
void updateLeafNoUB (frodo2.algorithms.odpop.Good<?, U > g, U utilityDelta, int sender, int[] powersOf2, final boolean maximize)
 Update the utility information in this leaf node.
void updateLeafWithUB (frodo2.algorithms.odpop.Good<?, U > g, U utilityDelta, int sender, U[] upperBoundSums, int[] powersOf2, boolean compatibleAssignmentReceived, final boolean maximize)
void setInfeasable (U infeasibleUtil)
Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >
 LeafNode ()
 Empty constructor.
void setUbSum (int sum)
calculateUB (U[] upperBoundsSum, final boolean maximize)
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)
getUtil ()
void setUtil (U util)
 Set the utility of this leaf node.
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

confirmedUtil
 The amount of confirmed utility stored in this leaf.
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 >
util
 Contains the sum of the received utilities for this leaf.
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.

Detailed Description

The leaf node of a tree.

Author
brammert
Parameters
<U>the type used to represent a utility value

Constructor & Destructor Documentation

◆ LeafNode() [1/3]

◆ LeafNode() [2/3]

frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > >.LeafNode ( int confirmedCounter,
int[] powersOf2 )

A constructor.

Parameters
confirmedCounterthe number of confirmed assignments to be received
powersOf2precomputed powers of 2

◆ LeafNode() [3/3]

frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > >.LeafNode ( int confirmedCounter,
U util,
int[] powersOf2 )

A constructor.

Parameters
confirmedCounterthe number of confirmed assignments to be received
utilthe already receive utility
powersOf2precomputed powers of 2

References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.util.

Member Function Documentation

◆ calculateUB()

U frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.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!

Parameters
upperBoundsSumA list of all possible sums of the upper bounds
maximizetrue if we are maximizing utility
Returns
the current upper bound

References confirmedUtil, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, 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().

◆ calculateUBTest()

U frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.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!

Parameters
upperBoundsSumA list of all possible sums of the upper bounds
Returns
the current upper bound

References confirmedUtil, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.counter, and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.LeafNode< U >.ubSum.

◆ newInstance() [1/2]

public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > >.newInstance ( int confirmedCounter,
int[] powersOf2 )
package

Create a new instance of the leaf node.

Author
Brammert Ottens, 1 july 2009
Parameters
confirmedCounterthe number of children of this leaf node
powersOf2precomputed powers of 2
Returns
a new leaf node

References LeafNode().

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().

Here is the call graph for this function:

◆ newInstance() [2/2]

public< L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > L frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > >.newInstance ( int confirmedCounter,
U util,
int[] powersOf2 )
package

Create a new instance of the leaf node.

Author
Brammert Ottens, 1 july 2009
Parameters
confirmedCounterthe number of children of this leaf node
utilthe utility of the local problem
powersOf2precomputed powers of 2
Returns
a new leaf node

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

Here is the call graph for this function:

◆ setInfeasable()

◆ updateLeafNoUB()

void frodo2.algorithms.asodpop.goodsTree.innerNodeTreeBinaryDomains.LeafNode< U extends Addable< U > >.updateLeafNoUB ( frodo2.algorithms.odpop.Good<?, U > g,
U utilityDelta,
int sender,
int[] powersOf2,
final boolean maximize )

◆ updateLeafWithUB()

Member Data Documentation

◆ confirmedUtil

The amount of confirmed utility stored in this leaf.

Referenced by calculateUB(), calculateUBTest(), updateLeafNoUB(), and updateLeafWithUB().


The documentation for this class was generated from the following file:
  • src/frodo2/algorithms/asodpop/goodsTree/innerNodeTreeBinaryDomains/LeafNode.java