Anti-Harassment Tools/SecurePoll Improvements/Test Results/20 4 5120 824772467

Comments
In this case, candidates 19 and 20 are both tied for equal lowest votes.

Our algorithm eliminates them both at the same time, so neither get a seat. In the end, only 3 candidates get enough votes to meet the quota (out of 4 seats).

OpenSTV eliminates one of candidate 19 or 20 at random. Their votes get reallocated to the other candidate, who goes on to get enough votes to meet the quota and get a seat. So, either candidate 19 or candidate 20 gets a seat, depending on who is eliminated first.

Election setup

 * Candidates: 20
 * Seats: 4
 * Votes: 5120

Actual
Output of array(3) { ["elected"]=> array(3) { [0]=>   int(1) [1]=>   int(2) [2]=>   int(3) } ["eliminated"]=> array(17) { [0]=>   int(19) [1]=>   int(20) [2]=>   int(13) [3]=>   int(18) [4]=>   int(17) [5]=>   int(16) [6]=>   int(15) [7]=>   int(14) [8]=>   int(11) [9]=>   int(12) [10]=>   int(10) [11]=>   int(9) [12]=>   int(8) [13]=>   int(7) [14]=>   int(6) [15]=>   int(4) [16]=>   int(5) } ["rounds"]=> array(9) { [0]=>   array(8) { ["round"]=> int(1) ["surplus"]=> int(0) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> int(0) ["earned"]=> int(300) ["total"]=> int(300) }       [2]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(300) ["total"]=> int(300) }       [3]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(258) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(257) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(257) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [7]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [8]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [9]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [10]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [11]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [12]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [13]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [14]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [15]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [16]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [17]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [18]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(256) ["total"]=> int(256) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(200) ["total"]=> int(200) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(200) ["total"]=> int(200) }     }      ["totalVotes"]=> int(5100) ["keepFactors"]=> array(20) { [1]=>       int(1) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(1) [7]=>       int(1) [8]=>       int(1) [9]=>       int(1) [10]=>       int(1) [11]=>       int(1) [12]=>       int(1) [13]=>       int(1) [14]=>       int(1) [15]=>       int(1) [16]=>       int(1) [17]=>       int(1) [18]=>       int(1) [19]=>       int(1) [20]=>       int(1) }     ["quota"]=> int(1021) ["elected"]=> array(0) { }     ["eliminated"]=> array(0) { }   }    [1]=>    array(8) { ["round"]=> int(2) ["elected"]=> array(0) { }     ["eliminated"]=> array(2) { [0]=>       int(19) [1]=>       int(20) }     ["surplus"]=> int(0) ["keepFactors"]=> array(20) { [1]=>       int(1) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(1) [7]=>       int(1) [8]=>       int(1) [9]=>       int(1) [10]=>       int(1) [11]=>       int(1) [12]=>       int(1) [13]=>       int(1) [14]=>       int(1) [15]=>       int(1) [16]=>       int(1) [17]=>       int(1) [18]=>       int(1) [19]=>       int(1) [20]=>       int(1) }     ["quota"]=> int(1021) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> int(300) ["earned"]=> int(0) ["total"]=> int(300) }       [2]=>        array(3) { ["votes"]=> int(300) ["earned"]=> int(0) ["total"]=> int(300) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [7]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [8]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [9]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [10]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [11]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [12]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [13]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [14]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [15]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [16]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [17]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [18]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [19]=>        array(3) { ["votes"]=> int(200) ["earned"]=> int(0) ["total"]=> int(200) }       [20]=>        array(3) { ["votes"]=> int(200) ["earned"]=> int(0) ["total"]=> int(200) }     }      ["totalVotes"]=> int(5100) }   [2]=>    array(8) { ["round"]=> int(3) ["elected"]=> array(0) { }     ["eliminated"]=> array(13) { [0]=>       int(13) [1]=>       int(18) [2]=>       int(17) [3]=>       int(16) [4]=>       int(15) [5]=>       int(14) [6]=>       int(11) [7]=>       int(12) [8]=>       int(10) [9]=>       int(9) [10]=>       int(8) [11]=>       int(7) [12]=>       int(6) }     ["surplus"]=> int(0) ["keepFactors"]=> array(20) { [1]=>       int(1) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(1) [7]=>       int(1) [8]=>       int(1) [9]=>       int(1) [10]=>       int(1) [11]=>       int(1) [12]=>       int(1) [13]=>       int(1) [14]=>       int(1) [15]=>       int(1) [16]=>       int(1) [17]=>       int(1) [18]=>       int(1) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(941) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> int(300) ["earned"]=> int(0) ["total"]=> int(300) }       [2]=>        array(3) { ["votes"]=> int(300) ["earned"]=> int(0) ["total"]=> int(300) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [7]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [8]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [9]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [10]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [11]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [12]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [13]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [14]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [15]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [16]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [17]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [18]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(0) ["total"]=> int(256) }       [19]=>        array(3) { ["votes"]=> int(200) ["earned"]=> int(-200) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(200) ["earned"]=> int(-200) ["total"]=> int(0) }     }      ["totalVotes"]=> int(4700) }   [3]=>    array(8) { ["round"]=> int(4) ["elected"]=> array(2) { [0]=>       int(1) [1]=>       int(2) }     ["eliminated"]=> array(0) { }     ["surplus"]=> int(50) ["keepFactors"]=> array(20) { [1]=>       int(1) [2]=>       int(1) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(0) [7]=>       int(0) [8]=>       int(0) [9]=>       int(0) [10]=>       int(0) [11]=>       int(0) [12]=>       int(0) [13]=>       int(0) [14]=>       int(0) [15]=>       int(0) [16]=>       int(0) [17]=>       int(0) [18]=>       int(0) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(275) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> int(300) ["earned"]=> int(0) ["total"]=> int(300) }       [2]=>        array(3) { ["votes"]=> int(300) ["earned"]=> int(0) ["total"]=> int(300) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [7]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [8]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [9]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [10]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [11]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [12]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [13]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [14]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [15]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [16]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [17]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [18]=>        array(3) { ["votes"]=> int(256) ["earned"]=> int(-256) ["total"]=> int(0) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }     }      ["totalVotes"]=> int(1372) }   [4]=>    array(8) { ["round"]=> int(5) ["elected"]=> array(0) { }     ["eliminated"]=> array(0) { }     ["surplus"]=> float(20) ["keepFactors"]=> array(20) { [1]=>       float(0.91666666666667) [2]=>       float(0.91666666666667) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(0) [7]=>       int(0) [8]=>       int(0) [9]=>       int(0) [10]=>       int(0) [11]=>       int(0) [12]=>       int(0) [13]=>       int(0) [14]=>       int(0) [15]=>       int(0) [16]=>       int(0) [17]=>       int(0) [18]=>       int(0) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(265) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> int(300) ["earned"]=> float(-25) ["total"]=> float(275) }       [2]=>        array(3) { ["votes"]=> int(300) ["earned"]=> float(-25) ["total"]=> float(275) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [7]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [8]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [9]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [10]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [11]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [12]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [13]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [14]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [15]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [16]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [17]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [18]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }     }      ["totalVotes"]=> float(1322) }   [5]=>    array(8) { ["round"]=> int(6) ["elected"]=> array(0) { }     ["eliminated"]=> array(0) { }     ["surplus"]=> float(8) ["keepFactors"]=> array(20) { [1]=>       float(0.88333333333333) [2]=>       float(0.88333333333333) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(0) [7]=>       int(0) [8]=>       int(0) [9]=>       int(0) [10]=>       int(0) [11]=>       int(0) [12]=>       int(0) [13]=>       int(0) [14]=>       int(0) [15]=>       int(0) [16]=>       int(0) [17]=>       int(0) [18]=>       int(0) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(261) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> float(275) ["earned"]=> float(-10) ["total"]=> float(265) }       [2]=>        array(3) { ["votes"]=> float(275) ["earned"]=> float(-10) ["total"]=> float(265) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [7]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [8]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [9]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [10]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [11]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [12]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [13]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [14]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [15]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [16]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [17]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [18]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }     }      ["totalVotes"]=> float(1302) }   [6]=>    array(8) { ["round"]=> int(7) ["elected"]=> array(0) { }     ["eliminated"]=> array(0) { }     ["surplus"]=> float(3.9999999999999) ["keepFactors"]=> array(20) { [1]=>       float(0.87) [2]=>       float(0.87) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(0) [7]=>       int(0) [8]=>       int(0) [9]=>       int(0) [10]=>       int(0) [11]=>       int(0) [12]=>       int(0) [13]=>       int(0) [14]=>       int(0) [15]=>       int(0) [16]=>       int(0) [17]=>       int(0) [18]=>       int(0) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(259) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> float(265) ["earned"]=> float(-4.0000000000001) ["total"]=> float(261) }       [2]=>        array(3) { ["votes"]=> float(265) ["earned"]=> float(-4.0000000000001) ["total"]=> float(261) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [7]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [8]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [9]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [10]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [11]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [12]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [13]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [14]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [15]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [16]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [17]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [18]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }     }      ["totalVotes"]=> float(1294) }   [7]=>    array(8) { ["round"]=> int(8) ["elected"]=> array(0) { }     ["eliminated"]=> array(2) { [0]=>       int(4) [1]=>       int(5) }     ["surplus"]=> float(1.1368683772162E-13) ["keepFactors"]=> array(20) { [1]=>       float(0.86333333333333) [2]=>       float(0.86333333333333) [3]=>       int(1) [4]=>       int(1) [5]=>       int(1) [6]=>       int(0) [7]=>       int(0) [8]=>       int(0) [9]=>       int(0) [10]=>       int(0) [11]=>       int(0) [12]=>       int(0) [13]=>       int(0) [14]=>       int(0) [15]=>       int(0) [16]=>       int(0) [17]=>       int(0) [18]=>       int(0) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(259) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> float(261) ["earned"]=> float(-1.9999999999999) ["total"]=> float(259) }       [2]=>        array(3) { ["votes"]=> float(261) ["earned"]=> float(-1.9999999999999) ["total"]=> float(259) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(0) ["total"]=> int(257) }       [6]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [7]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [8]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [9]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [10]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [11]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [12]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [13]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [14]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [15]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [16]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [17]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [18]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }     }      ["totalVotes"]=> float(1290) }   [8]=>    array(8) { ["round"]=> int(9) ["elected"]=> array(1) { [2]=>       int(3) }     ["eliminated"]=> array(0) { }     ["surplus"]=> float(308) ["keepFactors"]=> array(20) { [1]=>       float(0.86333333333333) [2]=>       float(0.86333333333333) [3]=>       int(1) [4]=>       int(0) [5]=>       int(0) [6]=>       int(0) [7]=>       int(0) [8]=>       int(0) [9]=>       int(0) [10]=>       int(0) [11]=>       int(0) [12]=>       int(0) [13]=>       int(0) [14]=>       int(0) [15]=>       int(0) [16]=>       int(0) [17]=>       int(0) [18]=>       int(0) [19]=>       int(0) [20]=>       int(0) }     ["quota"]=> int(156) ["rankings"]=> array(20) { [1]=>       array(3) { ["votes"]=> float(259) ["earned"]=> float(-5.6843418860808E-14) ["total"]=> float(259) }       [2]=>        array(3) { ["votes"]=> float(259) ["earned"]=> float(-5.6843418860808E-14) ["total"]=> float(259) }       [3]=>        array(3) { ["votes"]=> int(258) ["earned"]=> int(0) ["total"]=> int(258) }       [4]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(-257) ["total"]=> int(0) }       [5]=>        array(3) { ["votes"]=> int(257) ["earned"]=> int(-257) ["total"]=> int(0) }       [6]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [7]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [8]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [9]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [10]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [11]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [12]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [13]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [14]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [15]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [16]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [17]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [18]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [19]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }       [20]=>        array(3) { ["votes"]=> int(0) ["earned"]=> int(0) ["total"]=> int(0) }     }      ["totalVotes"]=> float(776) } } }

