|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
A version of LeaderElectionMaxID that uses random numbers as IDs and lies in order to protect topology privacy. More...

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< MessageType > | getMsgTypes () |
| 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 > | |
| T | 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 > | |
| T | myID |
| This agent's ID. | |
| T | maxID |
| Current computed maximum ID. | |
| int | stepCountdown |
| Index of the current step in the protocol, decremented until it reaches 0. | |
A version of LeaderElectionMaxID that uses random numbers as IDs and lies in order to protect topology privacy.
| frodo2.algorithms.varOrdering.election.VarElectionMessenger.VarElectionMessenger | ( | String | comID, |
| int | myID, | ||
| Collection< String > | neighbors, | ||
| int | minNbrLies ) |
Constructor.
| comID | communication ID used to identify this agent as the sender of messages |
| myID | ID that uniquely identifies this agent |
| neighbors | the neighbors of this agent |
| minNbrLies | Minimal authorized number of lies. |
References frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.comID, frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.myID, nbLies(), and frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.neighbors.

|
protected |
References frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.maxID, frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.myID, rand, and frodo2.algorithms.varOrdering.election.LeaderElectionMaxID< Integer >.stepCountdown.
|
private |
Compute the number of times the variable will lie.
| minNbLies | the minimal number of lies. |
References rand.
Referenced by VarElectionMessenger().
|
private |
The number of last steps during which the variable tells the truth.
|
private |
A random stream.
Referenced by getMaxID(), and nbLies().