Commit Graph

216 Commits

Author SHA1 Message Date
eb3c7d0f53
Fix STVOptions::describe for --min-threshold 2021-08-09 23:27:58 +10:00
9f1476da63
Complete ERS76 implementation and add test case 2021-08-09 19:50:49 +10:00
764ebd98e6
Various tidyups
Use "Droop" as default quota (since same as "Droop (exact)" when quota not rounded)
Rename ers97.blt
Update documentation
2021-08-09 17:58:05 +10:00
46e895ee5a
Correct handling of exhausted votes during random sample surplus distribution 2021-08-09 00:17:14 +10:00
ae0d1d8411
Implement dynamic quotas 2021-08-08 21:41:10 +10:00
ee1008b509
Prepare for dynamic quota: independent flag for completion of surplus transfers/exclusions 2021-08-08 21:35:03 +10:00
dc78692c72
Use new names for STVOptions::describe 2021-08-07 23:27:11 +10:00
b58922c57b
WIP: no immediate election? 2021-08-07 22:34:55 +10:00
f706d7423b
Fix interaction between --exclusion parcels_by_order and --min-threshold when excluding candidates with 0 votes 2021-08-06 01:33:31 +10:00
429191dc81
With --sample-per-ballot, terminate immediately on electing the required number 2021-08-05 20:23:54 +10:00
33594c110e
Implement stratified and by-order sampling 2021-08-05 18:41:39 +10:00
f3e4071886
Refactor tests specification using builder pattern 2021-08-05 01:13:54 +10:00
0800701960
Implement configurable --sample-per-ballot 2021-08-04 13:46:32 +10:00
0efc1e6eab
Complete implementation of Cambridge STV
Implement --min-threshold
Add test
2021-08-03 23:42:59 +10:00
f182ca02bd
Implement Cambridge STV - Cincinnati/Hare methods of surpluses 2021-08-03 18:38:45 +10:00
6da51837a5
Rename --round-tvs to --round-surplus-fractions and --round-weights to --round-values 2021-08-03 16:46:21 +10:00
a2915b034b
Fix bug with attempted bulk exclusion during exclusion of doomed candidates 2021-08-02 00:24:41 +10:00
ea8c452737
Prevent bulk election and bulk exclusion violating constraints 2021-08-02 00:10:17 +10:00
116ff39fa5
Change tiebreaking prompt according to nature of tie 2021-07-31 17:51:09 +10:00
32e89312fa
Show stage progress during tie that occurs in the middle of a stage 2021-07-31 17:42:33 +10:00
83d0a9bb80
Better error messages 2021-07-31 15:24:23 +10:00
bfeec6f839
Give information on BLT syntax errors 2021-07-29 17:34:34 +10:00
3801d30527
Switch to handwritten BLT parser 2021-07-29 03:24:51 +10:00
49feb09bf8
Prefer election by quota/VRE to early bulk election 2021-07-28 00:12:57 +10:00
a5a61731b5
Use Asyncify to process ties in web UI 2021-07-27 23:31:37 +10:00
efbcfd7f6c
Simply BLT grammar specification 2021-07-23 17:07:03 +10:00
cca097f943
Use Pest-based parser for BLT files
Support comments, optional newlines, etc.
2021-07-23 16:45:54 +10:00
3b8ccd097e
Extend early bulk election to multiple vacancies if the leading candidates cannot be overtaken 2021-07-23 01:38:37 +10:00
4690c32607
Fix unnecessary recursion in ERS97 algorithm 2021-07-23 00:42:15 +10:00
65b1d8e42b
Fix "Ex" display in web UI 2021-07-23 00:10:53 +10:00
85eda02d4d
Make stage number link to comment 2021-07-23 00:04:43 +10:00
bea51611b0
Implement Australian Capital Territory STV 2021-07-22 20:31:06 +10:00
3ea1eef7c5
Implement WA STV and update documentation 2021-07-22 00:41:20 +10:00
2ef7bf24f2
Correctly compute vote required for election when using different quotas/quota criteria 2021-07-21 13:43:16 +10:00
b5ee76f159
Further aggressive early bulk election 2021-07-21 10:59:06 +10:00
ed4a86e699
More aggressive early bulk election 2021-07-21 00:46:32 +10:00
f80875b583
Implement --exclusion by_source 2021-07-19 23:15:17 +10:00
7f16090395
Fix crash on attempting segmented exclusion of candidate with no votes 2021-07-19 18:35:23 +10:00
d144ab0cb4
Implement ERS76 rules 2021-07-18 21:14:37 +10:00
0d9196a951
Refactoring 2021-06-29 16:48:02 +10:00
9b73a4adf4
Remove CountStateOrRef 2021-06-29 01:27:10 +10:00
34545ad179
Check for ties when electing candidates with surpluses
Refactor constraint-related code into constraints module
2021-06-28 00:56:28 +10:00
d697871414
Also bulk elect based on guarded candidates 2021-06-27 23:20:35 +10:00
05ec70830f
Fix bug with constraints
Also initialise constraint matrix with total number of seats
2021-06-27 22:36:50 +10:00
ba3db26263
Describe use of constraints in lead-in text 2021-06-27 22:24:25 +10:00
1d4036c19e
Implement constraints in web UI 2021-06-27 22:09:34 +10:00
38eef74e77
Implement constraints (guard-doom method) for CLI 2021-06-27 21:57:24 +10:00
c563654ace
Implement constraint matrix logic and test case 2021-06-27 17:49:28 +10:00
ce8b252453
Implement --no-early-bulk-elect 2021-06-23 00:52:25 +10:00
d46eb69f26
Implement Wright STV 2021-06-22 16:40:37 +10:00
08821c3c18
Validate option combinations 2021-06-22 14:34:26 +10:00
2e034d06c8
Fix error with --meek-nz-exclusion, etc. on CLI 2021-06-22 14:29:33 +10:00
290ddad634
Show updated keep value after exclusion when --meek-nz-exclusion 2021-06-20 01:51:34 +10:00
1b39b8b138
Implement --meek-nz-exclusion for NZ Meek STV 2021-06-20 01:48:25 +10:00
13f1885eb5
Implement features required for 2006 Meek STV
viz. --round-{tvs,votes,weights}, --defer-surpluses, --meek-immediate-elect and --meek-surplus-tolerance
2021-06-19 02:05:27 +10:00
2ea8b4b757
Add tests for Meek STV 2021-06-16 21:51:13 +10:00
151c9e484e
Calculate loss by fraction in Meek STV 2021-06-16 21:51:13 +10:00
ca54b94953
Show keep values for elected candidates in Meek STV 2021-06-16 21:51:12 +10:00
d34057d03a
Round half away from zero when formatting Fixed/GuardedFixed 2021-06-16 21:51:12 +10:00
8829fa5a7b
Update documentation 2021-06-16 21:51:12 +10:00
4ebb6474fd
Implement Meek STV 2021-06-16 18:44:24 +10:00
f395e6f064
Implement guarded fixed-point arithmetic 2021-06-14 22:11:33 +10:00
3bbef933bb
Refactor and add documentation 2021-06-14 20:43:36 +10:00
4845ebe52f
Implement --ties random 2021-06-13 03:15:15 +10:00
266d8e2495
Report when and how ties are broken 2021-06-13 00:56:18 +10:00
daeb706b44
Implement forwards/backwards tie-breaking in web UI 2021-06-13 00:39:49 +10:00
2dc5ed963b
Implement forwards and backwards tie-breaking 2021-06-13 00:15:14 +10:00
5d491687b4
Code fixups 2021-06-12 21:16:53 +10:00
e059a6a3d9
Fixes to count description 2021-06-12 16:03:31 +10:00
a89c949315
Fix description of quota options 2021-06-12 15:46:44 +10:00
a038efc8a4
Initial implementation of prompt-based tie breaking 2021-06-12 02:09:39 +10:00
4c4099ee22
Handle withdrawn candidates 2021-06-12 00:51:31 +10:00
59539d807a
Implement --normalise-ballots
This, with --sum-surplus-transfers, allows us to fully replicate the Scottish STV result
2021-06-11 21:25:58 +10:00
96a3eaec84
Implement --sum-surplus-transfers 2021-06-11 21:25:58 +10:00
9d4cac2e89
Implement Scottish STV test case 2021-06-10 15:47:09 +10:00
537f1f0011
Fix regression with single stage exclusion 2021-06-09 22:34:44 +10:00
7ef5ae99b6
Add ERS97 test case 2021-06-09 20:09:20 +10:00
a714ba6a90
Correctly apportion votes in bulk exclusions 2021-06-09 19:43:11 +10:00
990704a56a
Implement --bulk-exclude and --defer-surpluses in web UI 2021-06-09 12:42:47 +10:00
79f0f55942
Implement --defer-surpluses 2021-06-09 12:16:25 +10:00
08cb03d85a
Implement --bulk-exclude 2021-06-08 22:22:43 +10:00
d50af1161e
Implement --quota-mode ers97 2021-06-07 20:52:18 +10:00
30b68d4992
Fix ceil implementation in NativeFloat64 2021-06-07 20:39:49 +10:00
62eac6d0a6
Always display ballot weights to at least 2 decimal places 2021-06-06 02:35:40 +10:00
673149e184
Code clean up 2021-06-05 15:08:07 +10:00
830362416d
Fix logic error where loss by fraction not updated in multi-stage exclusions 2021-06-04 22:54:26 +10:00
ceba059c53
Implement --numbers fixed 2021-06-04 22:05:48 +10:00
441e266b17
Implement --numbers in web client 2021-06-04 18:59:50 +10:00
b7f18a74ac
Web client: Count election asynchronously in Web Worker 2021-06-04 15:01:53 +10:00
ba8d9bf79c
Describe election count/options in web UI 2021-06-03 21:35:59 +10:00
3bb538e99e
Further work on HTML output 2021-06-03 15:47:19 +10:00
37622eb78d
Basic tabular output in HTML 2021-06-02 22:48:03 +10:00
97a776ff79
Fix bug with --exclusion single_stage 2021-06-02 22:46:03 +10:00
227c38a5fa
Initial quick port of HTML interface 2021-06-02 22:45:55 +10:00
e88d2674d6
Implement --quota, --quota-criterion 2021-06-02 18:07:05 +10:00
f6fba85049
Implement --round-{tvs,weights,quota}
Add test case for PRSA example election
2021-06-01 21:20:38 +10:00
f1a730e885
Update WebAssembly build for recent changes 2021-06-01 19:04:03 +10:00
a4a28f3345
Implement --surplus-order 2021-06-01 18:57:56 +10:00
76d69913c7
Implement --transferable-only 2021-05-31 23:17:21 +10:00
c114d3a4ee
Implement --surplus and --exclusion 2021-05-31 22:25:53 +10:00
2428fcb4ed
Implement rational numbers in WebAssembly using num-bigint 2021-05-30 23:00:28 +10:00
2793088e12
Initial WebAssembly implementation 2021-05-30 18:45:45 +10:00
5189a74010
Fix bug when excluding candidate with 0 votes 2021-05-30 18:27:28 +10:00
a595f2ff6b
Add integration test for 2019 Tasmanian Senate data 2021-05-30 03:50:19 +10:00
4f661722e4
Implement --exclusion by_value 2021-05-30 02:33:21 +10:00
f4fdf64072
Show total vote in report 2021-05-29 23:25:27 +10:00
8a92c17cb3
CLI help: Group related options in categories 2021-05-29 23:25:05 +10:00
77cf60c21f
Allow configuring --round-votes
Fix bug with display of negative Rational's
2021-05-29 17:51:45 +10:00
32234ad13b
Implement NativeFloat numbers 2021-05-29 03:01:07 +10:00
e526493b0e
Implement smart logger
Combine multiple like log entries into one
2021-05-29 02:13:47 +10:00
91190c7e26
Add logs during count 2021-05-29 01:22:46 +10:00
df69ef456f
Show loss by fraction, and implement --sort-votes and --hide-excluded 2021-05-29 00:43:58 +10:00
e6d57685cb
Some refactoring 2021-05-28 22:37:18 +10:00
5731d71b07
Implement version number 2021-05-28 22:37:07 +10:00
637884cdbf
Integrate with clap for CLI argument parsing 2021-05-28 20:54:57 +10:00
efc7588c09
Initial commit 2021-05-28 20:03:55 +10:00