Expected
Loading ballots from file 20_4_5120_824772467.blt. Ballot file contains 20 candidates and 5100 ballots. No candidates have withdrawn. Ballot file contains 5100 non-empty ballots.

Counting votes for ElectionTitle using Meek STV. 20 candidates running for 4 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| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000| 256.000000 | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 200.000000| 200.000000|   0.000000|   0.000000|1020.000001  |---  | Count of first choices.

=
============================================================= 2| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000| 256.000000 | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 400.000000|           |   0.000000|   0.000000|1020.000001  |---  | Count after eliminating 20 and transferring votes. All losing | candidates are eliminated. Candidates 19 and 20 were tied when | choosing candidates to eliminate. Candidate 20 was chosen by breaking | the tie randomly.

=
============================================================= 3| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000| 256.000000 | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  |           | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 400.000000|           | 256.000000|   0.000000| 968.800001  |---  | Count after eliminating 13 and transferring votes. All losing | candidates are eliminated. Candidates 6, 7, 8, 9, 10, 11, 12, 13, 14, | 15, 16, 17, and 18 were tied when choosing candidates to eliminate. | Candidate 13 was chosen by breaking the tie randomly.

=
============================================================= 4| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  |           | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 400.000000|           | 512.000000|   0.000000| 917.600001  |---  | Count after eliminating 6 and transferring votes. All losing | candidates are eliminated. Candidates 6, 7, 8, 9, 10, 11, 12, 14, 15, | 16, 17, and 18 were tied when choosing candidates to eliminate. | Candidate 6 was chosen by breaking the tie randomly.

