Anti-Harassment Tools/SecurePoll Improvements/Test Results/20 6 5000 1329880128

Comments
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

 * Candidates: 20
 * Seats: 6
 * Votes: 5000

Actual
Output from SecurePoll : https://phabricator.wikimedia.org/P16855

Elected

 * 1) "1"
 * 2) "2"
 * 3) "3"
 * 4) "4"
 * 5) "5"
 * 6) "16"

Eliminated

 * "8"
 * "9"
 * "10"
 * "7"
 * "12"
 * "13"
 * "14"
 * "15"
 * "6"
 * "17"
 * "18"
 * "19"
 * "20"

Rounds table
(Results from 01:06, 29 July 2021)

Expected
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
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,    ), ), )
 * blt: https://github.com/dominic998/SecurePoll-Test-Data/blob/main/test_data/20_6_5000_1329880128.blt
 * php:

Environment

 * 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/)