OpenTally/docs/options.md

310 lines
31 KiB
Markdown
Raw Normal View History

2021-06-13 08:32:21 +02:00
# Options and advanced options
## Preset
The preset dropdown allows you to choose from a hardcoded list of preloaded STV counting rules. These are:
| Method | Description | Exceptions | Validated |
|-|-|-|-|
2021-07-26 10:50:51 +02:00
| [OpenTally WIGM](https://yingtongli.me/blog/2021/07/24/opentally-wigm.html) | Recommended set of simple STV rules designed for computer counting, using the weighted inclusive Gregory method, exact quotas and rational arithmetic. | | |
| Scottish STV | Rules from the [*Scottish Local Government Elections Order 2011*](https://www.legislation.gov.uk/ssi/2011/399/schedule/1/made), using the weighted inclusive Gregory method. | | ✓ |
| Meek STV | Advanced STV rules designed for computer counting, recognised by the Proportional Representation Society of Australia (VictoriaTasmania) as the superior STV system. | | |
| • OpenTally Meek | Recommended rules for Meek STV. Operates according to the original 1987 HillWichmannWoodall Algorithm 123 specification ([*The Computer Journal* 1987;30(3):27781](https://www.dia.govt.nz/diawebsite.NSF/Files/meekm/%24file/meekm.pdf)), except that (a) ties are broken backwards then at random, (b) fixed-point arithmetic with 5 decimal places is used, and (c) candidates are elected on strictly exceeding the quota. | | ✓ |
| • Meek STV (2006) | Operates according to Hill's 2006 revisions ([*Voting Matters* 2006;(22):710](http://www.votingmatters.org.uk/ISSUE22/I22P2.pdf)). This is the algorithm referred to in OpenSTV/OpaVote as Meek STV, and forms the basis of New Zealand's Meek STV rules. | [E1] | ✓ |
2021-07-26 10:50:51 +02:00
| • Meek STV (New Zealand) | Operates according to Schedule 1A of the [*Local Electoral Regulations 2001*](https://www.legislation.govt.nz/regulation/public/2001/0145/latest/DLM57125.html). | [E1] | ✓ |
2021-08-03 08:44:26 +02:00
| Australian Senate STV | Rules from the [*Commonwealth Electoral Act 1918*](https://www.legislation.gov.au/Details/C2020C00400/Html/Text#_Toc59107700), using the unweighted inclusive Gregory method. | [E2] [E3] [E4] | ✓ |
| NSW Local Government STV | Rules from the [*Local Government (General) Regulation 2021*](https://legislation.nsw.gov.au/view/html/inforce/current/sl-2021-0460), using the weighted inclusive Gregory method. | [E2] [E5] | ✓ |
| Western Australia STV | Rules from the [*Electoral Act 1907* (WA)](https://www.legislation.wa.gov.au/legislation/prod/filestore.nsf/FileURL/mrdoc_29498.pdf/$FILE/Electoral%20Act%201907%20-%20[17-a0-06].pdf), using the weighted inclusive Gregory method. | [E2] [E3] | |
| Australian Capital Territory STV | Rules from the [*Electoral Act 1992* (ACT)](https://www.legislation.act.gov.au/View/a/1992-71/current/PDF/1992-71.PDF), using the exclusive Gregory method. | | ✓ |
| Minneapolis STV | Rules from chapter 167 of the [*Minneapolis Code of Ordinances*](https://library.municode.com/mn/minneapolis/codes/code_of_ordinances?nodeId=COOR_TIT8.5EL_CH167MUELRUCO), using the weighted inclusive Gregory method. | [E6] | ✓ |
2021-08-05 13:37:06 +02:00
| Cambridge STV | Rules in force in Cambridge, Massachusetts, using random sample transfers. These rules are derived from the [former chapter 54A of the Massachusetts General Laws](https://www.cambridgema.gov/-/media/Files/electioncommission/massachusettsgenerallawschapter54a.pdf), but have by regulation been modified to incorporate the procedures set out in Article IX of the former [1938 Charter of the City of Cincinnati](https://catalog.hathitrust.org/Record/001754258). See also [here](https://web.archive.org/web/20081118104049/http://www.fairvote.org/media/1993countmanual.pdf). | | ✓ |
| Dáil Éireann STV | Rules from the [*Electoral Act 1992* (Ireland)](http://www.irishstatutebook.ie/eli/1992/act/23/enacted/en/print), using stratified random sample transfers. | [E4] [E7] | ✓ |
| [Wright STV](https://www.aph.gov.au/Parliamentary_Business/Committees/House_of_Representatives_Committees?url=em/elect07/subs/sub051.1.pdf) | Rules proposed by Anthony van der Craats designed for computer counting, involving reset and re-iteration of the count after each candidate exclusion. | | ✓ |
| [PRSA 1977](https://www.prsa.org.au/rule1977.htm) | Simple rules designed for hand counting, using the exclusive Gregory method, with counting performed in thousandths of a vote. | | ✓ |
| [ERS97](https://www.electoral-reform.org.uk/latest-news-and-research/publications/how-to-conduct-an-election-by-the-single-transferable-vote-3rd-edition/) | More complex rules designed for hand counting, using the exclusive Gregory method. | [E8] | ✓ |
| • ERS76 | Former rules from the 1976 2nd edition. | [E8] [E9] | ✓ |
| • ERS73 | Former rules from the 1973 1st edition. | [E8] [E9] | |
| Church of England | Rules from the Church of England [*Single Transferable Vote Rules 2020*](https://www.churchofengland.org/sites/default/files/2020-02/STV%20Rules%202020%20-%20final.pdf), similar to ERS73. | | ✓ |
Exceptions:
2021-10-27 16:23:33 +02:00
* [E1] When generating random numbers, OpenTally uses a [deterministic random number generator based on SHA-256](https://yingtongli.me/git/OpenTally/about/docs/rng.md), rather than the WichmannHill(-based) algorithm.
* [E2] When breaking ties backwards, OpenTally selects the candidate who had more/fewer votes at the last stage when *any* tied candidate had more/fewer votes, rather than the method described in the legislation (when each all had unequal votes). The OpenTally developers regard the method described in the legislation as a defect. For an independent discussion, see <a href="https://dl.acm.org/doi/10.1145/3014812.3014837">Conway et al.</a>
* [E3] A tie between 2 candidates for the final vacancy will be broken backwards then at random, rather than the method described in the legislation.
2021-09-14 14:47:35 +02:00
* [E4] Bulk exclusion is not performed, as the prescribed rules are more conservative than OpenTally's. See also the section on *Bulk exclusion* for further discussion.
* [E5] The legislation is drafted such that a consistent interpretation is impossible see <a href="https://github.com/AndrewConway/ConcreteSTV/blob/main/nsw/NSWLocalCouncilLegislation2021Commentary.md">Conway</a> for a discussion. In practice, the New South Wales Electoral Commission has applied the by parcel method of rounding subtransfers, which OpenTally follows.
* [E6] The mathematically eliminated by the sum of all ranked-choice votes comparison is not implemented.
* [E7] The quarter of a quota provision is disregarded when determining whether to defer surplus distributions.
* [E8] No distinction is made between stages and substages (during exclusion). This affects only the numbering of stages and not the result.
* [E9] By default, the quota is always calculated to 2 decimal places. For full ERS76 (ERS73) compliance, set *Round quota to 0 d.p.* when the quota is more than 100 (100 or more).
2021-06-13 08:32:21 +02:00
2021-10-27 16:23:33 +02:00
For details of validation, see [validation.md](https://yingtongli.me/git/OpenTally/about/docs/validation.md).
2021-06-13 08:32:21 +02:00
This functionality is not available on the command line.
## Quota-related options
### Quota (-q/--quota)
The quota dropdowns allow you to define the quota used in the election, and the quota criterion used to elect candidates. The quota may be set to:
* *Droop* (default) and *Droop (exact)*: *V*/(*S*+1)
2021-06-13 08:32:21 +02:00
* *Hare* and *Hare (exact)*: *V*/*S*
where *V* is the number of votes and *S* is the number of seats.
The *(exact)* version of each quota has effect only if *Round quota to [n] d.p.* is enabled. When that setting is enabled, *Droop* and *Hare* will increment the quota up to the next available rounded unit (even if the quotient is exact already), while the *(exact)* versions will round the quota up if and only if the quotient is not already exact.
2021-08-23 06:26:39 +02:00
When *Round quota to [n] d.p.* is not enabled, or when the exact form is used, the Droop quota is also known as the NewlandBritton or Hagenbach-Bischoff quota.
2021-06-13 08:32:21 +02:00
### Quota criterion (-c/--quota-criterion)
The quota criterion may be set to *>=* (candidates are elected if they meet or exceed the quota) or *>* (default; candidates are elected only if they strictly exceed the quota).
2021-06-13 08:32:21 +02:00
Note that the combination *>= Droop (exact)* (or, when *Round quota to [n] d.p.* is disabled, *>= Droop*) can result in more candidates meeting the quota than there are available vacancies, hence this particular combination is not recommended.
2021-06-13 08:32:21 +02:00
### Quota mode (--quota-mode)
This option allows you to specify whether the votes required for election can change during the count. The options are:
* *Static quota* (default): The quota is calculated once after all first-preference votes are allocated, and remains constant throughout the count.
2021-08-09 11:56:51 +02:00
* *Static with ERS97/ERS76 rules*: The quota is static, but candidates may be elected if their vote exceeds (or equals, according to the *Quota criterion*) the active vote, divided by one more than the number of remaining vacancies (with minor variations in details between ERS97 and ERS76). Additionally, under ERS97 rules, the quota is reduced if ballot papers exhaust before any candidate is elected.
2021-08-08 11:34:02 +02:00
* *Dynamic by total vote*: The quota is recalculated at the end of each stage, according to the *Quota* option.
* *Dynamic by active vote*: The quota is recalculated at the end of each stage, according to the *Quota* option, but where *V* is the active vote and *S* is the number of remaining vacancies.
2021-06-13 08:32:21 +02:00
2021-08-08 11:34:02 +02:00
When a dynamic quota is used, then unless *Surplus method* is set to *Meek*, the quota that applies to an elected candidate is the quota at the start of the stage when the candidate's surplus is distributed. Further distributions are not performed later, even if the quota is later reduced.
2021-06-16 09:20:29 +02:00
2021-06-13 08:32:21 +02:00
## STV variants
### Surplus order (--surplus-order)
This dropdown allows you to select in what order surpluses are distributed:
* *By size* (default): When multiple candidates exceed the quota, the largest surplus is transferred (even if it arose at a later stage of the count).
* *By order*: When multiple candidates exceed the quota, the surplus of the candidate elected first is transferred (even if it is smaller than another). Candidates are always declared elected in descending order of number of votes.
Some STV counting rules provide, for example, that no surplus shall be transferred before a surplus that arose earlier in the counting whether larger or not (PRSA 1977). In this case, the option *By order* should be selected.
### Surplus method (-s/--surplus)
This dropdown allows you to select how ballots are transferred during surplus transfers. The recommended methods are:
* *Weighted inclusive Gregory* (default): During surplus transfers, all applicable ballot papers of the elected candidate are examined. Transfers are weighted according to the values of the ballot papers.
2021-06-16 09:20:29 +02:00
* *Meek method*: Transfers are computed as described at <http://www.dia.govt.nz/diawebsite.NSF/Files/meekm/%24file/meekm.pdf>.
2021-06-13 08:32:21 +02:00
Other Gregory methods are supported, but not recommended:
2021-06-13 08:32:21 +02:00
* *Unweighted inclusive Gregory*: During surplus transfers, all applicable ballot papers of the elected candidate are examined. Transfers are not weighted, and each ballot paper has equal value in the calculation.
* *Exclusive Gregory (last bundle)*: During surplus transfers, only the ballot papers received in the last transfer (all of one value) are examined.
2021-06-13 08:32:21 +02:00
Random sample methods are also supported, but also not recommended:
* *Hare (exclusive sample)*: During surplus transfers, a subset of the ballot papers received in the last transfer, equal in size to the surplus, is examined.
* *Inclusive Hare (sample)*: During surplus transfers, a subset of the elected candidate's ballot papers, equal in size to the surplus, is examined.
A random sample method will usually be used with a *Quota criterion* set to *>=*.
### Papers to examine in surplus transfer (--transferable-only/--subtract-nontransferable)
2021-06-13 08:32:21 +02:00
* *Include non-transferable papers* (default): When this option is selected, all ballot papers of the transferring candidate are examined. Non-transferable papers are always exhausted at the relevant surplus fractions. This is the method typically used with the weighted inclusive Gregory or Meek methods.
* *Use transferable papers only* (--transferable-only): When this option is selected, only transferable papers of the transferring candidate are examined. Non-transferable papers are exhausted only if the value of the transferable papers is less than the surplus. This is the method typically used with other surplus distribution methods.
* *Subtract non-transferables* (--transferable-only --subtract-nontransferable): Same as *Use transferable papers only*, but the value of the transferable papers is calculated by subtracting the value of non-transferable papers from the progress total. This has effect only as far as concerns rounding.
2021-06-13 08:32:21 +02:00
### (Gregory) Exclusion method (--exclusion)
When *Surplus method* is set to a Gregory method, this option controls how candidates are excluded:
2021-06-13 08:32:21 +02:00
2021-07-19 15:15:17 +02:00
* *Single stage* (default): When excluding candidate(s), transfer all their ballot papers in one stage.
2021-08-23 06:26:39 +02:00
* *By value*: When excluding candidate(s), transfer their ballot papers 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 papers are transferred to that candidate.
* *By source*: When excluding candidate(s), transfer their ballot papers according to the candidate from which those papers 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.
2021-07-19 15:15:17 +02:00
* *By parcel (by order)*: When excluding a candidate, transfer their ballot papers 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.
2021-06-22 08:33:34 +02:00
* *Wright method (re-iterate)*: When excluding candidate(s), reset the count from the distribution of first preferences, disregarding the excluded candidates.
2021-06-13 08:32:21 +02:00
### (Meek) NZ-style exclusion (--meek-nz-exclusion)
When *Surplus method* is set to *Meek method*, this option controls how candidate keep values are updated when candidates are excluded:
* When NZ-style exclusion is disabled (default), the excluded candidate's keep value is immediately reduced to 0. This is the method specified in the 1987 and 2006 Meek rules.
* When NZ-style exclusion is enabled, all elected candidates' keep values are first updated by one further iteration; only then is the excluded candidate's keep value reduced to 0. This is the method specified in the New Zealand *Local Electoral Regulations 2001*.
### (Sample) Sample method (--sample)
When *Surplus method* is set to a random sample method, this option controls which subset of ballot papers is selected for transfer during surplus distributions:
* *Stratify* (default): The candidate's ballot papers are first stratified into subparcels according to next available preference, and an equal proportion of each subparcel is transferred, with the subset transferred comprising the ballot papers in each subparcel most recently received by the candidate. In the calculation of proportions, the largest remainders are rounded up so there is no loss by fraction. This is the method specified by the [*Electoral Act 1992* (Ireland)](http://www.irishstatutebook.ie/eli/1992/act/23/section/121/enacted/en/html#sec121).
* *By order*: The subset transferred comprises the ballot papers most recently received by the candidate.
* *Cincinnati*: The subset is selected using the deterministic method used in [Cambridge, Massachusetts](https://web.archive.org/web/20081118104049/http://www.fairvote.org/media/1993countmanual.pdf) (derived from Article IX of the former 1938 Cincinnati *Code of Ordinances*).
In any case, the subset selected depends on the order of ballot papers in the BLT file, and is independent of the *Random seed* option.
### (Sample) Transfer ballot-by-ballot (--sample-per-ballot)
When *Surplus method* is set to a random sample method, this option controls when candidates are declared elected:
* When ballot-by-ballot transfer is disabled (default), candidates are declared elected only at the end of a stage, as usual.
* When ballot-by-ballot transfer is enabled, candidates are declared elected immediately on meeting the quota after the transfer of any single ballot paper. Consequential surpluses therefore do not arise, and surpluses only occur during the count of first preferences.
2021-06-13 08:32:21 +02:00
### Ties (-t/--ties)
This dropdown allows you to select how ties (in surplus transfer or exclusion) are broken. The options are:
* *Backwards*: Ties are broken according to which tied candidate had the most/fewest votes at the end of the *previous* stage. If a tie for most/fewest votes exists in the previous stage also, that tie is broken based on the next previous stage, and so on. This is the method specified, for example, by the [*Electoral Act 1992* (ACT)](https://www.legislation.act.gov.au/View/a/1992-71/current/PDF/1992-71.PDF).
* *Fowards*: Ties are broken according to which tied candidate had the most/fewest votes at the end of the *earliest* stage where one tied candidate had more/fewer votes than the others, if such a stage exists. This is also known as the ahead at first difference method.
2021-06-13 08:32:21 +02:00
* *Random*: Ties are broken at random (see *Random seed*).
* *Prompt*: The user is prompted to break the tie.
Multiple tie breaking methods can be specified. If the first method cannot resolve the tie, the next is tried, and so on. In the web application, 4 options are available (*Backwards then random*, *Forwards then random*, *Random* and *Prompt*). On the command line, the `--ties` option can take multiple arguments (e.g. `--ties backwards random`).
### Random seed (--random-seed)
This option allows you to input an arbitrary value to seed the deterministic random number generator used to break ties when *Ties* is set to *Random*. When the same seed value is used, ties will always be broken in the same way, allowing the breaking of ties to be independently verified.
The default value is the current date, formatted YYYYMMDD.
2021-10-27 16:23:33 +02:00
The algorithm used by the random number generator is specified at [rng.md](https://yingtongli.me/git/OpenTally/about/docs/rng.md).
2021-06-13 08:32:21 +02:00
2021-06-27 15:13:39 +02:00
## Constraints (--constraints)
This file selector allows you to load a [CON file](https://yingtongli.me/git/OpenTally/about/docs/con-fmt.md) specifying constraints on the election. For example, if a certain minimum or maximum number of candidates can be elected from a particular category.
2021-06-27 15:13:39 +02:00
### Constraint method (--constraint-method)
This dropdown allows you to select how constraints are applied. The options are:
*Guard/doom* (default):
When this option is selected, OpenTally applies constraints using the GreyFitzgerald method. Whenever a candidate is declared elected or excluded, any candidate who must be elected to secure a conformant result is deemed *guarded*, and any candidate who must not be elected to secure a conformant result is deemed *doomed*. Any candidate who is doomed is excluded at the next opportunity. Any candidate who is guarded is prevented from being excluded.
2021-06-27 15:13:39 +02:00
Multiple constraints are supported using the method described by Hill ([*Voting Matters* 1998;(9):24](http://www.votingmatters.org.uk/ISSUE9/P1.HTM)) and Otten ([*Voting Matters* 2001;(13):47](http://www.votingmatters.org.uk/ISSUE13/P3.HTM)).
2021-06-27 15:13:39 +02:00
*Repeat count*:
When this option is selected, only constraints specifying a maximum number of candidates to be elected from a particular group are supported. Other constraint groups will be **silently ignored**. Note that each candidate must still be assigned to exactly one group within each constraint.
The count proceeds as normal, until the point that a candidate would be elected who would violate the constraint. At this point, that candidate and all other candidates from the constrained group are excluded, and all previously excluded candidates from the non-constrained group are reintroduced.
All ballot papers are removed from the count, and redistributed among the candidates in the following order:
* Any undistributed surpluses, each surplus comprising one stage
* Any exhausted ballot papers, in one or more stages (according to *Exclusion method*)
* The ballot papers of each continuing candidate from the non-constrained group, in one or more stages (according to *Exclusion method*), candidate-by-candidate in random order or an order specified by the user (according to *Ties*, with options other than *Random* and *Prompt* ignored)
* The ballot papers of each continuing candidate from the constrained group, in like manner
Once all ballot papers have been so redistributed, the count resumes as usual.
This method is specified, for example, in Schedule 1.1 of the [Monash Student Association *Election Regulations* (2021)](https://msa.monash.edu/app/uploads/2021/07/MSA-Election-Regulations-2021.pdf).
2021-08-16 10:48:49 +02:00
## Report options
### Report style
* *Votes only*: The result sheet displays the number of votes held by each candidate at each stage of the count.
2021-08-22 09:53:55 +02:00
* *Votes (transposed)*: Same as *Votes only*, but transfers are displayed to the left of, rather than above, progress totals.
2021-08-16 10:48:49 +02:00
* *Ballots and votes*: The result sheet displays the number of votes *and ballot papers* held by each candidate at each stage of the count.
This functionality is not available on the command line.
### Display up to [n] d.p. (--pp-decimals)
This option allows you to specify to how many decimal places votes will be reported in the results report. It does not affect the internal precision of calculations.
2021-06-13 08:32:21 +02:00
## Numeric representation
### Numbers (-n/--numbers), Decimal places (--decimals)
This dropdown allows you to select how numbers (vote totals, etc.) are represented internally in memory. The options are:
* *Fixed*: Numbers are represented as fixed-precision decimals, up to a certain number of decimal places (default: 5).
* *Fixed (guarded)*: Numbers are represented as fixed-precision decimals with guard digits also known as [quasi-exact arithmetic](http://www.votingmatters.org.uk/ISSUE24/I24P2.pdf). If *n* decimal places are requested, numbers are represented up to 2*n* decimal places, and two values are considered equal if the absolute difference is less than (10<sup>*n*</sup>)/2.
* *Rational* (default): Numbers are represented exactly as fractions, resulting in the elimination of rounding error, but increasing computational complexity when the number of surplus transfers is very large.
2021-06-13 08:32:21 +02:00
* *Float (64-bit)*: Numbers are represented as native 64-bit floating-point numbers. This is fast, but not recommended as unexpectedly large rounding errors may be introduced in some circumstances.
## Count optimisations
2021-06-27 15:13:39 +02:00
### Early bulk election (--no-early-bulk-elect)
2021-06-22 16:52:25 +02:00
2021-07-20 16:45:10 +02:00
When early bulk election is enabled (default), the count terminates as soon as the set of winning candidates is known. Specifically:
2021-06-22 16:52:25 +02:00
* At the beginning of each stage, if the number of continuing candidates exactly equals the number of remaining vacancies, all continuing candidates are declared elected in a single stage. This is typical of most STV rules.
* If a proposed exclusion would cause the number of continuing candidates to exactly equal the number of remaining vacancies, all other continuing candidates are declared elected without transfers arising from the proposed exclusion being performed.
* At the end of any stage, if *n* vacancies remain and the *n*-th top continuing candidate has more votes than all lower continuing candidates (plus votes awaiting transfer), the *n* top continuing candidates are immediately declared elected.
2021-07-20 16:45:10 +02:00
2021-08-08 10:59:36 +02:00
If an early bulk election is performed, further surplus distributions are not performed, and outstanding exclusions are not completed, even if they could change the order of election.
2021-07-20 16:45:10 +02:00
When early bulk election is disabled, surpluses continue to be distributed, and outstanding exclusions continue to be completed, even once the number of continuing candidates exactly equals the number of remaining vacancies. Bulk election is performed only as a final measure once there are no more surpluses to distribute, and no exclusions to complete.
2021-06-22 16:52:25 +02:00
In either case, candidates are declared elected in descending order of votes. This ensures that only one candidate is ever elected at a time and the order of election is well-defined, which is required e.g. for affirmative action rules.
2021-06-22 16:52:25 +02:00
Note that the OpenTally rules for early bulk election are aggressive, and many STV rules do not implement all 3 (if any at all). It is not possible at this time to selectively apply only some of the rules. In order to reproduce the result of a count performed by others, where not all rules were implemented, consider disabling early bulk election and comparing the results at the time a bulk election would have been made.
2021-06-13 08:32:21 +02:00
### Bulk exclusion (--bulk-exclude)
When bulk exclusion is disabled (default), only one candidate is ever excluded per stage.
2021-08-03 08:44:26 +02:00
When bulk exclusion is enabled, as many candidates as possible are excluded together in each single stage, provided that sufficient candidates remain to fill the vacancies, and the bulk exclusion could not change the order of exclusion. If 2 or more candidates are tied, either all are bulk excluded or none are. The ballot papers of all excluded candidates are considered together, and transferred according to the *Exclusion method*.
2022-03-11 05:44:49 +01:00
Note that some rules (such as the Australian Senate rules) provide for more conservative bulk exclusion which additionally requires that the bulk exclusion cannot cause a candidate to be elected. This form of bulk exclusion accordingly cannot change the result compared with no bulk exclusion (except as far as rounding or parcelling may be concerned), and is not currently supported.
2021-06-13 08:32:21 +02:00
### Defer surpluses (--defer-surpluses)
When deferred surpluses is disabled (default), all surpluses must be transferred before candidates can be excluded.
2022-03-11 05:44:49 +01:00
When deferred surpluses is enabled, the transfer of all surpluses is deferred if doing so could not change the next exclusion (including a bulk exclusion, if that is enabled).
2021-06-13 08:32:21 +02:00
2021-08-07 10:51:48 +02:00
### Immediate election (--no-immediate-elect)
2021-08-07 10:51:48 +02:00
When *Surplus method* is set to a Gregory or random sample method, this option controls when candidates are elected:
2021-08-07 10:51:48 +02:00
* When immediate election is enabled (default), a candidate is declared at the end of the stage once reaching the quota. This is typical of most STV rules.
* When immediate election is disabled, a candidate is declared elected only once their surplus is transferred. This is the method specified by the Minneapolis rules.
Likewise, when *Surplus method* is set to *Meek method*:
* When immediate election is enabled (default), a candidate meeting the quota interrupts a surplus distribution. The candidate is immediately declared elected, before the distribution of all surpluses of all now-elected candidates continues. This is the method specified in the 2006 Meek rules.
* When immediate election is disabled, all current surpluses are distributed and keep values finalised, before any candidates exceeding the quota are then declared elected. This is the method specified in the 1987 Meek rules.
### Minimum threshold (--min-threshold)
2021-08-23 06:26:39 +02:00
When candidates are first to be excluded, all candidates with votes less than or equal to this threshold are excluded at once. The default value is 0, i.e. all candidates with no votes are excluded at once.
2021-06-13 08:32:21 +02:00
## Rounding
### Round quota/votes/surplus fractions/ballot values to [n] d.p. (--round-quota, --round-votes, --round-surplus-fractions, --round-values)
2021-06-13 08:32:21 +02:00
When rounding is enabled, the specified values are rounded to the specified number of decimal places. This enables, for example, votes to be counted only in integers, while ballot values and surplus fractions are calculated to higher precision (according to the *Numbers* option).
2021-06-13 08:32:21 +02:00
2021-08-23 06:26:39 +02:00
When enabled, the quota is incremented or rounded up (according to the *Quota* option). When *Surplus method* is set to a Gregory method, votes, surplus fractions and ballot values are always rounded down.
2021-06-13 08:32:21 +02:00
2021-08-23 06:26:39 +02:00
In relation to *Round surplus fractions to [n] d.p.* note that surplus fractions are used in STV in calculations of the form *A* × (*B*/*C*), where (*B*/*C*) is the surplus fraction. The order of operations depends on this setting:
2021-06-13 08:32:21 +02:00
* When this option is disabled (default), (*A* × *B*) is calculated first, then divided by *C*. This minimises rounding errors.
* When this option is enabled, (*B*/*C*) is calculated separately first and rounded to the specified precision, before being multiplied by *A*. Many STV rules designed for hand counting prescribe this method of manipulating surplus fractions.
Surplus fractions are often known as transfer values; however, the term value is reserved in OpenTally for referring to the values of votes.
2021-06-13 08:32:21 +02:00
When *Surplus method* is set to *Meek method*:
* --round-values instead controls the rounding of candidate keep values
* --round-surplus-fractions instead controls the rounding of each intermediate product when computing candidates' votes
* --round-votes controls the rounding of the final number of votes credited to each candidate
2021-08-23 06:26:39 +02:00
* Keep values, intermediate products and candidate votes are rounded *up*
### (Gregory) Round subtransfers (--round-subtransfers)
2021-06-13 08:32:21 +02:00
When *Surplus method* is set to a Gregory method, this option allows you to specify how the numbers of votes credited to candidates in a surplus transfer/exclusion is calculated. In each case, votes are grouped according to the next available preference for a continuing candidate. Subsequently:
2021-06-13 08:32:21 +02:00
* *Single step* (default): The total value of all votes expressing a next available preference for that candidate is multiplied by the surplus fraction. The product (rounded if requested) is credited to that candidate.
* *By value*: The votes expressing a next available preference for that candidate are further divided according to value. For each group of votes at a particular value, the total value of all such votes is multiplied by the surplus fraction. The product (rounded if requested) is credited to that candidate.
* *By value and source*: The votes are further divided according to value, and according to who they were received from by the elected/excluded candidate. Then as per *By value*.
* *By parcel*: For each parcel of votes, the total value of the votes in the parcel expressing a next available preference for that candidate is multiplied by the surplus fraction. The product (rounded if requested) is credited to that candidate.
* *Per ballot*: For each individual vote expressing a next available preference for that candidate, the value of the vote is multiplied by the surplus fraction. The product (rounded if requested) is credited to that candidate.
2021-06-13 08:32:21 +02:00
This option affects the result only as far as rounding (due to use of fixed-precision/floating-point arithmetic, or an explicit rounding option) is concerned.
### (Meek) Surplus tolerance (--meek-surplus-tolerance)
When *Surplus method* is set to *Meek method*, this option allows you to specify when the distribution of surpluses will be considered complete. The tolerance may be specified either as a percentage (ends with a `%`) or absolute number of votes (no `%`):
* Percentage: Surplus distributions will be considered complete when every elected candidate's surplus exceeds the quota by no more than the specified percentage. This is the method specified in the 1987 Meek rules.
2022-03-11 05:44:49 +01:00
* Absolute number of votes: Surplus distributions will be considered complete when the total surpluses of all elected candidates, when summed together, is no greater than the specified number of votes. This is the simpler method specified in the 2006 Meek rules.