=
============================================================= 5| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000| 256.000000|           | 256.000000  |           | 256.000000| 256.000000| 256.000000| 256.000000| 256.000000  | 400.000000|           | 768.000000|   0.000000| 866.400001  |---  | Count after eliminating 11 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 10, 11, 12, 14, 15, 16, | 17, and 18 were tied when choosing candidates to eliminate. Candidate | 11 was chosen by breaking the tie randomly.

=
============================================================= 6| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000| 256.000000|           | 256.000000  |           | 256.000000| 256.000000|           | 256.000000| 256.000000  | 400.000000|           |1024.000000|   0.000000| 815.200001  |---  | Count after eliminating 16 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 10, 12, 14, 15, 16, 17, | and 18 were tied when choosing candidates to eliminate. Candidate 16 | was chosen by breaking the tie randomly.

=
============================================================= 7| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000| 256.000000|           | 256.000000  |           |           | 256.000000|           | 256.000000| 256.000000  | 400.000000|           |1280.000000|   0.000000| 764.000001  |---  | Count after eliminating 14 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 10, 12, 14, 15, 17, and | 18 were tied when choosing candidates to eliminate. Candidate 14 was | chosen by breaking the tie randomly.

=
============================================================= 8| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000| 256.000000|           |             |           |           | 256.000000|           | 256.000000| 256.000000  | 400.000000|           |1536.000000|   0.000000| 712.800001  |---  | Count after eliminating 12 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 10, 12, 15, 17, and 18 | were tied when choosing candidates to eliminate. Candidate 12 was | chosen by breaking the tie randomly.

=
============================================================= 9| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000| 256.000000|           |             |           |           | 256.000000|           |           | 256.000000  | 400.000000|           |1792.000000|   0.000000| 661.600001  |---  | Count after eliminating 17 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 10, 15, 17, and 18 were | tied when choosing candidates to eliminate. Candidate 17 was chosen by | breaking the tie randomly.

=
============================================================= 10| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            | 256.000000| 256.000000| 256.000000|           |           |             |           |           | 256.000000|           |           | 256.000000  | 400.000000|           |2048.000000|   0.000000| 610.400001  |---  | Count after eliminating 10 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 10, 15, and 18 were | tied when choosing candidates to eliminate. Candidate 10 was chosen by | breaking the tie randomly.

=
============================================================= 11| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           | 256.000000| 256.000000|           |           |             |           |           | 256.000000|           |           | 256.000000  | 400.000000|           |2304.000000|   0.000000| 559.200001  |---  | Count after eliminating 7 and transferring votes. All losing | candidates are eliminated. Candidates 7, 8, 9, 15, and 18 were tied | when choosing candidates to eliminate. Candidate 7 was chosen by | breaking the tie randomly.

=
============================================================= 12| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           | 256.000000| 256.000000|           |           |             |           |           | 256.000000|           |           |             | 400.000000|           |2560.000000|   0.000000| 508.000001  |---  | Count after eliminating 18 and transferring votes. All losing | candidates are eliminated. Candidates 8, 9, 15, and 18 were tied when | choosing candidates to eliminate. Candidate 18 was chosen by breaking | the tie randomly.

=
============================================================= 13| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           | 256.000000|           |           |             |           |           | 256.000000|           |           |             | 400.000000|           |2816.000000|   0.000000| 456.800001  |---  | Count after eliminating 8 and transferring votes. All losing | candidates are eliminated. Candidates 8, 9, and 15 were tied when | choosing candidates to eliminate. Candidate 8 was chosen by breaking | the tie randomly.

=
============================================================= 14| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           | 256.000000|           |           |             | 400.000000|           |3072.000000|   0.000000| 405.600001  |---  | Count after eliminating 9 and transferring votes. All losing | candidates are eliminated. Candidates 9 and 15 were tied when choosing | candidates to eliminate. Candidate 9 was chosen by breaking the tie | randomly.

=
============================================================= 15| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 400.000000|           |3328.000000|  45.599999| 354.400001  |---  | Count after eliminating 15 and transferring votes. All losing | candidates are eliminated. Candidate 19 has reached the threshold and | is elected.

=
============================================================= 16| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 354.400400|           |3373.599600|   9.120319| 345.280081  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.886001.

=
============================================================= 17| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 345.280400|           |3382.719600|   1.824319| 343.456081  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.863201.

=
============================================================= 18| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.456400|           |3384.543600|   0.365119| 343.091281  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.858641.

=
============================================================= 19| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.091600|           |3384.908400|   0.073279| 343.018321  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.857729.

=
============================================================= 20| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.018400|           |3384.981600|   0.014719| 343.003681  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.857546.

=
============================================================= 21| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.004000|           |3384.996000|   0.003199| 343.000801  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.857510.

=
============================================================= 22| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.001200|           |3384.998800|   0.000959| 343.000241  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.857503.

=
============================================================= 23| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.000400|           |3384.999600|   0.000319| 343.000081  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.857501.

=
============================================================= 24| 300.000000| 300.000000| 258.000000| 257.000000| 257.000000|            |           |           |           |           |           |             |           |           |           |           |           |             | 343.000400|           |3384.999600|   0.000319| 343.000081  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 19, 0.857501.

=
============================================================= 25| 300.000000| 300.000000| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 343.000400|           |3641.999600|  68.200157| 291.600081  |---  | Count after eliminating 4 and transferring votes. Candidates tied | within precision of computations. Candidates 4 and 5 were tied when | choosing candidates to eliminate. Candidate 4 was chosen by breaking | the tie randomly. Candidates 1 and 2 have reached the threshold and | are elected.

=
============================================================= 26| 291.600300| 291.600300| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 291.600400|           |3710.199000|  40.920397| 277.960201  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.972001; 2, 0.972001; and 19, | 0.729001.

=
============================================================= 27| 277.960500| 277.960500| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 277.960400|           |3751.118600|  24.552557| 269.776281  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.926535; 2, 0.926535; and 19, | 0.694901.

=
============================================================= 28| 269.776500| 269.776500| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 269.776400|           |3775.670600|  14.731757| 264.865881  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.899255; 2, 0.899255; and 19, | 0.674441.

=
============================================================= 29| 264.866100| 264.866100| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 264.866000|           |3790.401800|   8.839277| 261.919641  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.882887; 2, 0.882887; and 19, | 0.662165.

=
============================================================= 30| 261.919800| 261.919800| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 261.920000|           |3799.240400|   5.303837| 260.151921  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.873066; 2, 0.873066; and 19, | 0.654800.

=
============================================================= 31| 260.152200| 260.152200| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 260.152000|           |3804.543600|   3.182557| 259.091281  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.867174; 2, 0.867174; and 19, | 0.650380.

=
============================================================= 32| 259.091400| 259.091400| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 259.091600|           |3807.725600|   1.909757| 258.454881  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.863638; 2, 0.863638; and 19, | 0.647729.

=
============================================================= 33| 258.455100| 258.455100| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 258.455200|           |3809.634600|   1.146157| 258.073081  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.861517; 2, 0.861517; and 19, | 0.646138.

=
============================================================= 34| 258.073200| 258.073200| 258.000000|          | 257.000000|             |           |           |           |           |           |             |           |           |           |           |           |             | 258.073200|           |3810.780400|   0.843916| 257.843921  |---  | Count after transferring surplus votes. Keep factors of candidates who | have exceeded the threshold: 1, 0.860244; 2, 0.860244; and 19, | 0.645183. Candidate 3 has reached the threshold and is elected.

Winners are 1, 2, 3, and 19.

Files
array ( 7 =>   array ( 'count' => 256, 'rank' => array (     1 => 7,    ), ), 9 =>   array ( 'count' => 256, 'rank' => array (     1 => 9,    ), ), 3 =>   array ( 'count' => 258, 'rank' => array (     1 => 3,    ), ), 13 =>   array ( 'count' => 256, 'rank' => array (     1 => 13,    ), ), 8 =>   array ( 'count' => 256, 'rank' => array (     1 => 8,    ), ), '19_20' =>   array ( 'count' => 200, 'rank' => array (     1 => 19,      2 => 20,    ), ), 16 =>   array ( 'count' => 256, 'rank' => array (     1 => 16,    ), ), '20_19' =>   array ( 'count' => 200, 'rank' => array (     1 => 20,      2 => 19,    ), ), 14 =>   array ( 'count' => 256, 'rank' => array (     1 => 14,    ), ), 6 =>   array ( 'count' => 256, 'rank' => array (     1 => 6,    ), ), 17 =>   array ( 'count' => 256, 'rank' => array (     1 => 17,    ), ), 11 =>   array ( 'count' => 256, 'rank' => array (     1 => 11,    ), ), 12 =>   array ( 'count' => 256, 'rank' => array (     1 => 12,    ), ), 4 =>   array ( 'count' => 257, 'rank' => array (     1 => 4,    ), ), 15 =>   array ( 'count' => 256, 'rank' => array (     1 => 15,    ), ), 18 =>   array ( 'count' => 256, 'rank' => array (     1 => 18,    ), ), 10 =>   array ( 'count' => 256, 'rank' => array (     1 => 10,    ), ), 1 =>   array ( 'count' => 300, 'rank' => array (     1 => 1,    ), ), 2 =>   array ( 'count' => 300, 'rank' => array (     1 => 2,    ), ), 5 =>   array ( 'count' => 257, 'rank' => array (     1 => 5,    ), ), )
 * blt: https://github.com/dominic998/SecurePoll-Test-Data/blob/main/test_data/20_4_5120_824772467.blt
 * php:

Environment
local docker using phpunit

version: SecurePoll commit 2ec357fdb086cece986d60d1b34759968c075c65 (patchset 15 from https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecurePoll/+/704454)