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

Comments edit

Case: All seats are filled in the first round, no eliminations.

SecurePoll and OpenSTV agree on final results.

SecurePoll takes 2 rounds to get its final results. OpenSTV takes 1.

Election setup edit

  • Candidates: 20
  • Seats: 6
  • Votes: 5000

Actual edit

Output from SecurePoll (var_dump( $this->tallier->resultsLog );):

array(3) {
  ["elected"]=>
  array(6) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
    [3]=>
    int(4)
    [4]=>
    int(5)
    [5]=>
    int(6)
  }
  ["eliminated"]=>
  array(0) {
  }
  ["rounds"]=>
  array(2) {
    [0]=>
    array(8) {
      ["round"]=>
      int(1)
      ["surplus"]=>
      int(0)
      ["rankings"]=>
      array(20) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(715)
          ["total"]=>
          int(715)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(715)
          ["total"]=>
          int(715)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(715)
          ["total"]=>
          int(715)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(715)
          ["total"]=>
          int(715)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(715)
          ["total"]=>
          int(715)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(715)
          ["total"]=>
          int(715)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [8]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [9]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [10]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [11]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [12]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [13]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [14]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [15]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [16]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(51)
          ["total"]=>
          int(51)
        }
        [17]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(50)
          ["total"]=>
          int(50)
        }
        [18]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(50)
          ["total"]=>
          int(50)
        }
        [19]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(50)
          ["total"]=>
          int(50)
        }
        [20]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(50)
          ["total"]=>
          int(50)
        }
      }
      ["totalVotes"]=>
      int(5000)
      ["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(715)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(0) {
      }
    }
    [1]=>
    array(8) {
      ["round"]=>
      int(2)
      ["elected"]=>
      array(6) {
        [0]=>
        int(1)
        [1]=>
        int(2)
        [2]=>
        int(3)
        [3]=>
        int(4)
        [4]=>
        int(5)
        [5]=>
        int(6)
      }
      ["eliminated"]=>
      array(0) {
      }
      ["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(715)
      ["rankings"]=>
      array(20) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(715)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(715)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(715)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(715)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(715)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(715)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(715)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(715)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(715)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(715)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(715)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(715)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [8]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [9]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [10]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [11]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [12]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [13]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [14]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [15]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [16]=>
        array(3) {
          ["votes"]=>
          int(51)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(51)
        }
        [17]=>
        array(3) {
          ["votes"]=>
          int(50)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(50)
        }
        [18]=>
        array(3) {
          ["votes"]=>
          int(50)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(50)
        }
        [19]=>
        array(3) {
          ["votes"]=>
          int(50)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(50)
        }
        [20]=>
        array(3) {
          ["votes"]=>
          int(50)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(50)
        }
      }
      ["totalVotes"]=>
      int(5000)
    }
  }
}

Actual tally: SP edit

Elected edit

Election for 6 seats with 20 candidates. Total 5,000 votes.

  1. "1"
  2. "2"
  3. "3"
  4. "4"
  5. "5"
  6. "6"

Eliminated/Not elected edit

  • "7"
  • "8"
  • "9"
  • "10"
  • "11"
  • "12"
  • "13"
  • "14"
  • "15"
  • "16"
  • "17"
  • "18"
  • "19"
  • "20"

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
  1. "1": 715
  2. "2": 715
  3. "3": 715
  4. "4": 715
  5. "5": 715
  6. "6": 715
  7. "16": 51
  8. "15": 51
  9. "14": 51
  10. "13": 51
  11. "11": 51
  12. "12": 51
  13. "10": 51
  14. "9": 51
  15. "8": 51
  16. "7": 51
  17. "17": 50
  18. "18": 50
  19. "19": 50
  20. "20": 50
Quota: 714.285715
2
  1. "1": 715
  2. "2": 715
  3. "3": 715
  4. "4": 715
  5. "5": 715
  6. "6": 715
  7. "16": 51
  8. "15": 51
  9. "14": 51
  10. "13": 51
  11. "11": 51
  12. "12": 51
  13. "10": 51
  14. "9": 51
  15. "8": 51
  16. "7": 51
  17. "17": 50
  18. "18": 50
  19. "19": 50
  20. "20": 50
Quota: 714.285715

Elected: "1", "2", "3", "4", "5", "6"

(Results from 14:27, 31 August 2021)

Expected edit

Output from OpenSTV:

Loading ballots from file 20_6_5000_899201474.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| 715.000000| 715.000000| 715.000000| 715.000000| 715.000000| 715.000000
  |  51.000000|  51.000000|  51.000000|  51.000000|  51.000000|  51.000000
  |  51.000000|  51.000000|  51.000000|  51.000000|  50.000000|  50.000000
  |  50.000000|  50.000000|   0.000000|   4.285710| 714.285715
  |-----------------------------------------------------------------------
  | Count of first choices. Candidates 1, 2, 3, 4, 5, and 6 have reached
  | the threshold and are elected.

Winners are 1, 2, 3, 4, 5, and 6.

Files edit

array (
  10 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 10,
    ),
  ),
  1 => 
  array (
    'count' => 715,
    'rank' => 
    array (
      1 => 1,
    ),
  ),
  13 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 13,
    ),
  ),
  15 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 15,
    ),
  ),
  6 => 
  array (
    'count' => 715,
    'rank' => 
    array (
      1 => 6,
    ),
  ),
  17 => 
  array (
    'count' => 50,
    'rank' => 
    array (
      1 => 17,
    ),
  ),
  20 => 
  array (
    'count' => 50,
    'rank' => 
    array (
      1 => 20,
    ),
  ),
  14 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 14,
    ),
  ),
  19 => 
  array (
    'count' => 50,
    'rank' => 
    array (
      1 => 19,
    ),
  ),
  16 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 16,
    ),
  ),
  11 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 11,
    ),
  ),
  7 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 7,
    ),
  ),
  5 => 
  array (
    'count' => 715,
    'rank' => 
    array (
      1 => 5,
    ),
  ),
  2 => 
  array (
    'count' => 715,
    'rank' => 
    array (
      1 => 2,
    ),
  ),
  3 => 
  array (
    'count' => 715,
    'rank' => 
    array (
      1 => 3,
    ),
  ),
  9 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 9,
    ),
  ),
  4 => 
  array (
    'count' => 715,
    'rank' => 
    array (
      1 => 4,
    ),
  ),
  12 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 12,
    ),
  ),
  18 => 
  array (
    'count' => 50,
    'rank' => 
    array (
      1 => 18,
    ),
  ),
  8 => 
  array (
    'count' => 51,
    'rank' => 
    array (
      1 => 8,
    ),
  ),
)

Environment edit