Add CSM15 test case for Wright STV

This commit is contained in:
RunasSudo 2021-06-22 16:28:38 +10:00
parent d46eb69f26
commit dda62bb4a9
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
5 changed files with 10633 additions and 2 deletions

48
tests/csm.rs Normal file
View File

@ -0,0 +1,48 @@
/* OpenTally: Open-source election vote counting
* Copyright © 2021 Lee Yingtong Li (RunasSudo)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
mod utils;
use opentally::numbers::NativeFloat64;
use opentally::stv;
#[test]
fn csm15_float64() {
let stv_opts = stv::STVOptions {
round_tvs: None,
round_weights: None,
round_votes: None,
round_quota: Some(0),
sum_surplus_transfers: stv::SumSurplusTransfersMode::SingleStep,
meek_surplus_tolerance: String::new(),
normalise_ballots: false,
quota: stv::QuotaType::Droop,
quota_criterion: stv::QuotaCriterion::GreaterOrEqual,
quota_mode: stv::QuotaMode::Static,
ties: vec![],
surplus: stv::SurplusMethod::WIG,
surplus_order: stv::SurplusOrder::BySize,
transferable_only: false,
exclusion: stv::ExclusionMethod::Wright,
meek_nz_exclusion: false,
bulk_exclude: true,
defer_surpluses: false,
meek_immediate_elect: false,
pp_decimals: 2,
};
utils::read_validate_election::<NativeFloat64>("tests/data/CSM15.csv", "tests/data/CSM15.blt", stv_opts, Some(6), &["quota"]);
}

10536
tests/data/CSM15.blt Normal file

File diff suppressed because it is too large Load Diff

43
tests/data/CSM15.csv Normal file
View File

@ -0,0 +1,43 @@
Stage:,1,,3,,4,,6,,7,,9,,10,,12,,13,,15,,16,,18,,19,,21,,22,,24,,25,,27,,28,,30,,31,,33,,34,,36,,37,,39,,40,,42,,43,,45,,46,,48,,49,,51,,52,,54,,55,,58,,59,,62,,63,,67,,68,,72,,73,,77,,78,,82,,83,,87,,88,,92,,93,,97,,98,,102,,103,,109,,110,,118,,119,
Comment:,First preferences,,,,Exclusion of Leehams DaWildabeast,,,,Exclusion of Storm Delay,,,,Exclusion of Kalen Tsero,,,,Exclusion of Rheaha Preynar,,,,Exclusion of Dhuras,,,,Exclusion of boernl,,,,Exclusion of Styxx,,,,Exclusion of Murray Rothbardo,,,,Exclusion of Xenuria,,,,Exclusion of Prospektor Schipplock,,,,Exclusion of Komi Valentine,,,,Exclusion of UAxDEATH,,,,Exclusion of Pandora Singularity,,,,Exclusion of PJHustle,,,,Exclusion of Ironwulf,,,,Exclusion of January Valentine,,,,Exclusion of Darius Caliente,,,,Exclusion of Alexis Finch,,,,Exclusion of The Oz,,,,Exclusion of Steadyo,,,,Exclusion of Insidious Sainthood,,,,Exclusion of Meredith en Thielles,,,,Exclusion of Stitch Kaneland,,,,Exclusion of DutchGunner,,,,Exclusion of Jurius Doctor,,,,Exclusion of BlazingBunny,,,,Exclusion of ExookiZ,,,,Exclusion of Juvenius Drakonius,,,,Exclusion of Ikarus Cesaille,,,,Exclusion of Loroseco Kross,
Vily,2789,H,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,,,EL,,
BlazingBunny,1042,H,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,1448.527563,H,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX
Loroseco Kross,938,H,,H,,,,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,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX
DutchGunner,690,H,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,1056.847624,H,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX,0,EX
Innominate,493,H,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,H,,,,EL,,,,EL,,
Quota,3284,,,,3284,,,,3283,,,,3283,,,,3281,,,,3279,,,,3277,,,,3277,,,,3275,,,,3274,,,,3273,,,,3270,,,,3260,,,,3254,,,,3245,,,,3238,,,,3229,,,,3221,,,,3214,,,,3203,,,,3201,,,,3190,,,,3178,,,,3168,,,,3149,,,,3122,,,,3115,,,,3097,,,,2990,,,,2944,,,,,
1 Stage: 1 3 4 6 7 9 10 12 13 15 16 18 19 21 22 24 25 27 28 30 31 33 34 36 37 39 40 42 43 45 46 48 49 51 52 54 55 58 59 62 63 67 68 72 73 77 78 82 83 87 88 92 93 97 98 102 103 109 110 118 119
2 Comment: First preferences Exclusion of Leehams DaWildabeast Exclusion of Storm Delay Exclusion of Kalen Tsero Exclusion of Rheaha Preynar Exclusion of Dhuras Exclusion of boernl Exclusion of Styxx Exclusion of Murray Rothbardo Exclusion of Xenuria Exclusion of Prospektor Schipplock Exclusion of Komi Valentine Exclusion of UAxDEATH Exclusion of Pandora Singularity Exclusion of PJHustle Exclusion of Ironwulf Exclusion of January Valentine Exclusion of Darius Caliente Exclusion of Alexis Finch Exclusion of The Oz Exclusion of Steadyo Exclusion of Insidious Sainthood Exclusion of Meredith en Thielles Exclusion of Stitch Kaneland Exclusion of DutchGunner Exclusion of Jurius Doctor Exclusion of BlazingBunny Exclusion of ExookiZ Exclusion of Juvenius Drakonius Exclusion of Ikarus Cesaille Exclusion of Loroseco Kross
3 Vily 2789 H H H H H H H H H H H H H H H H H H H EL EL EL EL EL EL EL EL EL EL EL EL
4 BlazingBunny 1042 H H H H H H H H H H H H H H H H H H H H H H H H H H 1448.527563 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
5 Loroseco Kross 938 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H 2306.134123 H 0 EX
6 Steadyo 499 H H H H H H H H H H H H H H H H H H H H 693.622387 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
7 Phantomite 1462 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H
8 Kenneth Feld 874 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H EL EL
9 Komi Valentine 277 H H H H H H H H H H H 336.404306 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
10 Murray Rothbardo 184 H H H H H H H H 189.651433 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
11 Dhuras 162 H H H H H 170.123665 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
12 The Oz 407 H H H H H H H H H H H H H H H H H H H 673.241462 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
13 Jurius Doctor 747 H H H H H H H H H H H H H H H H H H H H H H H H H 1254.134642 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
14 UAxDEATH 323 H H H H H H H H H H H H 357.732024 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
15 Xenuria 179 H H H H H H H H H 198.266912 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
16 Darius Caliente 442 H H H H H H H H H H H H H H H H H 620.307162 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
17 Juvenius Drakonius 1375 H H H H H H H H H H H H H H H H H H H H H H H H H H H H 1614.455637 H 0 EX 0 EX 0 EX 0 EX 0 EX
18 Styxx 172 H H H H H H H 184.463008 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
19 January Valentine 414 H H H H H H H H H H H H H H H H 557.154707 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
20 Kalen Tsero 113 H H H 115.888433 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
21 Alexis Finch 526 H H H H H H H H H H H H H H H H H H 630.517365 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
22 Insidious Sainthood 583 H H H H H H H H H H H H H H H H H H H H H 711.112702 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
23 Meredith en Thielles 477 H H H H H H H H H H H H H H H H H H H H H H 773.804223 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
24 Prospektor Schipplock 177 H H H H H H H H H H 213.386936 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
25 PJHustle 443 H H H H H H H H H H H H H H 478.737771 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
26 ExookiZ 961 H H H H H H H H H H H H H H H H H H H H H H H H H H H 1527.088745 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
27 Stitch Kaneland 698 H H H H H H H H H H H H H H H H H H H H H H H 944.597498 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
28 Merkelchen 5325 EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL
29 Leehams DaWildabeast 60 H 63.208412 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
30 Ikarus Cesaille 1471 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H 1938.970656 H 0 EX 0 EX 0 EX
31 Ironwulf 472 H H H H H H H H H H H H H H H 528.845712 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
32 Maria Taylor 2556 H H H H H H H H H H H H H H H H H H H H H EL EL EL EL EL EL EL EL EL EL
33 boernl 171 H H H H H H 181.377165 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
34 Brisc Rubal 1794 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H EL
35 Gobbins 3709 EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL EL
36 Torvald Uruz 1297 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H
37 Storm Delay 96 H H 112.229279 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
38 Pandora Singularity 355 H H H H H H H H H H H H H 413.808353 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
39 Mike Azariah 1242 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H EL
40 Rheaha Preynar 125 H H H H 133.122193 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
41 DutchGunner 690 H H H H H H H H H H H H H H H H H H H H H H H H 1056.847624 H 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX 0 EX
42 Innominate 493 H H H H H H H H H H H H H H H H H H H H H H H H H H H H H EL EL
43 Quota 3284 3284 3283 3283 3281 3279 3277 3277 3275 3274 3273 3270 3260 3254 3245 3238 3229 3221 3214 3203 3201 3190 3178 3168 3149 3122 3115 3097 2990 2944

BIN
tests/data/CSM15.ods Normal file

Binary file not shown.

View File

@ -115,8 +115,10 @@ where
// Validate candidate votes // Validate candidate votes
for (candidate, votes) in state.election.candidates.iter().zip(candidate_votes) { for (candidate, votes) in state.election.candidates.iter().zip(candidate_votes) {
let count_card = state.candidates.get(candidate).unwrap(); let count_card = state.candidates.get(candidate).unwrap();
let votes = votes.unwrap(); if votes.is_some() {
approx_eq(&count_card.votes, &votes, cmp_dps, idx, &format!("votes for candidate {}", candidate.name)); let votes = votes.unwrap();
approx_eq(&count_card.votes, &votes, cmp_dps, idx, &format!("votes for candidate {}", candidate.name));
}
} }
// Validate candidate states // Validate candidate states
@ -126,6 +128,8 @@ where
for (candidate, candidate_state) in state.election.candidates.iter().zip(candidate_states) { for (candidate, candidate_state) in state.election.candidates.iter().zip(candidate_states) {
let count_card = state.candidates.get(candidate).unwrap(); let count_card = state.candidates.get(candidate).unwrap();
if candidate_state == "" { if candidate_state == "" {
}
else if candidate_state == "H" {
assert!(count_card.state == CandidateState::Hopeful); assert!(count_card.state == CandidateState::Hopeful);
} else if candidate_state == "EL" || candidate_state == "PEL" { } else if candidate_state == "EL" || candidate_state == "PEL" {
assert!(count_card.state == CandidateState::Elected); assert!(count_card.state == CandidateState::Elected);