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

This class is designed to store GOODs received by a node from its children, and is used in the ASODPOP algorithm. More...

Inheritance diagram for frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >:

Public Member Functions

 InnerNodeTree (String ownVariable, Val[] ownVariableDomain, UtilitySolutionSpace< Val, U > space, int numberOfChildren, U zero, U infeasibleUtil, boolean maximize, boolean collectStats)
 A constructor (Only used in testing the datastructure).
 InnerNodeTree (String ownVariable, Val[] ownVariableDomain, List< UtilitySolutionSpace< Val, U > > spaces, int numberOfChildren, U zero, U infeasibleUtil, boolean maximize, boolean collectStats)
 A constructor.
int add (Good< Val, U > g, int sender)
 This method adds a received GOOD to the tree.
Good< Val, U > getAmax ()
 This method obtains the aMax.
void getBestAssignmentForOwnVariable (HashMap< String, Val > assignments)
 Given the assignment of variables in its separator, this method returns the best assignment possible.
Val getRandomValue ()
HashMap< String, Val > getChildValues (HashMap< String, Val > parentContext, int child)
 Given a map that maps variables to values, this method returns the values belonging to the variables in a child's separator.
int getVariableIndex (String variable)
int getSpeculativeUTILcounter ()
int getUTILcounter ()
boolean knowsVariable (String variable)
boolean notEnoughInfo ()
 If there is only one variable in this tree, that means that there is not enough information to send a good.
int getNbrVariables ()
boolean ignoreGood (Good< Val, U > g, int sender)
 If this good reports a value for an already confirmed assignment, the information in the good can be considered outdated and should be ignored.
void ownVariableValue (HashMap< String, Val > currentContext)
 Returns the value of the trees own variable for the current next best assignment.
boolean checkLeaf (LeafNode< U > leaf, IntArrayWrapper currentPath, boolean checkUB, U utility, int sender)
 Method to check that the utility and UB are consistent with the available information.
Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >
boolean add (Good< Val, U > g, int sender)
 Adds a good to the tree.
void setFinalDomainSize (String[] variables, int[] domainSize)
String toString ()
 Method used for debugging purposes.
IntArrayWrapper createIntArrayWrapper (int[] array)
boolean checkLeaf (L leaf, IntArrayWrapper currentPath, boolean checkUB, U utility, int sender)
 Method to check that the utility and UB are consistent with the available information.
Val[][] getDomains ()

Protected Member Functions

int[] addNewVariable (String[] allVariables, HashMap< String, Val > newVariables, int sender)
LeafNode< U > createLeaf (IntArrayWrapper currentPath, boolean real, frodo2.algorithms.odpop.Good< Val, U > g, int child, final boolean withUB)
 Method to create a new leaf node.
LeafNode< U > createLeaf (IntArrayWrapper currentPath, boolean real, final boolean withUB)
 Method to create a new leaf node.
void finalDomainSizeReceiver ()
 logs the reception of a domain size info message
boolean findUnused (int depth, int[] localPath, int[] unusedPath, InnerNode< U, LeafNode< U > > currentNode)
 Looks for parts of the tree where the local solution as defined by localPath can still be used to create new leafs.
void init (int numberOfChildren, U zero)
 Initialize all the variables of the tree.
void nextVariableAssignment (int[] max, int[] position)
 Given a point in the domain space of value combinations between 0 and max, the next point is calculated and position is set to this new point.
void updateLocalProblem ()
Protected Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >
 InnerNodeTree (String ownVariable, Val[] ownVariableDomain, UtilitySolutionSpace< Val, U > space, U zero, int numberOfChildren, U infeasibleUtil, boolean maximize, boolean collectStats)
 A constructor.
void addNewDomainElement (HashMap< String, Val > newValues)
 This method adds a new variable to the data structure.
void addNewDomainElementNoUB (int depth, int horizon, IntArrayWrapper currentPath, int[] partialPath, int[] newDomainPath, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > currentNodeUncast, Good< Val, U > g, U utilityDelta, int sender, boolean onPartialPath, boolean fill)
 This method is called when a new domain element is discovered before the UBs can be calculated.
void addNewDomainElementWithUB (int depth, int horizon, IntArrayWrapper currentPath, int[] partialPath, int[] newDomainPath, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > currentNodeUncast, Good< Val, U > g, U utilityDelta, int sender, boolean onPartialPath, boolean fill)
 This method is called when a new domain element is discovered while the UB is already set.
int[] addNewVariable (String[] allVariables, HashMap< String, Val > newVariables, int sender)
 This method adds new variables to the data structure.
void changeDummyToReal (int depth, InnerNode< U, L > currentNode, boolean change)
 Changes all dummy children of the variables in dummyToReal to real nodes.
