LightVoting
|
Created by sophie on 21.02.17. More...
Inherits IBaseAgent< CChairAgent >.
Classes | |
class | CChairAgentGenerator |
Class CChairAgentGenerator. More... | |
Public Member Functions | |
CChairAgent (final String p_name, final IAgentConfiguration< CChairAgent > p_configuration, final CEnvironment p_environment, final String p_grouping, final String p_protocol, final String p_fileName) | |
constructor of the agent More... | |
final CChairAgent | call () throws Exception |
void | checkConditions () |
check conditions More... | |
void | computeResult () |
compute result of election More... | |
String | name () |
void | perceiveGroup () |
perceive group More... | |
void | removeVoter () |
remove most dissatisfied voter More... | |
void | startElection () |
start election More... | |
void | storeDiss (final String p_name, final Double p_diss, final Integer p_iteration) |
store dissatisfaction value More... | |
void | storeVote (final String p_agentName, final BitVector p_vote) |
store vote More... | |
Private Member Functions | |
CGroup | determineGroup () |
int | getMaxIndex (final List< Double > p_dissValues) |
BitVector | toBV (final AtomicIntegerArray p_vote) |
Private Attributes | |
List< CVotingAgent > | m_agents |
List< BitVector > | m_bitVotes |
List< Double > | m_dissList |
double | m_dissThreshold = 1.1 |
List< CVotingAgent > | m_dissVoters |
final CEnvironment | m_environment |
environment More... | |
final String | m_fileName |
String | m_grouping |
grouping algorithm: "RANDOM" or "COORDINATED" More... | |
int | m_iteration |
boolean | m_iterative |
final String | m_name |
name of chair More... | |
String | m_protocol |
Definition at line 63 of file CChairAgent.java.
org.lightvoting.simulation.agent.CChairAgent.CChairAgent | ( | final String | p_name, |
final IAgentConfiguration< CChairAgent > | p_configuration, | ||
final CEnvironment | p_environment, | ||
final String | p_grouping, | ||
final String | p_protocol, | ||
final String | p_fileName | ||
) |
p_configuration | agent configuration of the agent generator |
p_grouping | grouping algorithm |
p_protocol | voting protocol |
p_fileName | h5 file |
Definition at line 101 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_agents, org.lightvoting.simulation.agent.CChairAgent.m_bitVotes, org.lightvoting.simulation.agent.CChairAgent.m_dissList, org.lightvoting.simulation.agent.CChairAgent.m_dissVoters, org.lightvoting.simulation.agent.CChairAgent.m_environment, org.lightvoting.simulation.agent.CChairAgent.m_fileName, org.lightvoting.simulation.agent.CChairAgent.m_grouping, org.lightvoting.simulation.agent.CChairAgent.m_iteration, org.lightvoting.simulation.agent.CChairAgent.m_iterative, org.lightvoting.simulation.agent.CChairAgent.m_name, and org.lightvoting.simulation.agent.CChairAgent.m_protocol.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgentGenerator.generatesingle().
final CChairAgent org.lightvoting.simulation.agent.CChairAgent.call | ( | ) | throws Exception |
Definition at line 122 of file CChairAgent.java.
void org.lightvoting.simulation.agent.CChairAgent.checkConditions | ( | ) |
add literal for group of chair agent if it exists
Definition at line 159 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_iteration, org.lightvoting.simulation.agent.CChairAgent.m_iterative, and org.lightvoting.simulation.environment.CGroup.readyForElection().
void org.lightvoting.simulation.agent.CChairAgent.computeResult | ( | ) |
Definition at line 260 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_bitVotes, org.lightvoting.simulation.agent.CChairAgent.m_grouping, org.lightvoting.simulation.agent.CChairAgent.m_iteration, org.lightvoting.simulation.agent.CChairAgent.m_iterative, org.lightvoting.simulation.agent.CChairAgent.m_protocol, org.lightvoting.simulation.environment.CGroup.updateBasic(), and org.lightvoting.simulation.environment.CGroup.updateIterative().
|
private |
Definition at line 193 of file CChairAgent.java.
|
private |
Definition at line 392 of file CChairAgent.java.
String org.lightvoting.simulation.agent.CChairAgent.name | ( | ) |
Definition at line 130 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_name.
void org.lightvoting.simulation.agent.CChairAgent.perceiveGroup | ( | ) |
add literal for group of chair agent if it exists
Definition at line 145 of file CChairAgent.java.
References org.lightvoting.simulation.environment.CEnvironment.detectGroup(), and org.lightvoting.simulation.agent.CChairAgent.m_environment.
void org.lightvoting.simulation.agent.CChairAgent.removeVoter | ( | ) |
Definition at line 357 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_dissList, org.lightvoting.simulation.agent.CChairAgent.m_dissThreshold, org.lightvoting.simulation.agent.CChairAgent.m_iterative, and org.lightvoting.simulation.environment.CGroup.size().
void org.lightvoting.simulation.agent.CChairAgent.startElection | ( | ) |
Definition at line 208 of file CChairAgent.java.
void org.lightvoting.simulation.agent.CChairAgent.storeDiss | ( | final String | p_name, |
final Double | p_diss, | ||
final Integer | p_iteration | ||
) |
p_diss | dissatisfaction value |
p_iteration | iteration number |
Definition at line 325 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_dissList.
void org.lightvoting.simulation.agent.CChairAgent.storeVote | ( | final String | p_agentName, |
final BitVector | p_vote | ||
) |
p_vote | vote |
Definition at line 221 of file CChairAgent.java.
References org.lightvoting.simulation.agent.CChairAgent.m_bitVotes.
|
private |
Definition at line 244 of file CChairAgent.java.
|
private |
Definition at line 76 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent().
|
private |
Definition at line 89 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), org.lightvoting.simulation.agent.CChairAgent.computeResult(), and org.lightvoting.simulation.agent.CChairAgent.storeVote().
|
private |
Definition at line 85 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), org.lightvoting.simulation.agent.CChairAgent.removeVoter(), and org.lightvoting.simulation.agent.CChairAgent.storeDiss().
|
private |
Definition at line 87 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.removeVoter().
|
private |
Definition at line 86 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent().
|
private |
Definition at line 75 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), and org.lightvoting.simulation.agent.CChairAgent.perceiveGroup().
|
private |
Definition at line 90 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent().
|
private |
Definition at line 81 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), and org.lightvoting.simulation.agent.CChairAgent.computeResult().
|
private |
Definition at line 83 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), org.lightvoting.simulation.agent.CChairAgent.checkConditions(), and org.lightvoting.simulation.agent.CChairAgent.computeResult().
|
private |
Definition at line 88 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), org.lightvoting.simulation.agent.CChairAgent.checkConditions(), org.lightvoting.simulation.agent.CChairAgent.computeResult(), and org.lightvoting.simulation.agent.CChairAgent.removeVoter().
|
private |
Definition at line 69 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), and org.lightvoting.simulation.agent.CChairAgent.name().
|
private |
Definition at line 84 of file CChairAgent.java.
Referenced by org.lightvoting.simulation.agent.CChairAgent.CChairAgent(), and org.lightvoting.simulation.agent.CChairAgent.computeResult().