|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A DFSgeneration module that also computes the order in which is variable is visited and the total number of variables in the DFS. More...

Classes | |
| class | DFSorderOutputMessage |
| Carries DFS order information for one variable. More... | |
Public Member Functions | |
| DFSgenerationWithOrder (DCOPProblemInterface< V, U > problem, Element parameters) throws ClassNotFoundException | |
| Constructor. | |
| DFSgenerationWithOrder (Element parameters, DCOPProblemInterface< V, U > problem) | |
| The constructor called in "statistics gatherer" mode. | |
| Collection< MessageType > | getMsgTypes () |
| void | reset () |
| void | notifyIn (Message msg) |
| Public Member Functions inherited from frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U > | |
| DFSgeneration () | |
| Default constructor. | |
| HashMap< String, DFSview< V, U > > | getDFS () |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| The algorithm. | |
| void | setQueue (Queue queue) |
| void | getStatsFromQueue (Queue queue) |
| void | setSilent (boolean silent) |
| String | dfsToString () |
| void | reset () |
| long | getFinalTime () |
| Returns the time at which the DFS phase has finished, determined by looking at the timestamp of the stat messages. | |
Static Public Attributes | |
| static MessageType | ROOT_VAR_MSG_TYPE = LeaderElectionMaxID.OUTPUT_MSG_TYPE |
| The type of the messages telling whether a given variable is a root. | |
| static MessageType | CHILD_ORDER_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationWithOrder", "CHILDwithOrder") |
| The type of the message used to tell the recipient that it is a child of the sender. | |
| static MessageType | PSEUDO_ORDER_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationWithOrder", "PSEUDOwithOrder") |
| The type of the message used to tell the recipient that it is a pseudo-child of the sender. | |
| static MessageType | OUTPUT_MSG_TYPE = new MessageType ("VarOrdering", "DFSgenerationWithOrder", "DFSoutput_DFSgenerationWithOrder") |
| The type of the output messages. | |
| static final MessageType | OUTPUT_ORDER_TYPE = new MessageType ("VarOrdering", "DFSgenerationWithOrder", "DFSorderOutput") |
| The type of the output messages containing the orders of variables in the DFS. | |
| static final MessageType | VARIABLE_COUNT_TYPE = new MessageType ("VarOrdering", "DFSgenerationWithOrder", "DFSorderVarNbr") |
| The type of the top-down messages sent by the root containing the number of variables in the DFS. | |
| Static Public Attributes inherited from frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U > | |
| static MessageType | FINISH_MSG_TYPE |
| The type of the message telling the agent finished. | |
| static MessageType | START_MSG_TYPE |
| The type of the message telling the module to start. | |
| static MessageType | ROOT_VAR_MSG_TYPE |
| The type of the messages telling whether a given variable is a root. | |
| static final MessageType | CHILD_MSG_TYPE |
| The type of the message used to tell the recipient that it is a child of the sender. | |
| static MessageType | PSEUDO_MSG_TYPE |
| The type of the message used to tell the recipient that it is a pseudo-child of the sender. | |
| static MessageType | OUTPUT_MSG_TYPE |
| The type of the output messages. | |
| static final MessageType | STATS_MSG_TYPE |
| The type of the messages containing statistics. | |
Protected Member Functions | |
| MessageType | getRootVarMsgType () |
| MessageType | getChildMsgType () |
| MessageType | getPseudoMsgType () |
| MessageType | getOutputMsgType () |
| void | init () |
| void | init (String var) |
| CHILDmsg | makeChildToken (Serializable rootID, String var, String parent, Collection< String > openNeighbors) |
| void | processAdditionalMsgInformation (Message msg, String myVar, DFSview< V, U > myRelationships) |
| void | sendAdditionalDFSoutput (Serializable rootID, String myVar) |
| Protected Member Functions inherited from frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U > | |
| MessageType | getRootVarMsgType () |
| MessageType | getChildMsgType () |
| MessageType | getPseudoMsgType () |
| MessageType | getOutputMsgType () |
| void | init () |
| Parses the problem. | |
| void | processAdditionalMsgInformation (Message msg, String var, DFSview< V, U > dfsView) |
| allows to process information included in messages which extend CHILDmsg | |
| CHILDmsg | makeChildToken (Serializable rootID, String var, String dest, Collection< String > openNeighbors) |
| makes the ChildToken Message with all the information required by the module | |
| void | sendAdditionalDFSoutput (Serializable rootID, String myVar) |
| Use this method to send additional output from DFS generation. | |
| boolean | sendDownCHILDtoken (Serializable rootID, String var, Collection< String > openList, DFSview< V, U > myDFSview, Message msg) |
| Attempts to choose the next child and sends it a CHILD token. | |
Private Member Functions | |
| boolean | isRoot (String var) |
| int | orderOfNextChild (String var) |
Private Attributes | |
| Map< String, Integer > | trueOrder |
| Map of the true final order of this agent's variables. | |
| Map< String, Integer > | declaredOrder |
| Map of the declared final order of this agent's variables. | |
| Map< String, Integer > | order_process |
| Map of the last order received. | |
| Map< String, Boolean > | are_root |
| For each variable, whether it is a root. | |
| Map< String, Integer > | nbrVars |
| For each variable, the total number of variables in its constraint graph component. | |
| final SecureRandom | rnd = new SecureRandom () |
| A source of randomness. | |
| final int | minIncr |
| Each variable overstates by rand(minIncr, 2*minIncr) its visiting order in the constraint graph traversal, in order to keep its number of neighbors secret. | |
Additional Inherited Members | |
| Protected Attributes inherited from frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U > | |
| Queue | queue |
| The queue on which it should call sendMessage(). | |
| boolean | started |
| Whether the execution of the algorithm has started. | |
| Map< String, Collection< String > > | openNeighbors |
| For each variable that this agent owns, a collection of open neighbor variables. | |
| HashMap< String, DFSview< V, U > > | dfsViews |
| For every variable this agent owns, its view of the DFS. | |
| Map< String, String > | owners |
| For each known variable, the name of the agent that owns it. | |
| int | totalNbrVars |
| The total number of variables in the problem (used only in "statistics gatherer" mode). | |
| NextChildChoiceHeuristic | heuristic |
| The heuristic used to choose a variable's next child from its list of open neighbors. | |
| DCOPProblemInterface< V, U > | problem |
| The problem. | |
| HashMap< Serializable, LinkedList< String > > | partialPaths |
| For each component, the current partial constraint graph traversal path. | |
A DFSgeneration module that also computes the order in which is variable is visited and the total number of variables in the DFS.
This is (a modified version of) the DFSorder() procedure from the following paper: Thomas Leaute and Boi Faltings. Privacy-preserving multi-agent constraint satisfaction. In Proceedings of the 2009 IEEE International Conference on PrivAcy, Security, riSk and Trust (PASSAT'09), Vancouver, British Columbia, August 29-31 2009. IEEE Computer Society Press.
| <V> | the type used for variable values |
| <U> | the type used for utility values |
| frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSgenerationWithOrder | ( | DCOPProblemInterface< V, U > | problem, |
| Element | parameters ) throws ClassNotFoundException |
Constructor.
| problem | this agent's problem |
| parameters | the parameters for DFSgenerationWithOrder |
| ClassNotFoundException | if the heuristic class is unknown |
References are_root, declaredOrder, order_process, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.problem, and trueOrder.
| frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSgenerationWithOrder | ( | Element | parameters, |
| DCOPProblemInterface< V, U > | problem ) |
The constructor called in "statistics gatherer" mode.
| problem | the overall problem |
| parameters | the description of what statistics should be reported |
References frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.problem.
|
protected |
References CHILD_ORDER_MSG_TYPE.
| Collection< MessageType > frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.getMsgTypes | ( | ) |
References VARIABLE_COUNT_TYPE.
|
protected |
References OUTPUT_MSG_TYPE.
|
protected |
References PSEUDO_ORDER_MSG_TYPE.
|
protected |
References ROOT_VAR_MSG_TYPE.
|
protected |
References init(), and frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.problem.
Referenced by init(), and notifyIn().

|
protected |
References are_root, declaredOrder, order_process, and trueOrder.
|
private |
| var | the variable to test |
References are_root.
Referenced by processAdditionalMsgInformation().
|
protected |
References frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.openNeighbors, and orderOfNextChild().

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.notifyIn | ( | Message | msg | ) |
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, are_root, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.dfsViews, frodo2.communication.MessageType.equals(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.getDest(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.getTotal(), frodo2.communication.Message.getType(), init(), frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.openNeighbors, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.queue, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.started, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.STATS_MSG_TYPE, and VARIABLE_COUNT_TYPE.

|
private |
| var | the variable who calls this method |
References order_process.
Referenced by makeChildToken().
|
protected |
References frodo2.communication.MessageType.equals(), frodo2.algorithms.varOrdering.dfs.CHILDorderMsg.getOrder(), frodo2.communication.Message.getType(), isRoot(), order_process, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.queue, and trueOrder.

| void frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.reset | ( | ) |
References are_root, declaredOrder, order_process, and trueOrder.
|
protected |
References order_process, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V, U >.queue, and trueOrder.
|
private |
For each variable, whether it is a root.
Referenced by DFSgenerationWithOrder(), init(), isRoot(), notifyIn(), and reset().
|
static |
The type of the message used to tell the recipient that it is a child of the sender.
Referenced by frodo2.algorithms.varOrdering.dfs.CHILDorderMsg.CHILDorderMsg(), frodo2.algorithms.varOrdering.dfs.CHILDorderMsg.CHILDorderMsg(), getChildMsgType(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.getMsgTypes(), and frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.notifyIn().
|
private |
Map of the declared final order of this agent's variables.
Referenced by DFSgenerationWithOrder(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.DFSorderOutputMessage(), init(), and reset().
|
private |
Each variable overstates by rand(minIncr, 2*minIncr) its visiting order in the constraint graph traversal, in order to keep its number of neighbors secret.
|
private |
For each variable, the total number of variables in its constraint graph component.
|
private |
Map of the last order received.
Referenced by DFSgenerationWithOrder(), init(), orderOfNextChild(), processAdditionalMsgInformation(), reset(), and sendAdditionalDFSoutput().
|
static |
The type of the output messages.
Referenced by frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getMsgTypes(), frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.getMsgTypes(), frodo2.algorithms.dpop.privacy.test.SecureRerootingTest.getMsgTypes(), getOutputMsgType(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.getOutputMsgType(), frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.notifyIn(), and frodo2.algorithms.dpop.privacy.test.SecureRerootingTest.notifyIn().
|
static |
The type of the output messages containing the orders of variables in the DFS.
Referenced by frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.DFSorderOutputMessage(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.DFSorderOutputMessage(), frodo2.algorithms.dpop.privacy.CollaborativeDecryption< C extends Addable< C >, E extends AddableLimited< C, E, K extends PublicKeyShare >.getMsgTypes(), frodo2.algorithms.dpop.privacy.SecureRerooting< C extends Addable< C >, E extends AddableLimited< C, E >.getMsgTypes(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.getMsgTypes(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.notifyIn(), and frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessageToSelf().
|
static |
The type of the message used to tell the recipient that it is a pseudo-child of the sender.
Referenced by getPseudoMsgType().
|
private |
A source of randomness.
|
static |
The type of the messages telling whether a given variable is a root.
Referenced by getRootVarMsgType().
|
private |
Map of the true final order of this agent's variables.
Referenced by DFSgenerationWithOrder(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.DFSorderOutputMessage.DFSorderOutputMessage(), init(), processAdditionalMsgInformation(), reset(), and sendAdditionalDFSoutput().
|
static |
The type of the top-down messages sent by the root containing the number of variables in the DFS.
Referenced by frodo2.algorithms.dpop.privacy.CollaborativeDecryption< C extends Addable< C >, E extends AddableLimited< C, E, K extends PublicKeyShare >.getMsgTypes(), frodo2.algorithms.dpop.privacy.RerootRequester< V extends Addable< V >, U extends Addable< U > >.getMsgTypes(), frodo2.algorithms.dpop.privacy.SecureRerooting< C extends Addable< C >, E extends AddableLimited< C, E >.getMsgTypes(), getMsgTypes(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.getMsgTypes(), notifyIn(), frodo2.algorithms.varOrdering.dfs.tests.DFSgenerationWithOrderTest.notifyIn(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.notifyInListeners(), frodo2.algorithms.varOrdering.dfs.DFSgenerationParallel< S extends Comparable< S > &Serializable >.FakeQueue.sendMessageToSelf(), frodo2.algorithms.varOrdering.dfs.VarNbrMsg.VarNbrMsg(), and frodo2.algorithms.varOrdering.dfs.VarNbrMsg.VarNbrMsg().