InnerNode< U, L > createInnerNode (int numberOfChildren)
createLeaf (IntArrayWrapper currentPath, boolean real, Good< Val, U > g, int child, final boolean withUB)
 Method to create a new leaf node.
frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > createPathNoUB (int depth, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree.IntArrayWrapper currentPathUncast, int[] partialPath, boolean real, Good< Val, U > g, int sender)
 Given a partial path, this method creates the path in the tree.
boolean findUnused (int depth, int[] localPath, InnerNode< U, L > currentNode)
 Check whether the assignment to the local problem, represented by localPath, can still be used somewhere.
getOwnVariableOptions (int[] optimalPath, Val[] assignments)
 Given the assignment of variables in its separator, this method returns the utility for all domain elements of the own variable.
void init (int numberOfChildren, U zero)
 Initialize all the variables of the tree.
initiateBounds (frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > currentNodeUncast, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree.IntArrayWrapper currentPathUncast, int depth, boolean onLocalPath, Good< Val, U > g, int sender)
 This method adds the dummy part to the tree.
void updatePath (int depth, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree.IntArrayWrapper currentPathUncast, int[] partialPath, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > currentNodeUncast, Good< Val, U > g, U utilityDelta, int sender, boolean onLocalPath, final boolean withUB)
 This method walks trough the tree according to the given partial path and finds all leaf nodes that correspond to assignments that are compatible with the good to be added.
boolean upperBoundChangesUtil (frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > node, U UB)
void removeDummies (int removalDepth, boolean[] change, int depth, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > currentNodeUncast)
 Remove the dummy element for the variables marked in change.
boolean hasSupport (IntArrayWrapper currentPath)
 Method to check whether a particular leaf node has support, i.e.
boolean checkTree (int depth, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L > currentNodeUncast, frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNodeTree.IntArrayWrapper currentPathUncast, boolean UB, boolean checkLeafs, boolean checkSupport, boolean checkUtil)
 This method checks the tree on the following properties.

Protected Attributes

U[] localOptions
 For each option the optimal utility your own local problem provides.
Protected Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >
HashMap< String, Integer > finalDomainSizeUnknownVariables
 the final domain sizes of as yet unknown variables
boolean[] dummy
 Used to determine whether a variable has a dummy element or not.
int dummyDepth
 The depth until where one can find dummy variables.
int numberOfDummies
 Counts the number of dummy variables in the tree.
int numberOfAncestors
 Stores the number of higher priority neighbours.
int upperboundArraySize
 The size of the array containing precalculated upperbounds.
ArrayList< HashMap< IntArrayWrapper, U > > goodsReceived
 For each child a map that stores the utilities received from children.

Private Member Functions

boolean checkGood (Val[] values)
 Method used to check whether the assignment to be reported by the good point to an existing assignment.

Private Attributes

ArrayList< HashMap< IntArrayWrapper, Boolean > > goodsConfirmed
 For each child a map that stores the utilities received from children.
Val[] optimalLocalSolution
 The optimal solution of the local problem.
int speculativeUTILcounter
 Counts the number of speculative UTIL messages.
int UTILcounter = 0
 Counts the total number of UTIl messages received.

Static Private Attributes

static final long serialVersionUID = 4206985864919963001L
 Used for serialization.

Detailed Description

This class is designed to store GOODs received by a node from its children, and is used in the ASODPOP algorithm.

A GOOD contains an assignment to a set of variables, a utility and a variable denoting whether it is a confirmed or speculative good. A GOOD is identified by its assignment, and in this class the GOODs are ordered using a tree based on these assignments.

The basic functionality of this class is to either add a received GOOD to the tree, or to obtain the assignment that has the highest utility.

Author
Brammert
Parameters
<Val>type used for variable values
<U>type used for utility values
Todo
write Unit test for this class

Constructor & Destructor Documentation

◆ InnerNodeTree() [1/2]

frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.InnerNodeTree ( String ownVariable,
Val[] ownVariableDomain,
UtilitySolutionSpace< Val, U > space,
int numberOfChildren,
U zero,
U infeasibleUtil,
boolean maximize,
boolean collectStats )

A constructor (Only used in testing the datastructure).

Warning
we assume that the agent's own variable is put in the end of variables_order
Parameters
ownVariableThe variable ID
ownVariableDomainThe domain of ownVariable
spaceA list of utility values for the different value combinations
numberOfChildrenThe number of children
zeroThe zero utility
infeasibleUtilThe infeasible utility
maximizewhen true we are maximizing, when false we are minimizing
collectStatstrue when statistics should be collected, and false otherwise

References init(), and updateLocalProblem().

Here is the call graph for this function:

◆ InnerNodeTree() [2/2]

frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.InnerNodeTree ( String ownVariable,
Val[] ownVariableDomain,
List< UtilitySolutionSpace< Val, U > > spaces,
int numberOfChildren,
U zero,
U infeasibleUtil,
boolean maximize,
boolean collectStats )

A constructor.

Warning
we assume that the agents own variable is put in the end of variables_order
Parameters
ownVariableThe variable ID
ownVariableDomainThe domain of ownVariable
spacesThe hypercubes representing the local problem
numberOfChildrenThe number of children
zeroThe zero utility
infeasibleUtilThe infeasible utility
maximizewhen true we are maximizing, when false we are minimizing
collectStatstrue when statistics should be collected, and false otherwise

References init(), and updateLocalProblem().

Here is the call graph for this function:

Member Function Documentation

◆ add()

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.add ( Good< Val, U > g,
int sender )

This method adds a received GOOD to the tree.

Parameters
gThe good to be added
senderThe sender of the good
Returns
true when a new variable has been discovered

References frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.addNewDomainElement(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.addNewDomainElementNoUB(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.addNewDomainElementWithUB(), addNewVariable(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.addVariableToTree(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.checkTree(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.createInnerNode(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.dummy, frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getUtility(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getValues(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getVariables(), goodsConfirmed, frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.goodsReceived, frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.initiateBounds(), frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.isConfirmed(), nextVariableAssignment(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.numberOfDummies, and frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.updatePath().

Here is the call graph for this function:

◆ addNewVariable()

int[] frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.addNewVariable ( String[] allVariables,
HashMap< String, Val > newVariables,
int sender )
protected
See also
frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree.addNewVariable(java.lang.String[], java.util.HashMap, int)

Referenced by add().

◆ checkGood()

boolean frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.checkGood ( Val[] values)
private

Method used to check whether the assignment to be reported by the good point to an existing assignment.

Author
Brammert Ottens, 1 nov 2009
Parameters
valuesthe values constituting the assigment
Returns
true when the assignment exists and false otherwise

References checkGood(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U extends Addable< U > >.isAlive().

Referenced by checkGood(), and updateLocalProblem().

Here is the call graph for this function:

◆ checkLeaf()

boolean frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.checkLeaf ( LeafNode< U > leaf,
IntArrayWrapper currentPath,
boolean checkUB,
U utility,
int sender )

Method to check that the utility and UB are consistent with the available information.

The utility should match exactly, but because UBs are only recomputed when necessary, and then should only decrease by such a recomputation, the stored UB should be at least as high as the real UB

Parameters
leafthe leaf to be checked
currentPaththe path to this leaf
checkUBtrue when the UB must be checked
utilitythe utility reported by the sender
senderthe sender of the good
Returns
always returns true

References goodsConfirmed, and frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.goodsReceived.

◆ createLeaf() [1/2]

LeafNode< U > frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf ( IntArrayWrapper currentPath,
boolean real,
final boolean withUB )
protected

Method to create a new leaf node.

Parameters
currentPathThe path to the leaf
realtrue when the leaf points to a real assignment
withUBtrue when the upper bound must be set
Returns
the new leaf node

References frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.addDelayed(), goodsConfirmed, frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.goodsReceived, frodo2.algorithms.asodpop.goodsTree.innerNodeTree.LeafNode< U extends Addable< U > >.newInstance(), and frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.resolve().

Here is the call graph for this function:

◆ createLeaf() [2/2]

LeafNode< U > frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.createLeaf ( IntArrayWrapper currentPath,
boolean real,
frodo2.algorithms.odpop.Good< Val, U > g,
int child,
final boolean withUB )
protected

Method to create a new leaf node.

Parameters
currentPathThe path to the leaf
realtrue when the leaf points to a real assignment
gthe received good
childthe child that reported it
withUBtrue when the upper bound must be set
Returns
the new leaf node

References frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.addDelayed(), goodsConfirmed, frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.goodsReceived, frodo2.algorithms.asodpop.goodsTree.innerNodeTree.LeafNode< U extends Addable< U > >.newInstance(), and frodo2.solutionSpaces.AddableDelayed< T extends Addable< T > >.resolve().

Here is the call graph for this function:

◆ finalDomainSizeReceiver()

void frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.finalDomainSizeReceiver ( )
protected

◆ findUnused()

boolean frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.findUnused ( int depth,
int[] localPath,
int[] unusedPath,
InnerNode< U, LeafNode< U > > currentNode )
protected

Looks for parts of the tree where the local solution as defined by localPath can still be used to create new leafs.

Author
Brammert Ottens, 5 okt 2009
Parameters
depththe current depth in the tree
localPaththe path representing the local solution
unusedPatha path where the local solution has not yet been used
currentNodethe current node being visited
Returns
true when there are unused parts of the tree, and false otherwise

References findUnused().

Referenced by findUnused().

Here is the call graph for this function:

◆ getAmax()

Good< Val, U > frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getAmax ( )

This method obtains the aMax.

If aMax is a confirmed assignment, i.e. no other assignment will ever have a higher utility, then the path belonging to aMax must be removed.

Returns
Good

References getAmax().

Referenced by getAmax().

Here is the call graph for this function:

◆ getBestAssignmentForOwnVariable()

void frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getBestAssignmentForOwnVariable ( HashMap< String, Val > assignments)

Given the assignment of variables in its separator, this method returns the best assignment possible.

Parameters
assignmentsthe, possible partial, assignment to the variables in the variables separator

References frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val, U, LeafNode< U > >.getOwnVariableOptions().

Here is the call graph for this function:

◆ getChildValues()

HashMap< String, Val > frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getChildValues ( HashMap< String, Val > parentContext,
int child )

Given a map that maps variables to values, this method returns the values belonging to the variables in a child's separator.

Author
Brammert Ottens, 19 aug 2009
Parameters
parentContextthe value map
childthe child for who we want to know the separator values
Returns
an array containing the values of the child's separator variables

◆ getNbrVariables()

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getNbrVariables ( )
Returns
the number of variables stored in this goods tree

◆ getRandomValue()

Val frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getRandomValue ( )
Author
Brammert Ottens, 26 mei 2010
Returns
a random value in the domain of the owning variable

◆ getSpeculativeUTILcounter()

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getSpeculativeUTILcounter ( )
Returns
total number of speculative UTIl messages received

◆ getUTILcounter()

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getUTILcounter ( )
Returns
total number of UTIl messages received

◆ getVariableIndex()

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.getVariableIndex ( String variable)
Parameters
variablevariable ID
Returns
the depth of the variable in the array

◆ ignoreGood()

boolean frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.ignoreGood ( Good< Val, U > g,
int sender )

If this good reports a value for an already confirmed assignment, the information in the good can be considered outdated and should be ignored.

Author
Brammert Ottens, 4 sep 2009
Parameters
gthe good to be checked
senderthe sender of the good
Returns
true when the assignment in the good already has a confirmed utility

References frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getValues(), frodo2.algorithms.odpop.Good< Val extends Addable< Val >, U extends Addable< U > >.getVariables(), goodsConfirmed, and frodo2.algorithms.asodpop.Good< Val extends Addable< Val >, U extends Addable< U > >.isConfirmed().

Here is the call graph for this function:

◆ init()

◆ knowsVariable()

boolean frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.knowsVariable ( String variable)
Parameters
variableThe variable for which we want to know whether this tree is aware of it
Returns
true if this tree is familier with this variable

◆ nextVariableAssignment()

void frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.nextVariableAssignment ( int[] max,
int[] position )
protected

Given a point in the domain space of value combinations between 0 and max, the next point is calculated and position is set to this new point.

Author
Brammert Ottens, 19 jul 2009
Parameters
maxfor each entry the maximal value
positionthe position in the domain space

Referenced by add().

◆ notEnoughInfo()

boolean frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.notEnoughInfo ( )

If there is only one variable in this tree, that means that there is not enough information to send a good.

Returns
boolean

◆ ownVariableValue()

void frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.ownVariableValue ( HashMap< String, Val > currentContext)

Returns the value of the trees own variable for the current next best assignment.

Author
Brammert Ottens, 10 nov 2009
Parameters
currentContextThe current assignment of all variables in ownVariable's separator

References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.getChild(), frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.getMaxChild(), and ownVariableValue().

Referenced by ownVariableValue().

Here is the call graph for this function:

◆ updateLocalProblem()

void frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.updateLocalProblem ( )
protected

Member Data Documentation

◆ goodsConfirmed

ArrayList<HashMap<IntArrayWrapper, Boolean> > frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.goodsConfirmed
private

For each child a map that stores the utilities received from children.

Referenced by add(), checkLeaf(), createLeaf(), createLeaf(), ignoreGood(), and init().

◆ localOptions

U [] frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.localOptions
protected

For each option the optimal utility your own local problem provides.

Referenced by init().

◆ optimalLocalSolution

Val [] frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.optimalLocalSolution
private

The optimal solution of the local problem.

Referenced by init(), and updateLocalProblem().

◆ serialVersionUID

final long frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.serialVersionUID = 4206985864919963001L
staticprivate

Used for serialization.

◆ speculativeUTILcounter

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.speculativeUTILcounter
private

Counts the number of speculative UTIL messages.

◆ UTILcounter

int frodo2.algorithms.asodpop.goodsTree.innerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U > >.UTILcounter = 0
private

Counts the total number of UTIl messages received.


The documentation for this class was generated from the following file: