From 5f48a88bbe52a931af666182b7fd10369846cbb8 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 23 Jul 2021 20:30:14 +1000 Subject: [PATCH] Validated against 2019 NSW Senate election Disable bulk election for Senate STV Update documentation --- docs/options.md | 37 +++++++++++++++++++------------------ docs/validation.md | 24 ++++++++++++++++++++++++ html/index.js | 2 +- tests/data/prsa1.blt | 2 +- 4 files changed, 45 insertions(+), 20 deletions(-) create mode 100644 docs/validation.md diff --git a/docs/options.md b/docs/options.md index 4959403..779c6bb 100644 --- a/docs/options.md +++ b/docs/options.md @@ -4,24 +4,23 @@ The preset dropdown allows you to choose from a hardcoded list of preloaded STV counting rules. These are: - - - - - - - - - - - - - - - - - -
MethodDescriptionExceptionsValidated against
OpenTally WIGMRecommended set of simple STV rules designed for computer counting, using the weighted inclusive Gregory method and rational arithmetic.
Scottish STVRules from the Scottish Local Government Elections Order 2011, using the weighted inclusive Gregory method.2007 Linn ward local election (eSTV 2.0.16)
Meek STVAdvanced STV rules designed for computer counting, recognised by the Proportional Representation Society of Australia (Victoria–Tasmania) as the superior STV system.
• OpenTally MeekRecommended rules for Meek STV. Operates according to the original 1987 Hill–Wichmann–Woodall ‘Algorithm 123’ specification (The Computer Journal 1987;30(3):277–81), 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.Ballot papers derived from the ERS97 model election (Algorithm 123)
• Meek STV (2006)Operates according to Hill's 2006 revisions (Voting Matters 2006;(22):7–10). This is the algorithm referred to in OpenSTV/OpaVote as ‘Meek STV’, and forms the basis of New Zealand's Meek STV rules.[E1]Ballot papers derived from the ERS97 model election (OpenSTV 1.7)
• Meek STV (New Zealand)Operates according to Schedule 1A of the Local Electoral Regulations 2001.[E1]Ballot papers derived from the ERS97 model election (OpenSTV 1.7, Hill's nzmeek 6.7.7)
Australian Senate STVRules from the Commonwealth Electoral Act 1918, using the unweighted inclusive Gregory method.[E2] [E3]2019 Tasmanian Senate election (AEC EasyCount)
Western Australia STVRules from the Electoral Act 1907 (WA), using the weighted inclusive Gregory method.[E2] [E3]
Australian Capital Territory STVRules from the Electoral Act 1992 (ACT), using the exclusive Gregory method.2020 Kurrajong territory election (eVACS 2016)
Wright STVRules proposed by Anthony van der Craats designed for computer counting, involving reset and re-iteration of the count after each candidate exclusion.EVE Online CSM 15 election (EVE reference implementation)
PRSA 1977Simple rules designed for hand counting, using the exclusive Gregory method, with counting performed in thousandths of a vote.Example 1 of the PRSA's Proportional Representation Manual
ERS97More complex rules designed for hand counting, using the exclusive Gregory method.Ballot papers derived from the ERS97 model election
• ERS76Former rules from the 1976 2nd edition.[E4]
• ERS73Former rules from the 1973 1st edition.[E4]
Church of EnglandRules from the Church of England Single Transferable Vote Rules 2020, similar to ERS73.
+| Method | Description | Exceptions | Validated | +|-|-|-|-| +| OpenTally WIGM | Recommended set of simple STV rules designed for computer counting, using the weighted inclusive Gregory method 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 (Victoria–Tasmania) as the superior STV system. | | | +| • OpenTally Meek | Recommended rules for Meek STV. Operates according to the original 1987 Hill–Wichmann–Woodall ‘Algorithm 123’ specification ([*The Computer Journal* 1987;30(3):277–81](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):7–10](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] | ✓ | +| • 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] | ✓ | +| 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] | ✓ | +| 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. | | ✓ | +| [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. | | ✓ | +| • ERS76 | Former rules from the 1976 2nd edition. | [E4] | | +| • ERS73 | Former rules from the 1973 1st edition. | [E4] | | +| 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: @@ -30,6 +29,8 @@ Exceptions: * [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. * [E4] 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). +For details of validation, see [validation.md](validation.md). + This functionality is not available on the command line. ## Quota-related options diff --git a/docs/validation.md b/docs/validation.md new file mode 100644 index 0000000..494e367 --- /dev/null +++ b/docs/validation.md @@ -0,0 +1,24 @@ +# Validation + +STV-counting software is frequently validated empirically by comparing the results of election counts to those generated by independent implementations. See, for example, [[1–5]](#references). The table describes the empirical validation performed on OpenTally to date. + +| Method | Election | Comparator | Included test case | +|-|-|-|-| +| Scottish STV | [2007 Glasgow council Linn ward election](https://web.archive.org/web/20121004213938/http://www.glasgow.gov.uk/en/YourCouncil/Elections_Voting/Election_Results/ElectionScotland2007/LGWardResults.htm?ward=1&wardname=1%20-%20Linn) | eSTV 2.0.16 | ✓ | +| OpenTally Meek | [Ballot papers derived from the ERS97 model election](https://yingtongli.me/blog/2021/01/04/ers97.html) | [Algorithm 123](https://www.dia.govt.nz/diawebsite.NSF/Files/meekm/%24file/meekm.pdf) | ✓ | +| Meek STV (2006) | Ballot papers derived from the ERS97 model election | [OpenSTV 1.7](https://github.com/Conservatory/openstv) | ✓ | +| Meek STV (New Zealand) | Ballot papers derived from the ERS97 model election | OpenSTV 1.7, [Hill's nzmeek 6.7.7](https://yingtongli.me/blog/2021/07/08/nzmeek.html) | ✓ | +| Australian Senate STV | [2019 Tasmanian Senate election](https://results.aec.gov.au/24310/Website/SenateDownloadsMenu-24310-Csv.htm) | EasyCount | ✓ | +| Australian Senate STV | [2019 NSW Senate election](https://results.aec.gov.au/24310/Website/SenateDownloadsMenu-24310-Csv.htm) | EasyCount | | +| Australian Capital Territory STV | [2020 Kurrajong Legislative Assembly election](https://www.elections.act.gov.au/elections_and_voting/2020_legislative_assembly_election/ballot-paper-preference-data-2020-election) | [eVACS 2020](https://www.elections.act.gov.au/elections_and_voting/electronic_voting_and_counting) | ✓ | +| Wright STV | [EVE Online CSM 15 election](https://www.eveonline.com/news/view/meet-the-new-council) | [ccp-wright-stv](https://github.com/ccpgames/ccp-wright-stv) | ✓ | +| PRSA 1977 | [*Proportional Representation Manual*](https://www.prsa.org.au/publicat.htm#p2) [example 1](https://www.prsa.org.au/utopiatc.pdf) | [Model result](https://www.prsa.org.au/example1.pdf) | ✓ | +| ERS97 | Ballot papers derived from the ERS97 model election | [Model result](https://www.electoral-reform.org.uk/latest-news-and-research/publications/how-to-conduct-an-election-by-the-single-transferable-vote-3rd-edition/#sub-section-24) | ✓ | + +# References + +1. Wichmann BA. Checking two STV programs. *Voting Matters*. 2000 Apr; (11): 6–8. +2. Wichmann BA. Validation of implementation of the Meek algorithm for STV. London: McDougall Trust; 2000 Apr 28. +3. Koopman P, Hubbers E, Pieters W, Poll E, de Vries R. Testing the eSTV program for the Scottish local government elections. Nijmegen (NL): Radboud University; 2007 Mar 30. +4. Conway A, Blom M, Naish L, Teague V. An analysis of New South Wales electronic vote counting. *ACSW '17: Proceedings of the Australasian Computer Science Week multiconference*. New York: Association for Computing Machinery; 2017 Jan. [doi: 10.1145/3014812.3014837](http://doi.org/10.1145/3014812.3014837) +5. Abate P, Dawson J, Goré R, Gray M, Norrish M, Slater A. *Formal methods applied to electronic voting systems*. Canberra: Australian National University; c2003. diff --git a/html/index.js b/html/index.js index fc23064..97d2b43 100644 --- a/html/index.js +++ b/html/index.js @@ -480,7 +480,7 @@ function changePreset() { document.getElementById('selQuota').value = 'droop'; document.getElementById('selQuotaMode').value = 'static'; document.getElementById('chkBulkElection').checked = true; - document.getElementById('chkBulkExclusion').checked = true; + document.getElementById('chkBulkExclusion').checked = false; // Senate "bulk exclusion" does not permit quota to be exceeded document.getElementById('chkDeferSurpluses').checked = false; document.getElementById('selNumbers').value = 'rational'; document.getElementById('txtPPDP').value = '0'; diff --git a/tests/data/prsa1.blt b/tests/data/prsa1.blt index 677f9eb..9299953 100644 --- a/tests/data/prsa1.blt +++ b/tests/data/prsa1.blt @@ -1,5 +1,5 @@ # Comment: Sample ballot papers for Example 1 in the PRSA manual - PRSA 1977 -# Source: https://www.prsa.org.au/type_3fo.xls +# Source: https://www.prsa.org.au/type_3fo.xls; https://www.prsa.org.au/utopiatc.pdf # Contributor: RunasSudo 7 4 1 1 3 0