|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A convenience class that contains the following information for a variable. More...
Public Member Functions | |
| VariableInfo (boolean root, String variableID, String parent, String[] children, String[] pseudo_children, List< String > pseudo_parents, int numberOfPseudoParents, GoodsTree< Val, U, LeafNode< U > > tree) | |
| A constructor. | |
| Good< Val, U > | getAmax () |
| Method to return the next good to send. | |
| Val | getRandomValue () |
| void | setCurrentContext (HashMap< String, Val > context, boolean isConfirmed) |
| Set the current context. | |
| void | updateCurrentContext (String variable, Val value) |
| Updates the value of variable in the current context. | |
| void | setNewVariable (boolean newVariable) |
| Setter method for newVariable. | |
| boolean | getNewVariable () |
| ASKmsg | getAskMessage (int child) |
| ASKmsg | getAskMessage (String child) |
| ACKmsg | getAckMessage (int child) |
| boolean | valuesAreConsistent (Val[] values, String child) |
Checks whether the number of values in values is consistent with the reported separator size of the child. | |
| String | toString () |
| Method to print out state of the variable. | |
Public Attributes | |
| boolean | root |
| Denotes whether the variable is the root or not. | |
| boolean | isDone |
| Stores whether this variable already send a DONE message. | |
| boolean | terminated |
| When the optimal assignment is known, this variable is set to true. | |
| String | variableID |
| The variables ID. | |
| String | parent |
| The parents ID. | |
| String[] | children |
| The children's IDs. | |
| String[] | pseudo_children |
| The pseudo children of this variable. | |
| HashSet< String > | pseudo_parents |
| A list of pseudo parents. | |
| HashMap< String, Integer > | childrenPointer |
| Maps a child's ID to an integer. | |
| int | numberOfChildren |
| The number of children this variable has. | |
| boolean | infeasible |
true when the remain part of the local problem has become infeasible | |
| GoodsTree< Val, U, LeafNode< U > > | tree |
| This data structure contains all the information for this variable. | |
| boolean[] | done |
| For each child it stores whether it is done or not. | |
| Good< Val, U > | lastSent |
| The last good that has been sent. | |
| boolean | notResponded |
| True if the agent has not yet responded to an ASK message. | |
| HashMap< String, Val > | currentContextMap |
| The currentContextMap. | |
| LinkedList< Message > | goodsToSend |
| list of goods that are still to be send | |
Private Attributes | |
| ASKmsg[] | askMessages |
| A list of precreated ask messages, one for each child. | |
| ACKmsg[] | ackMessages |
| A list of precreated ack messages, one for each child. | |
| boolean | newVariable |
true when this variable must report a new variable in his separator to his parent | |
| boolean | acknowledged = true |
true when the last utility message with variable info has been acknowledge, and false otherwise. | |
A convenience class that contains the following information for a variable.
| frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.VariableInfo | ( | boolean | root, |
| String | variableID, | ||
| String | parent, | ||
| String[] | children, | ||
| String[] | pseudo_children, | ||
| List< String > | pseudo_parents, | ||
| int | numberOfPseudoParents, | ||
| GoodsTree< Val, U, LeafNode< U > > | tree ) |
A constructor.
| root | true when this variable is a root |
| variableID | The ID of this variable |
| parent | The parent of this variable |
| children | The children of this variable |
| pseudo_children | A list of pseudo children |
| pseudo_parents | A list of pseudo parents |
| numberOfPseudoParents | the size of the list of pseudo children |
| tree | The GoodsTree |
References ackMessages, askMessages, children, childrenPointer, currentContextMap, done, newVariable, notResponded, numberOfChildren, parent, pseudo_children, pseudo_parents, root, tree, and variableID.
| ACKmsg frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getAckMessage | ( | int | child | ) |
| child | child of the variable |
References ackMessages.
| Good< Val, U > frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getAmax | ( | ) |
Method to return the next good to send.
References tree.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage().
| ASKmsg frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getAskMessage | ( | int | child | ) |
| child | child of the variable |
References askMessages.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendASK().
| ASKmsg frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getAskMessage | ( | String | child | ) |
| child | child of the variable |
References askMessages, and childrenPointer.
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getNewVariable | ( | ) |
References newVariable.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), and frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood().
| Val frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.getRandomValue | ( | ) |
References tree.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent().
| void frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setCurrentContext | ( | HashMap< String, Val > | context, |
| boolean | isConfirmed ) |
Set the current context.
| context | the current context |
| isConfirmed | true when the received VALUE message is confirmed |
References currentContextMap, and pseudo_parents.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent().
| void frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.setNewVariable | ( | boolean | newVariable | ) |
Setter method for newVariable.
| newVariable | the value for newVariable |
References newVariable.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), and frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood().
| String frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.toString | ( | ) |
Method to print out state of the variable.
References currentContextMap, done, numberOfChildren, and tree.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), and frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent().
| void frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.updateCurrentContext | ( | String | variable, |
| Val | value ) |
Updates the value of variable in the current context.
| variable | The variable whos value must be updated |
| value | The new value of the variable |
References currentContextMap.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent().
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.valuesAreConsistent | ( | Val[] | values, |
| String | child ) |
Checks whether the number of values in values is consistent with the reported separator size of the child.
| values | the set of values reported by the child |
| child | the child who reported the values |
true when the reported separator is consistent with the reported values References childrenPointer, and tree.
|
private |
A list of precreated ack messages, one for each child.
Referenced by getAckMessage(), and VariableInfo().
|
private |
true when the last utility message with variable info has been acknowledge, and false otherwise.
The acknowledgements are there to enable the algorithm to function when the order of messages is not garuanteed.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood().
|
private |
A list of precreated ask messages, one for each child.
Referenced by getAskMessage(), getAskMessage(), and VariableInfo().
| String [] frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.children |
The children's IDs.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.startProcess(), and VariableInfo().
| HashMap<String, Integer> frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.childrenPointer |
Maps a child's ID to an integer.
Referenced by getAskMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendVALUEChild(), valuesAreConsistent(), and VariableInfo().
| HashMap<String, Val> frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.currentContextMap |
The currentContextMap.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), setCurrentContext(), toString(), updateCurrentContext(), and VariableInfo().
| boolean [] frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.done |
For each child it stores whether it is done or not.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), toString(), and VariableInfo().
| LinkedList<Message> frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.goodsToSend |
list of goods that are still to be send
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood().
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.infeasible |
true when the remain part of the local problem has become infeasible
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage().
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.isDone |
Stores whether this variable already send a DONE message.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage().
| Good<Val, U> frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.lastSent |
The last good that has been sent.
Should be set to null after a confirmed good has been sent.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood().
|
private |
true when this variable must report a new variable in his separator to his parent
Referenced by getNewVariable(), setNewVariable(), and VariableInfo().
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.notResponded |
True if the agent has not yet responded to an ASK message.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), and VariableInfo().
| int frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.numberOfChildren |
The number of children this variable has.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), toString(), and VariableInfo().
| String frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.parent |
The parents ID.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.startProcess(), and VariableInfo().
| String [] frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.pseudo_children |
The pseudo children of this variable.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), and VariableInfo().
| HashSet<String> frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.pseudo_parents |
A list of pseudo parents.
Referenced by setCurrentContext(), and VariableInfo().
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.root |
Denotes whether the variable is the root or not.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), and VariableInfo().
| boolean frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.terminated |
When the optimal assignment is known, this variable is set to true.
It is used to ignore messages received after termination
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), and frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage().
| GoodsTree<Val, U, LeafNode<U> > frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.tree |
This data structure contains all the information for this variable.
Referenced by getAmax(), getRandomValue(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendVALUEChild(), toString(), valuesAreConsistent(), and VariableInfo().
| String frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.VariableInfo.variableID |
The variables ID.
Referenced by frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processASKMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processUTILMessage(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessageParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.processVALUEmessagePseudoParent(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendASK(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendGood(), frodo2.algorithms.asodpop.ASODPOPBinaryDomains< Val extends Addable< Val >, U extends Addable< U > >.sendVALUEChild(), and VariableInfo().