FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.varOrdering.election.VarElectionMessenger Class Reference

A version of LeaderElectionMaxID that uses random numbers as IDs and lies in order to protect topology privacy. More...

Inheritance diagram for frodo2.algorithms.varOrdering.election.VarElectionMessenger:

Public Member Functions

 VarElectionMessenger (String comID, int myID, Collection< String > neighbors, int minNbrLies)
 Constructor.
Public Member Functions inherited from frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >
Collection< MessageTypegetMsgTypes ()
void setQueue (Queue queue)
 LeaderElectionMaxID (String comID, T myID, Collection< String > neighbors, int nbrSteps)
 Constructor.
void notifyIn (Message msg)
 The actual algorithm.

Protected Member Functions

Integer getMaxID ()
Protected Member Functions inherited from frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >
getMaxID ()

Private Member Functions

int nbLies (int minNbLies)
 Compute the number of times the variable will lie.

Private Attributes

int nbrTruthfulSteps
 The number of last steps during which the variable tells the truth.
Random rand
 A random stream.

Additional Inherited Members

Static Public Attributes inherited from frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >
static MessageType START_MSG_TYPE
 The type of the message used to tell the protocol to start.
static final MessageType LE_MSG_TYPE
 The type of the messages used to carry agent IDs.
static final MessageType OUTPUT_MSG_TYPE
 The type of the output message.
Protected Attributes inherited from frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >
myID
 This agent's ID.
maxID
 Current computed maximum ID.
int stepCountdown
 Index of the current step in the protocol, decremented until it reaches 0.

Detailed Description

A version of LeaderElectionMaxID that uses random numbers as IDs and lies in order to protect topology privacy.

Author
Eric Zbinden, Thomas Leaute

Constructor & Destructor Documentation

◆ VarElectionMessenger()

frodo2.algorithms.varOrdering.election.VarElectionMessenger.VarElectionMessenger ( String comID,
int myID,
Collection< String > neighbors,
int minNbrLies )

Constructor.

Parameters
comIDcommunication ID used to identify this agent as the sender of messages
myIDID that uniquely identifies this agent
neighborsthe neighbors of this agent
minNbrLiesMinimal authorized number of lies.
Note
minNbrLies must be an upper bound the diameter of the largest component of the constraint graph for the algorithm to work properly.

References frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.comID, frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.myID, nbLies(), and frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.neighbors.

Here is the call graph for this function:

Member Function Documentation

◆ getMaxID()

Integer frodo2.algorithms.varOrdering.election.VarElectionMessenger.getMaxID ( )
protected

◆ nbLies()

int frodo2.algorithms.varOrdering.election.VarElectionMessenger.nbLies ( int minNbLies)
private

Compute the number of times the variable will lie.

Parameters
minNbLiesthe minimal number of lies.
Returns
value between minNbLies and (2*minNbLies)

References rand.

Referenced by VarElectionMessenger().

Member Data Documentation

◆ nbrTruthfulSteps

int frodo2.algorithms.varOrdering.election.VarElectionMessenger.nbrTruthfulSteps
private

The number of last steps during which the variable tells the truth.

◆ rand

Random frodo2.algorithms.varOrdering.election.VarElectionMessenger.rand
private

A random stream.

Referenced by getMaxID(), and nbLies().


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