From eaf864062d914dfa3aa5019819c71ffce056aba5 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Tue, 7 Feb 2023 21:12:26 +1100 Subject: [PATCH] Implement --exclusion first_prefs_then_by_value --- docs/options.md | 1 + html/index.html | 3 +- src/cli/stv.rs | 4 +- src/stv/gregory/mod.rs | 124 +++++++++++++++++++++++++++-------------- src/stv/mod.rs | 4 +- src/stv/options.rs | 6 +- 6 files changed, 95 insertions(+), 47 deletions(-) diff --git a/docs/options.md b/docs/options.md index 7a41598..83cd94b 100644 --- a/docs/options.md +++ b/docs/options.md @@ -120,6 +120,7 @@ When *Surplus method* is set to a Gregory method, this option controls how candi * *Single stage* (default): When excluding candidate(s), transfer all their ballots in one stage. * *By value*: When excluding candidate(s), transfer their ballots in descending order of accumulated transfer value. Each transfer of all ballots of a certain transfer value forms a separate stage, i.e. if a transfer allows another candidate to meet the quota, no further ballots are transferred to that candidate. +* *FPV then by value*: When excluding candidate(s), transfer their first preference ballot papers in the first stage, then transfer ballot papers received on transfers as in *By value*. * *By source*: When excluding candidate(s), transfer their ballots according to the candidate from which those ballots were received, in the order the transferring candidates were elected or excluded. Each transfer of all ballots received from a certain candidate forms a separate stage. * *By parcel (by order)*: When excluding a candidate, transfer their ballot ballots one parcel at a time, in the order each was received. Each parcel forms a separate stage. This option cannot be combined with bulk exclusion. * *Reset and re-iterate*: When excluding candidate(s), reset the count from the distribution of first preferences, disregarding the excluded candidates. diff --git a/html/index.html b/html/index.html index 5c6247c..395f389 100644 --- a/html/index.html +++ b/html/index.html @@ -1,6 +1,6 @@