Use --round-subtransfers per_ballot and --round-values 4 for Minneapolis STV
This commit is contained in:
parent
1a1153b666
commit
b317affd08
|
@ -251,7 +251,7 @@ function changePreset() {
|
|||
document.getElementById('chkRoundSFs').checked = true;
|
||||
document.getElementById('txtRoundSFs').value = '4';
|
||||
document.getElementById('chkRoundValues').checked = false;
|
||||
document.getElementById('selSumTransfers').value = 'single_step';
|
||||
document.getElementById('selSumTransfers').value = 'per_ballot';
|
||||
document.getElementById('selSurplus').value = 'by_size';
|
||||
document.getElementById('selMethod').value = 'wig';
|
||||
document.getElementById('selPapers').value = 'both';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* OpenTally: Open-source election vote counting
|
||||
* Copyright © 2021 Lee Yingtong Li (RunasSudo)
|
||||
* Copyright © 2021–2022 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
|
||||
|
@ -24,7 +24,9 @@ use opentally::stv;
|
|||
fn minneapolis_boe09_rational() {
|
||||
let stv_opts = stv::STVOptionsBuilder::default()
|
||||
.round_surplus_fractions(Some(4))
|
||||
.round_values(Some(4))
|
||||
.round_quota(Some(0))
|
||||
.round_subtransfers(stv::RoundSubtransfersMode::PerBallot)
|
||||
.quota_criterion(stv::QuotaCriterion::GreaterOrEqual)
|
||||
//.early_bulk_elect(true)
|
||||
.bulk_exclude(true)
|
||||
|
@ -32,7 +34,7 @@ fn minneapolis_boe09_rational() {
|
|||
.immediate_elect(false)
|
||||
.build().unwrap();
|
||||
|
||||
assert_eq!(stv_opts.describe::<Rational>(), "--round-surplus-fractions 4 --round-quota 0 --quota-criterion geq --bulk-exclude --defer-surpluses --no-immediate-elect");
|
||||
assert_eq!(stv_opts.describe::<Rational>(), "--round-surplus-fractions 4 --round-values 4 --round-quota 0 --round-subtransfers per_ballot --quota-criterion geq --bulk-exclude --defer-surpluses --no-immediate-elect");
|
||||
|
||||
utils::read_validate_election::<Rational>("tests/data/Mppls-2009-BOE-full.csv", "tests/data/Mppls-2009-BOE-full.blt", stv_opts, Some(4), &[]);
|
||||
}
|
||||
|
@ -41,7 +43,9 @@ fn minneapolis_boe09_rational() {
|
|||
fn minneapolis_pal13_rational() {
|
||||
let stv_opts = stv::STVOptionsBuilder::default()
|
||||
.round_surplus_fractions(Some(4))
|
||||
.round_values(Some(4))
|
||||
.round_quota(Some(0))
|
||||
.round_subtransfers(stv::RoundSubtransfersMode::PerBallot)
|
||||
.quota_criterion(stv::QuotaCriterion::GreaterOrEqual)
|
||||
//.early_bulk_elect(true)
|
||||
.bulk_exclude(true)
|
||||
|
@ -49,7 +53,7 @@ fn minneapolis_pal13_rational() {
|
|||
.immediate_elect(false)
|
||||
.build().unwrap();
|
||||
|
||||
assert_eq!(stv_opts.describe::<Rational>(), "--round-surplus-fractions 4 --round-quota 0 --quota-criterion geq --bulk-exclude --defer-surpluses --no-immediate-elect");
|
||||
assert_eq!(stv_opts.describe::<Rational>(), "--round-surplus-fractions 4 --round-values 4 --round-quota 0 --round-subtransfers per_ballot --quota-criterion geq --bulk-exclude --defer-surpluses --no-immediate-elect");
|
||||
|
||||
utils::read_validate_election::<Rational>("tests/data/2013-Park-At-Large-CVR.csv", "tests/data/2013-Park-At-Large-CVR.blt", stv_opts, Some(4), &[]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue