From bc8ed9a7e0ef0154a3dc377c1f1c236608304a77 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Fri, 16 Jul 2021 17:04:20 +1000 Subject: [PATCH] Add ERS73 preset --- docs/options.md | 1 + html/index.html | 1 + html/index.js | 25 +++++++++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/docs/options.md b/docs/options.md index d896c77..30de07f 100644 --- a/docs/options.md +++ b/docs/options.md @@ -14,6 +14,7 @@ The preset dropdown allows you to choose from a hardcoded list of preloaded STV * [*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. Validated against the [EVE Online reference implementation](https://github.com/ccpgames/ccp-wright-stv) for the [CSM 15 election](https://www.eveonline.com/news/view/meet-the-new-council). * [*PRSA 1977*](https://www.prsa.org.au/rule1977.htm): Simple rules designed for hand counting, using the exclusive Gregory method, with counting automatically performed in thousandths of a vote. Validated against [example 1](https://www.prsa.org.au/example1.pdf) of the PRSA's [*Proportional Representation Manual*](https://www.prsa.org.au/publicat.htm#p2). * [*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. Validated against the ERS97 model election. + * *ERS73*: Former rules from the 1973 1st edition. The quota is calculated always to 2 decimal places – for full ERS73 compliance, set *Round quota to 0 d.p.* when the quota is 100 or more. This functionality is not available on the command line. diff --git a/html/index.html b/html/index.html index 8b484e3..5eb1c29 100644 --- a/html/index.html +++ b/html/index.html @@ -44,6 +44,7 @@ + diff --git a/html/index.js b/html/index.js index d36c505..e5e2209 100644 --- a/html/index.js +++ b/html/index.js @@ -548,5 +548,30 @@ function changePreset() { document.getElementById('selPapers').value = 'transferable'; document.getElementById('selExclusion').value = 'by_value'; document.getElementById('selTies').value = 'forwards,random'; + } else if (document.getElementById('selPreset').value === 'ers73') { + document.getElementById('selQuotaCriterion').value = 'geq'; + document.getElementById('selQuota').value = 'droop_exact'; + document.getElementById('selQuotaMode').value = 'static'; + document.getElementById('chkBulkElection').checked = true; + document.getElementById('chkBulkExclusion').checked = true; + document.getElementById('chkDeferSurpluses').checked = true; + document.getElementById('selNumbers').value = 'fixed'; + document.getElementById('txtDP').value = '5'; + document.getElementById('txtPPDP').value = '2'; + document.getElementById('chkNormaliseBallots').checked = false; + document.getElementById('chkRoundQuota').checked = true; + document.getElementById('txtRoundQuota').value = '2'; + document.getElementById('chkRoundVotes').checked = true; + document.getElementById('txtRoundVotes').value = '2'; + document.getElementById('chkRoundTVs').checked = true; + document.getElementById('txtRoundTVs').value = '2'; + document.getElementById('chkRoundWeights').checked = true; + document.getElementById('txtRoundWeights').value = '2'; + document.getElementById('selSumTransfers').value = 'single_step'; + document.getElementById('selSurplus').value = 'by_size'; + document.getElementById('selTransfers').value = 'eg'; + document.getElementById('selPapers').value = 'transferable'; + document.getElementById('selExclusion').value = 'by_value'; + document.getElementById('selTies').value = 'forwards,random'; } }