-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Issue Description:
The current implementation does not follow the legally mandated procedure for transferring surplus votes according to the
Scottish STV rules. The algorithm uses a "whole ballot weighting" method, which is incorrect.
Current Behavior:
When a candidate is elected with a surplus, the writeInVoteWeight function calculates a transfer value and multiplies the
entire weight of every ballot that voted for that candidate by this value. This incorrectly diminishes the value of the
vote that was used to elect the winner.
Expected Behavior:
According to Rule 48 of the Scottish Local Government Elections Order 2007, the surplus transfer must be handled using a
parcel-based system. The process should be:
- Calculate the surplus value for the elected candidate.
- Calculate a transfer value: (Surplus / Total Votes for Candidate), truncated to 5 decimal places.
- For each ballot paper voting for the winner, a new fractional vote (a "parcel") is created for the next available
preference. The value of this new parcel is (Original Ballot Weight * Transfer Value), again truncated to 5 decimal
places. - The portion of the vote that was used to elect the candidate remains with that candidate and is not transferred.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels