FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.asodpop.goodsTree.leafNodeTree.LeafNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > > Class Template Reference
Inheritance diagram for frodo2.algorithms.asodpop.goodsTree.leafNodeTree.LeafNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > >:

Public Member Functions

 LeafNodeTree (String ownVariable, Val[] ownVariableDomain, UtilitySolutionSpace< Val, U > space, U zero, U infeasibleUtil, boolean maximize, boolean collectStats)
 A constructor.
 LeafNodeTree (String ownVariable, Val[] ownVariableDomain, List< UtilitySolutionSpace< Val, U > > spaces, U zero, U infeasibleUtil, boolean maximize, boolean collectStats)
 A constructor.
Good< Val, U > getAmax ()
Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.leafNodeTree.LeafNodeTree< Val, U, L >
 LeafNodeTree (String ownVariable, Val[] ownVariableDomain, UtilitySolutionSpace< Val, U > space, U zero, U infeasible, boolean maximize, boolean collectStats)
 A constructor.
Good< Val, U > getAmax ()
void getBestAssignmentForOwnVariable (HashMap< String, Val > context)
int[] getFinalDomainSize ()
Val[][] getDomains ()
boolean hasFullInfo ()
boolean isValuationSufficient ()
boolean knowsVariable (String variable)
boolean notEnoughInfo ()
boolean pathExists (Val[] values)
void removeAMax ()
 This function is not used in this class.
void setFinalDomainSize (String[] variables, int[] domainSize)
 This function is not used in this class.
String[] getChildSeparatorReportingOrder (int child)
void setChildrenSeparator (int child, String[] variables)
boolean add (Good< Val, U > g, int sender, HashMap< String, Val[]> domains)
boolean setChildDone (int child)
HashMap< String, Val > getChildValues (HashMap< String, Val > parentContext, int child)

Protected Member Functions

void getOwnAssignment (HashMap< String, Val > assignment, Node currentNode, int depth)
Protected Member Functions inherited from frodo2.algorithms.odpop.goodsTree.leafNodeTree.LeafNodeTree< Val, U, L >
void addToTree (Val[] assignment, int depth, Node currentNode)
 Adds a reported value to the goods tree.
void getOwnAssignment (HashMap< String, Val > assignment, Node currentNode, int depth)
 Given an assignment to all the variables in the variables separator, this method finds and returns the optimal value of the tree's own variable.

Private Member Functions

void fillOwnOptions (U[] ownOptions, int currentVariable, String[] localVariables, Val[] assignment)
 Method used to fill the ownOptions array, that contains the utility for every decision this variable can make.

Static Private Attributes

static final long serialVersionUID = -6041904137491347535L
 Used for serialisation.

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.odpop.goodsTree.leafNodeTree.LeafNodeTree< Val, U, L >
Node root
 The root of the tree.
boolean hasMore
 true when orderedAssignments is not empty, and false otherwise
String[] separatorVariables
 The variables in ownVariable's separator.
int[] domainSize
 For each variable the size of its domain.
HashMap< String, HashMap< Val, Integer > > valuePointers
 for each variables, the child index of their values
Val[] localAssignment
 The currently optimal assignment to the local problem.
boolean singleton
 true when the variable that owns this tree is a singleton, i.e.

Detailed Description

Author
Brammert Ottens, 9 nov 2009
Parameters
<Val>type used for variable values
<U>type used for utility values
<L>type used for the leaf node

Constructor & Destructor Documentation

◆ LeafNodeTree() [1/2]

frodo2.algorithms.asodpop.goodsTree.leafNodeTree.LeafNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > >.LeafNodeTree ( String ownVariable,
Val[] ownVariableDomain,
UtilitySolutionSpace< Val, U > space,
U zero,
U infeasibleUtil,
boolean maximize,
boolean collectStats )

A constructor.

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
spaceThe hypercube representing the local problem
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

◆ LeafNodeTree() [2/2]

frodo2.algorithms.asodpop.goodsTree.leafNodeTree.LeafNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > >.LeafNodeTree ( String ownVariable,
Val[] ownVariableDomain,
List< UtilitySolutionSpace< Val, U > > spaces,
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
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

Member Function Documentation

◆ fillOwnOptions()

void frodo2.algorithms.asodpop.goodsTree.leafNodeTree.LeafNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > >.fillOwnOptions ( U[] ownOptions,
int currentVariable,
String[] localVariables,
Val[] assignment )
private

Method used to fill the ownOptions array, that contains the utility for every decision this variable can make.

Author
Brammert Ottens, 27 jan 2010
Parameters
ownOptionsthe utility array to be filled
currentVariablethe current variable
localVariablesthe variables that occur in the local problem
assignmentthe assignment to the local variables
Todo
This method is actually used, but the compiler incorrectly complains it isn't

References frodo2.algorithms.odpop.goodsTree.leafNodeTree.LeafNodeTree< Val, U, L >.domainSize, and fillOwnOptions().

Referenced by fillOwnOptions().

Here is the call graph for this function:

◆ getAmax()

◆ getOwnAssignment()

Member Data Documentation

◆ serialVersionUID

final long frodo2.algorithms.asodpop.goodsTree.leafNodeTree.LeafNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.Node< U > >.serialVersionUID = -6041904137491347535L
staticprivate

Used for serialisation.


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