Criteria
RankChoiceVoting.CondorcetLoser
— TypeCondorcetLoser <: Condorcet
A Condorcet loser criterion object. The Condorcet loser criterion states that a voting system cannot selected acandiate who loses all pairwise comparisons cannot be selected.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criterion::CondorcetLoser, rankings::Ranks; _...)
Counts the number of violations of the Condorcet loser criterion for a given voting system. The count is either 0 or 1.
Arguments
system::VotingSystem
: a voting system objectcriterion::CondorcetLoser
: condorcet criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.satisfies
— Methodsatisfies(system::VotingSystem, criterion::CondorcetLoser, rankings::Ranks; _...)
Tests whether a voting system satisfies the Condorcet loser criterion.
Arguments
system::VotingSystem
: a voting system objectcriterion::CondorcetLoser
: condorcet loser criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.CondorcetWinner
— TypeCondorcetWinner <: Criterion
A Condorcet winner criterion object. The Condorcet criterion states that a candiate who wins all pairwise elections must also win the election using a given voting system.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criterion::CondorcetWinner, rankings::Ranks; _...)
Counts the number of violations of the Condorcet for a given voting system. The count is either 0 or 1.
Arguments
system::VotingSystem
: a voting system objectcriterion::CondorcetWinner
: condorcet criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.satisfies
— Methodsatisfies(system::VotingSystem, criterion::CondorcetWinner, rankings::Ranks; _...)
Tests whether a voting system satisfies the Condorcet winner criterion.
Arguments
system::VotingSystem
: a voting system objectcriterion::CondorcetWinner
: condorcet criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.Consistency
— TypeConsistency <: Criterion
A Consistency criterion object. According to the consistency criterion, if the votes are split into disjoint subsets, and the same candidate wins each subset, the system must select the same winner for the whole set of votes.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criterion::Consistency, rankings::Ranks; n_reps=1000, _...)
Uses Monte Carlo simulation to count the number of violations of the consistency criterion for a given voting system.
Arguments
system::VotingSystem
: a voting system objectcriterion::Consistency
: condorcet criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
Keywords
n_reps
: number of Monte Carlo simulations to perform
RankChoiceVoting.satisfies
— Methodsatisfies(system::VotingSystem, criterion::Consistency, rankings::Ranks; n_max=1000, _...)
Uses Monte Carlo simulation to test whether a voting system satisfies the Consistency criterion.
Arguments
system::VotingSystem
: a voting system objectcriterion::Consistency
: consistency criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
Keywords
n_reps
: maximum Monte Carlo simulations to perform
RankChoiceVoting.IIA
— TypeIIA <: Criterion
An object representing the independence of irrelevant alternatives IIA criterion. According to the IIA criterion, the winner of an election should not depend on the presence or absence of less prefered candidates. Although there are several variations in the implimentation of IIA, RankChoiceVoting.jl tests for violations of IIA by removing subsets of lossing candidates.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criterion::IIA, rankings::Ranks; _...)
Counts the number of violations of the IIA of Irrelevant alternatives criterion. There are several ways to test this criterion. Currently, it is tested by removing subsets of losing candidates and testing whether the winner changes. The function checks all possible combinations of subsets. Other methods could add and/or subtract candidates and test whether the rank order changes. The current method is less strict compared to alternative methods.
Arguments
system::VotingSystem
: a voting system objectcriterion::IIA
: IIA criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.satisfies
— Methodsatisfies(::Fails, system::VotingSystem, criterion::IIA, rankings::Ranks; _...)
Tests whether a voting system satisfies the IIA of Irrelevant alternatives criterion. There are several ways to test this criterion. Currently, it is tested by removing subsets of losing candidates and testing whether the winner changes. The function checks all possible combinations of subsets until the first violation is encountered. Other methods could add and/or subtract candidates and test whether the rank order changes. The current method is less strict compared to alternative methods.
Arguments
system::VotingSystem
: a voting system objectcriterion::IIA
: IIA criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.Majority
— TypeMajority <: Criterion
An object for the fairness criterion, majority. A voting system satisfies the majority criterion if it elects the candidate who recieves more than 50% first preferences.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criterion::Majority, rankings::Ranks; _...)
Counts the number of violations of the majority criterion for a given voting system.
Arguments
system::VotingSystem
: a voting system objectcriterion::Majority
: majority criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.satisfies
— Methodsatisfies(system::VotingSystem, criterion::Majority, rankings::Ranks; _...)
Tests whether a voting system satisfies the majority criterion.
Arguments
system::VotingSystem
: a voting system objectcriterion::Majority
: majority criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.Monotonicity
— TypeMonotonicity <: Criterion
An object for the fairness criterion monotonicity. A voting system that satisfies the monotonicity criterion cannot elect a different candidate by increasing votes (without otherwise changing the rank order) of a candidate who would otherwise win. In other words, redistributing more votes to the winner (without otherwise changing the rank order), should not prevent the winner from winning.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criteria::Monotonicity, rankings::Ranks; n_reps=1000, _...)
Uses Monte Carlo simulation to counts the number of violations of the monotonicity criterion for a given voting system.
Arguments
system::VotingSystem
: a voting system objectcriteria::Monotonicity
: condorcet criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
Keywords
n_reps=1000
: maximum number of Monte Carlo simulations to perform
RankChoiceVoting.satisfies
— Methodsatisfies(::Fails, system::VotingSystem, criteria::Monotonicity, rankings::Ranks; n_reps=1000, _...)
Uses Monte Carlo simulation to tests whether a voting system satisfies the monotonicity criterion.
Arguments
system::VotingSystem
: a voting system objectcriteria::Monotonicity
: monotonicity criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
Keywords
n_reps=1000
: maximum number of Monte Carlo simulations to perform while searching
for a violation
RankChoiceVoting.ReversalSymmetry
— TypeReversalSymmetry <: Criterion
An object for the fairness criterion reversal symmetry. According to the reversal systemetry criterion, a winner of an election cannot win if each voter's rankings are reversed.
RankChoiceVoting.count_violations
— Methodcount_violations(system::VotingSystem, criterion::ReversalSymmetry, rankings::Ranks; _...)
Counts the number of violations of the reversal symmetry criterion for a given voting system. The number of violations is either 0 or 1.
Arguments
system::VotingSystem
: a voting system objectcriterion::ReversalSymmetry
: reversal symmetry criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks
RankChoiceVoting.satisfies
— Methodsatisfies(system::VotingSystem, criterion::ReversalSymmetry, rankings::Ranks; _...)
Tests whether a voting system satisfies the reversal symmetry criterion.
Arguments
system::VotingSystem
: a voting system objectcriterion::ReversalSymmetry
: condorcet criterion objectrankings::Ranks
: a rank choice voting object consisting of rank counts and unique ranks