Anti-Harassment Tools/SecurePoll Improvements/Test Results/20 6 5000 1329880128
Comments
[edit]Case: All but one seats filled, two hopeful candidates who are not tied on votes.
SecurePoll and OpenSTV agree on final results, and they have the same number of rounds.
Election setup
[edit]- Candidates: 20
- Seats: 6
- Votes: 5000
Actual
[edit]Output from SecurePoll (var_dump( $this->tallier->resultsLog );
): https://phabricator.wikimedia.org/P16855
Actual Tally: SP
[edit]Elected
[edit]Election for 6 seats with 20 candidates. Total 5,000 votes.
- "1"
- "2"
- "3"
- "4"
- "5"
- "16"
Eliminated/Not elected
[edit]- "8"
- "9"
- "10"
- "7"
- "12"
- "13"
- "14"
- "15"
- "6"
- "17"
- "18"
- "19"
- "20"
- "11"
Rounds table
[edit]The following table describes the calculations that happened in order to achieve the result above. In each round of calculation, the candidate(s) who achieved more votes than the quota are declared elected. Their surplus votes above the quota are redistributed to the remaining candidates. If nobody achieves the quota, the lowest ranking candidate is eliminated and their votes are redistributed to the remaining candidates. To understand this better, please refer to this link.
Round Number | Tally | Result |
---|---|---|
1 |
|
Quota: 714.285715 |
2 |
|
Quota: 714.285715
Elected: "1", "2", "3", "4", "5" |
3 |
|
Quota: 612.204083
Transferring votes |
4 |
|
Quota: 539.288632
Transferring votes |
5 |
|
Quota: 487.206167
Eliminated: "8", "9", "10", "7", "12", "13", "14", "15", "6", "17", "18", "19", "20" Transferring votes |
6 |
|
Quota: 450.004406
Transferring votes |
7 |
|
Quota: 423.431719
Transferring votes |
8 |
|
Quota: 404.451229
Transferring votes |
9 |
|
Quota: 390.893736
Elected: "16" Transferring votes |
(Results from 14:28, 31 August 2021)
Navigation menu
[edit]- Admin
- Talk
- Preferences
- Watchlist
- Contributions
- Log out
- Special page
- Main page
- Recent changes
- Random page
- Help about MediaWiki
Tools
[edit]- Special pages
- Printable version
Expected
[edit]Output from OpenSTV:
Loading ballots from file 20_6_5000_1329880128.blt. Ballot file contains 20 candidates and 5000 ballots. No candidates have withdrawn. Ballot file contains 5000 non-empty ballots. Counting votes for ElectionTitle using Meek STV. 20 candidates running for 6 seats. R|1 |2 |3 |4 |5 |6 |-----------+-----------+-----------+-----------+-----------+----------- |7 |8 |9 |10 |11 |12 |-----------+-----------+-----------+-----------+-----------+----------- |13 |14 |15 |16 |17 |18 |-----------+-----------+-----------+-----------+-----------+----------- |19 |20 |Exhausted |Surplus |Threshold ========================================================================== 1| 857.000000| 857.000000| 857.000000| 857.000000| 858.000000| 0.000000 | 0.000000| 0.000000| 0.000000| 0.000000| 314.000000| 0.000000 | 0.000000| 0.000000| 0.000000| 400.000000| 0.000000| 0.000000 | 0.000000| 0.000000| 0.000000| 714.571425| 714.285715 |----------------------------------------------------------------------- | Count of first choices. Candidates 1, 2, 3, 4, and 5 have reached the | threshold and are elected. ========================================================================== 2| 714.286361| 714.286361| 714.286361| 714.286361| 714.285858| 0.000000 | 0.000000| 0.000000| 0.000000| 0.000000| 314.000000| 0.000000 | 0.000000| 0.000000| 0.000000| 400.000000| 0.000000| 0.000000 | 0.000000| 0.000000| 714.568698| 510.408942| 612.204472 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.833473; 2, 0.833473; 3, 0.833473; 4, | 0.833473; and 5, 0.832501. ========================================================================== 3| 612.204806| 612.204806| 612.204806| 612.204806| 612.205308| 0.000000 | 0.000000| 0.000000| 0.000000| 0.000000| 314.000000| 0.000000 | 0.000000| 0.000000| 0.000000| 400.000000| 0.000000| 0.000000 | 0.000000| 0.000000|1224.975468| 364.578437| 539.289219 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.714358; 2, 0.714358; 3, 0.714358; 4, | 0.714358; and 5, 0.713526. ========================================================================== 4| 539.289532| 539.289532| 539.289532| 539.289532| 539.289894| 0.000000 | 0.000000| 0.000000| 0.000000| 0.000000| 314.000000| 0.000000 | 0.000000| 0.000000| 0.000000| 400.000000| 0.000000| 0.000000 | 0.000000| 0.000000|1589.551978| 260.413717| 487.206861 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.629276; 2, 0.629276; 3, 0.629276; 4, | 0.629276; and 5, 0.628543. ========================================================================== 5| 539.289532| 539.289532| 539.289532| 539.289532| 539.289894| | | | | | 314.000000| | | | | 400.000000| | | | |1589.551978| 260.413717| 487.206861 |----------------------------------------------------------------------- | Count after eliminating 6, 7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19, | and 20 and transferring votes. All losing candidates are eliminated. ========================================================================== 6| 487.207071| 487.207071| 487.207071| 487.207071| 487.207578| | | | | | 314.000000| | | | | 400.000000| | | | |1849.964138| 186.010242| 450.005124 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.568503; 2, 0.568503; 3, 0.568503; 4, | 0.568503; and 5, 0.567841. ========================================================================== 7| 450.005558| 450.005558| 450.005558| 450.005558| 450.005556| | | | | | 314.000000| | | | | 400.000000| | | | |2035.972212| 132.865078| 423.432542 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.525094; 2, 0.525094; 3, 0.525094; 4, | 0.525094; and 5, 0.524482. ========================================================================== 8| 423.432559| 423.432559| 423.432559| 423.432559| 423.433296| | | | | | 314.000000| | | | | 400.000000| | | | |2168.836468| 94.903862| 404.451934 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.494087; 2, 0.494087; 3, 0.494087; 4, | 0.494087; and 5, 0.493512. ========================================================================== 9| 404.452580| 404.452580| 404.452580| 404.452580| 404.452620| | | | | | 314.000000| | | | | 400.000000| | | | |2263.737060| 76.894704| 390.894706 |----------------------------------------------------------------------- | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.471940; 2, 0.471940; 3, 0.471940; 4, | 0.471940; and 5, 0.471390. Candidate 16 has reached the threshold and | is elected. Winners are 1, 2, 3, 4, 5, and 16.
Files
[edit]- blt: https://github.com/dominic998/SecurePoll-Test-Data/blob/main/test_data/20_6_5000_1329880128.blt
- php:
array ( 5 => array ( 'count' => 858, 'rank' => array ( 1 => 5, ), ), 16 => array ( 'count' => 400, 'rank' => array ( 1 => 16, ), ), 4 => array ( 'count' => 857, 'rank' => array ( 1 => 4, ), ), 11 => array ( 'count' => 314, 'rank' => array ( 1 => 11, ), ), 3 => array ( 'count' => 857, 'rank' => array ( 1 => 3, ), ), 1 => array ( 'count' => 857, 'rank' => array ( 1 => 1, ), ), 2 => array ( 'count' => 857, 'rank' => array ( 1 => 2, ), ), )
Environment
[edit]- Where you tested: local docker using phpunit
- Version of SecurePoll: commit 271145d5f3cae3b0a1b76d0f5dfeb609615d60b7 (patch 16 from https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/704454/)