|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
P2-DPOP's UTIL propagation module, using partially homomorphic encryption on utilities and a linear order on variables. More...

Classes | |
| class | VariableInfo |
| A convenience class used to store information about a variable. More... | |
Public Member Functions | |
| EncryptedUTIL (DCOPProblemInterface< V, U > problem, Element parameters) throws ClassNotFoundException | |
| Constructor from XML descriptions. | |
| EncryptedUTIL (Element parameters, DCOPProblemInterface< V, U > problem) | |
| The constructor called in "statistics gatherer" mode. | |
| void | reset () |
| void | setSilent (boolean silent) |
| void | setQueue (Queue queue) |
| void | getStatsFromQueue (Queue queue) |
| Integer | getMaxMsgDim () |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| long | getFinalTime () |
| Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages. | |
| Decision | notifyOut (Message msg) |
| Re-encrypts UTIL messages the first time they leave the agent. | |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
| Public Member Functions inherited from frodo2.communication.OutgoingMsgPolicyInterface< T > | |
| default Decision | notifyOut (Object fromAgent, Message msg) |
| Notifies the listener of an outgoing message. | |
| default Decision | notifyOut (Object fromAgent, Message msg, Collection<? extends Object > toAgents) |
| Notifies the listener of an outgoing message. | |
| default Decision | notifyOut (Message msg, Collection<? extends Object > toAgents) |
| Notifies the listener of an outgoing message. | |
Static Public Attributes | |
| static final MessageType | CODENAME_TYPE = VariableObfuscation.CODE_NAME_TYPE |
| The type of the message used to share codeName with children. | |
Static Package Attributes | |
| static final MessageType | LEAF_MSG_TYPE = new MessageType ("P2-DPOP", "EncryptedUTIL", "Start") |
| The type of the token sent by the root to the last variable in the linear ordering to tell it to start UTIL propagation. | |
| static final MessageType | ENCRYPTED_UTIL_TYPE = new MessageType ("P2-DPOP", "EncryptedUTIL", "UTIL") |
| The type of the encrypted UTIL messages. | |
Private Member Functions | |
| void | init () |
| Initiate the module. | |
| void | projectAndSend (UtilitySolutionSpaceLimited< V, U, E > space, VariableInfo info) |
| Projects out a variable and sends the result to its parent (if any) or sends a reroot request. | |
| U | findOptimalValueForIsolatedVar (VariableInfo varInfo) |
| void | askDecrypt (UtilitySolutionSpaceLimited< V, U, E > space, VariableInfo info) |
| Find out the optimal value of a variable. | |
| void | sendToParent (String var, UtilitySolutionSpaceLimited< V, U, E > space) |
| Sends a UTIL message. | |
| void | sendOutput (U utility, V optValue, String var) |
| Sends the output utility to itself and to the statistics monitor. | |
| String | generateCodeName () |
| Genereate a codeName and add it to the list of the used codeNames for this agent. | |
| V[] | randomDomain (String var) |
| Generates a domain of random numbers. | |
| void | record (UtilitySolutionSpace< V, U > space, VariableInfo info) |
| Records the input space until spaces from all children have been received. | |
Private Attributes | |
| SecureRandom | rand = new SecureRandom() |
| A source of randomness. | |
| Set< String > | codeNames |
| List of all codeNames used by this agent. | |
| DCOPProblemInterface< V, U > | problem |
| This problem. | |
| long | finalTime |
| The time when the last stat message has been received. | |
| int | maxMsgDim = 0 |
| In stats gatherer mode, the maximum number of variables in a UTIL message. | |
| Queue | queue |
| Queue to receive messages. | |
| Map< String, VariableInfo > | infos |
| For each variable this agent owns, its relevant information. | |
| E | infinity |
| An encrypted version of +INF. | |
| final boolean | minNCCCs |
| Whether to minimize the NCCC count, at the expense of an increase in runtime. | |
| boolean | mergeBack |
| If merging back edges is allowed (i.e. | |
| boolean | start = false |
| If this module has started or not. | |
| Class< E > | encryptedUtilClass |
| Class used for encrypted utilities. | |
| HashMap< EncrUTIL< V, U, E >, VariableInfo > | utilSent = new HashMap< EncrUTIL<V, U, E>, VariableInfo > () |
| A set of UTIL messages sent, used to detect when one leaves the agent, so as only to re-encrypt it then. | |
| boolean | reportStats = true |
| Whether to report stats. | |
P2-DPOP's UTIL propagation module, using partially homomorphic encryption on utilities and a linear order on variables.
This is an optimization version of the ConsistencyProp() and FeasibleValue() procedures 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 cleartext utility values |
| <E> | the type used for encrypted utility values |
| frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.EncryptedUTIL | ( | DCOPProblemInterface< V, U > | problem, |
| Element | parameters ) throws ClassNotFoundException |
Constructor from XML descriptions.
| problem | description of the problem |
| parameters | description of the parameters of EncryptedUTIL |
| ClassNotFoundException | if specified utility classes are not found |
References EncryptedUTIL(), and problem.
Referenced by EncryptedUTIL().

| frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.EncryptedUTIL | ( | 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 problem.
|
private |
Find out the optimal value of a variable.
| space | the utilitySolutionSpaceLimited |
| info | the variable info |
References frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.cs, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.lowerB, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.minFromTo(), frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.self, frodo2.communication.Queue.sendMessageToSelf(), frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.setFinalSpace(), and frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.upperB.

|
private |
| varInfo | the info for an isolated variable |
References frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.ProjOutput< V extends Addable< V >, U extends Addable< U > >.assignments, findOptimalValueForIsolatedVar(), frodo2.solutionSpaces.BasicUtilitySolutionSpace< V extends Addable< V >, U extends Serializable >.getUtility(), and frodo2.solutionSpaces.UtilitySolutionSpace< V extends Addable< V >, U extends Addable< U > >.projectAll().
Referenced by findOptimalValueForIsolatedVar().

|
private |
| long frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getFinalTime | ( | ) |
Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages.
References finalTime.
| Integer frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getMaxMsgDim | ( | ) |
| Collection< MessageType > frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, CODENAME_TYPE, frodo2.algorithms.dpop.privacy.OptUtilMsg< U extends Addable< U > >.COMP_OPT_UTIL_MSG_TYPE, frodo2.algorithms.dpop.privacy.CollaborativeDecryption< C extends Addable< C >, E extends AddableLimited< C, E, K extends PublicKeyShare >.CRYPTO_SCHEME_TYPE, frodo2.algorithms.dpop.privacy.SecureCircularRouting.DELIVERY_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgeneration< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, frodo2.algorithms.dpop.privacy.CollaborativeDecryption< C extends Addable< C >, E extends AddableLimited< C, E, K extends PublicKeyShare >.OUTPUT_TYPE, frodo2.algorithms.dpop.privacy.SecureCircularRouting.PREVIOUS_MSG_TYPE, frodo2.algorithms.AgentInterface< V extends Addable< V > >.START_AGENT, and frodo2.algorithms.dpop.privacy.SecureCircularRouting.TO_LAST_LEAF_MSG_TYPE.
| void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getStatsFromQueue | ( | Queue | queue | ) |
|
private |
| void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.notifyIn | ( | Message | msg | ) |
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References frodo2.algorithms.AgentInterface< V extends Addable< V > >.AGENT_FINISHED, frodo2.communication.MessageType.equals(), frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getNbrNeighbors(), init(), notifyIn(), frodo2.algorithms.varOrdering.dfs.DFSgenerationWithOrder< V extends Addable< V >, U extends Addable< U > >.OUTPUT_MSG_TYPE, start, and frodo2.algorithms.dpop.UTILpropagation< Val extends Addable< Val >, U extends Addable< U > >.UTIL_STATS_MSG_TYPE.
Referenced by notifyIn().

| Decision frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.notifyOut | ( | Message | msg | ) |
Re-encrypts UTIL messages the first time they leave the agent.
Implements frodo2.communication.OutgoingMsgPolicyInterface< T >.
References frodo2.communication.OutgoingMsgPolicyInterface< T >.Decision.DONTCARE, frodo2.communication.MessageType.isParent(), notifyOut(), frodo2.algorithms.dpop.privacy.SecureCircularRouting.PREVIOUS_MSG_TYPE, and frodo2.algorithms.dpop.privacy.SecureCircularRouting.TO_LAST_LEAF_MSG_TYPE.
Referenced by notifyOut().

|
private |
Projects out a variable and sends the result to its parent (if any) or sends a reroot request.
| info | information about the variable to be projected out |
| space | the space received in EncryptedUTIL (and null if the variable is a leaf) |
References projectAndSend().
Referenced by projectAndSend().

|
private |
Generates a domain of random numbers.
| var | the variable for which the domain must be created |
References frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getDomain(), and rand.

|
private |
Records the input space until spaces from all children have been received.
| space | the space to be recorded |
| info | the information on the variable responsible for the space |
| void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.reset | ( | ) |
Implements frodo2.algorithms.StatsReporter.
|
private |
Sends the output utility to itself and to the statistics monitor.
| utility | The utility corresponding to optimal value |
| optValue | the optimal value |
| var | the variable who send |
References infos, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.iteration, frodo2.output, queue, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.reset(), and frodo2.communication.Queue.sendMessageToSelf().

|
private |
Sends a UTIL message.
| var | the sender of the message |
| space | the content of the message |
References frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.encode(), frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.getEncryptDomain(), infos, frodo2.algorithms.dpop.privacy.SecureCircularRouting.PREVIOUS_MSG_TYPE, queue, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.reset(), and utilSent.

| void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
| void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.setSilent | ( | boolean | silent | ) |
Implements frodo2.algorithms.StatsReporter.
|
static |
The type of the message used to share codeName with children.
Referenced by getMsgTypes(), frodo2.algorithms.dpop.privacy.VarCodenameMsg< V >.VarCodenameMsg(), and frodo2.algorithms.dpop.privacy.VarCodenameMsg< V >.VarCodenameMsg().
|
private |
List of all codeNames used by this agent.
Referenced by generateCodeName().
|
staticpackage |
The type of the encrypted UTIL messages.
Referenced by frodo2.algorithms.dpop.privacy.EncrUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.EncrUTIL(), and frodo2.algorithms.dpop.privacy.EncrUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.EncrUTIL().
|
private |
Class used for encrypted utilities.
|
private |
The time when the last stat message has been received.
Referenced by getFinalTime().
|
private |
An encrypted version of +INF.
|
private |
For each variable this agent owns, its relevant information.
Referenced by sendOutput(), and sendToParent().
|
staticpackage |
The type of the token sent by the root to the last variable in the linear ordering to tell it to start UTIL propagation.
Referenced by frodo2.algorithms.dpop.privacy.LeafMsg.LeafMsg().
|
private |
In stats gatherer mode, the maximum number of variables in a UTIL message.
|
private |
If merging back edges is allowed (i.e.
one variable is always identified by the same codename, regardless of the pseudo-child)
|
private |
Whether to minimize the NCCC count, at the expense of an increase in runtime.
|
private |
This problem.
Referenced by EncryptedUTIL(), EncryptedUTIL(), and init().
|
private |
Queue to receive messages.
Referenced by getStatsFromQueue(), sendOutput(), sendToParent(), and setQueue().
|
private |
A source of randomness.
Referenced by generateCodeName(), and randomDomain().
|
private |
Whether to report stats.
|
private |
If this module has started or not.
Referenced by notifyIn().
|
private |
A set of UTIL messages sent, used to detect when one leaves the agent, so as only to re-encrypt it then.
Referenced by sendToParent().