NAME
Vote::Count::IRV
VERSION 0.013
IRV
Implements Instant Runoff Voting.
SYNOPSIS
use Vote::Count::Method::IRV;
use Vote::Count::ReadBallots 'read_ballots';
my $Election = Vote::Count::Method::IRV->new(
BallotSet => read_ballots('%path_to_my_ballots'), );
my $result = $Election->RunIRV();
my $winner = $result->{'winner'};
say $Election->logv(); # Print the full Log.
Method Summary
Instant Runoff Voting Looks for a Majority Winner. If one isn't present the choice with the lowest Top Count is removed.
Instant Runoff Voting is easy to count by hand and meets the Later Harm and Condorcet Loser Criteria. It, unfortunately, fails a large number of consistency criteria; the order of candidate dropping matters and small changes to the votes of non-winning choices that result in changes to the dropping order can change the outcome.
Tie Handling
If there is a tie for lowest Top Count this implementation removes all of the tied choices, or returns a tie when all choices are tied for lowest.
At present there is no interface to set a tie breaker, it is a planned feature enhancement to change this in a future release.
Your Election Rules should specify Eliminate All for ties.
There is no standard accepted method for IRV tie resolution, Eliminate All is a common one.
RunIRV
$ElectionRunIRV();
$ElectionRunIRV( $active )
Runs IRV on the provided Ballot Set. Takes an optional parameter of $active which is a hashref for which the keys are the currently active choices.
Returns results in a hashref which will be the results of Vote::Count::TopCount->EvaluateTopCountMajority, if there is no winner hash will instead be: tie => [true or false], tied => [ array of tied choices ], winner => a false value
Supports the Vote::Count logt, logv, and logd methods for providing details of the method.
BUG TRACKER
https://github.com/brainbuz/Vote-Count/issues
AUTHOR
John Karr (BRAINBUZ) brainbuz@cpan.org
CONTRIBUTORS
Copyright 2019 by John Karr (BRAINBUZ) brainbuz@cpan.org.
LICENSE
This module is released under the GNU Public License Version 3. See license file for details. For more information on this license visit http://fsf.org.