use Vote::Count::Method::WIGM; use Vote::Count::ReadBallots 'read_ballots'; my $ballotset = read_ballots('t/data/Scotland2012/Cumbernauld_South.txt'); my $Cumbernauld = Vote::Count::Method::WIGM->new( Seats => 4, BallotSet => $ballotset, VoteValue => 100000, # default LogTo => '/tmp/cumbernauld_south_2012', ); # Run the Election $D->WIGRun(); # Write the Human Readable Logs $D->WriteLog(); # Write the Events in JSON and YAML $D->WriteSTVEvent();
Implements Weighted Improved Gregory Single Transferable Vote based on Scotland's rules.
Run and log the Election.
The Scottish Rules specify 5 decimal places, a weight of 100,000 is used which is equivalent.
When more than one choice is Pending the rules call for a full Stage to elect each of them. Pending Choices cannot recieve additional votes, this implementation elects, charges, and rebates the Pending Choices, then starts a new Round. The final result will be the same, but Vote::Count::Method::WIGM rounds will not always match the stages of the Hand Count rules.
Small discrepencies with the stages data available for testing have been seen, which are likely to be rounding issues. Until further review can be taken, this code should be considered a preview.
John Karr (BRAINBUZ) firstname.lastname@example.org
Copyright 2019-2021 by John Karr (BRAINBUZ) email@example.com.
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.
This software is provided as is, per the terms of the GNU Public License. Professional support and customisation services are available from the author.