Jump to content

Anti-Harassment Tools/SecurePoll Improvements/Test Results/7 5 1000/archive

From mediawiki.org

Actual tally: SP Patch 3.0.0 (58bf4c8)

[edit]

Output from SecurePoll tally.php: actual

Output from SecurePoll var_export( $this->tallier->resultsLog );: https://github.com/dominic998/SecurePoll-Test-Data/blob/main/test_data/7_5_1000.blt.php

Elected

[edit]

Election for 5 seats with 7 candidates. Total 1,000 votes.

  1. "B"
  2. "A"
  3. "C"
  4. "G"
  5. This seat could not be filled because no candidates fulfill the criteria. The last eliminated candidates were: "D", "E", "F"

Eliminated/Not elected

[edit]
  • "D"
  • "E"
  • "F"

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. "B": 168
  2. "A": 166
  3. "G": 134
  4. "C": 133
  5. "D": 133
  6. "E": 133
  7. "F": 133
Quota: 166.666668
2
  1. "B": 168
  2. "A": 166
  3. "G": 134
  4. "C": 133
  5. "D": 133
  6. "E": 133
  7. "F": 133
Quota: 166.666668

Elected: "B"

3
  1. "B": 168 - 1.333332 = 166.666668 (keep factor: 0.992063)
  2. "A": 166 + 0.666666 = 166.666666
  3. "G": 134
  4. "C": 133 + 0.666666 = 133.666666
  5. "D": 133
  6. "E": 133
  7. "F": 133
Quota: 166.666668

Eliminated: "D", "E", "F" Transferring votes

4
  1. "G": 134 + 133.000000 = 267
  2. "B": 166.666668 (keep factor: 0.992063)
  3. "A": 166.666666
  4. "C": 133.666666
Quota: 122.333334

Elected: "A", "C", "G" Transferring votes

(Results from 03:39, 1 September 2021)

Patch 25

[edit]

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

array(3) {
  ["elected"]=>
  array(4) {
    [0]=>
    int(2)
    [1]=>
    int(1)
    [2]=>
    int(3)
    [3]=>
    int(7)
  }
  ["eliminated"]=>
  array(3) {
    [0]=>
    int(4)
    [1]=>
    int(5)
    [2]=>
    int(6)
  }
  ["rounds"]=>
  array(4) {
    [0]=>
    array(8) {
      ["round"]=>
      int(1)
      ["surplus"]=>
      int(0)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(166)
          ["total"]=>
          int(166)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(168)
          ["total"]=>
          int(168)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(133)
          ["total"]=>
          int(133)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(133)
          ["total"]=>
          int(133)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(133)
          ["total"]=>
          int(133)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(133)
          ["total"]=>
          int(133)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(0)
          ["earned"]=>
          int(134)
          ["total"]=>
          int(134)
        }
      }
      ["totalVotes"]=>
      int(1000)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        int(1)
        [2]=>
        int(1)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(167)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(0) {
      }
    }
    [1]=>
    array(8) {
      ["round"]=>
      int(2)
      ["elected"]=>
      array(1) {
        [0]=>
        int(2)
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      int(1)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        int(1)
        [2]=>
        int(1)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(167)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(166)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(166)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(168)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(168)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(134)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(134)
        }
      }
      ["totalVotes"]=>
      int(1000)
    }
    [2]=>
    array(8) {
      ["round"]=>
      int(3)
      ["elected"]=>
      array(0) {
      }
      ["eliminated"]=>
      array(3) {
        [0]=>
        int(4)
        [1]=>
        int(5)
        [2]=>
        int(6)
      }
      ["surplus"]=>
      float(0)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        int(1)
        [2]=>
        float(0.99404761904762)
        [3]=>
        int(1)
        [4]=>
        int(1)
        [5]=>
        int(1)
        [6]=>
        int(1)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(167)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          int(166)
          ["earned"]=>
          float(0.5)
          ["total"]=>
          float(166.5)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          int(168)
          ["earned"]=>
          float(-1)
          ["total"]=>
          float(167)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          float(0.5)
          ["total"]=>
          float(133.5)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(133)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(134)
          ["earned"]=>
          int(0)
          ["total"]=>
          int(134)
        }
      }
      ["totalVotes"]=>
      float(1000)
    }
    [3]=>
    array(8) {
      ["round"]=>
      int(4)
      ["elected"]=>
      array(3) {
        [0]=>
        int(1)
        [2]=>
        int(3)
        [3]=>
        int(7)
      }
      ["eliminated"]=>
      array(0) {
      }
      ["surplus"]=>
      float(242)
      ["keepFactors"]=>
      array(7) {
        [1]=>
        int(1)
        [2]=>
        float(0.99404761904762)
        [3]=>
        int(1)
        [4]=>
        int(0)
        [5]=>
        int(0)
        [6]=>
        int(0)
        [7]=>
        int(1)
      }
      ["quota"]=>
      int(123)
      ["rankings"]=>
      array(7) {
        [1]=>
        array(3) {
          ["votes"]=>
          float(166.5)
          ["earned"]=>
          float(-1.7763568394003E-15)
          ["total"]=>
          float(166.5)
        }
        [2]=>
        array(3) {
          ["votes"]=>
          float(167)
          ["earned"]=>
          float(0)
          ["total"]=>
          float(167)
        }
        [3]=>
        array(3) {
          ["votes"]=>
          float(133.5)
          ["earned"]=>
          float(0)
          ["total"]=>
          float(133.5)
        }
        [4]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(-133)
          ["total"]=>
          int(0)
        }
        [5]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(-133)
          ["total"]=>
          int(0)
        }
        [6]=>
        array(3) {
          ["votes"]=>
          int(133)
          ["earned"]=>
          int(-133)
          ["total"]=>
          int(0)
        }
        [7]=>
        array(3) {
          ["votes"]=>
          int(134)
          ["earned"]=>
          int(133)
          ["total"]=>
          int(267)
        }
      }
      ["totalVotes"]=>
      float(734)
    }
  }
}

Actual Tally: Secure Poll Patch25

[edit]

Elected

[edit]
  1. "B"
  2. "A"
  3. "C"
  4. "G"
  5. This seat could not be filled because no candidates fulfill the criteria. The last eliminated candidates were: "D", "E", "F"

Eliminated

[edit]
  • "D"
  • "E"
  • "F"

Rounds table

[edit]
Round Number Tally Result
1
  • "B": 0 + 168 = 168
  • "A": 0 + 166 = 166
  • "G": 0 + 134 = 134
  • "C": 0 + 133 = 133
  • "D": 0 + 133 = 133
  • "E": 0 + 133 = 133
  • "F": 0 + 133 = 133
Quota: 166.66666766667
2
  • "B": 168
  • "A": 166
  • "G": 134
  • "C": 133
  • "D": 133
  • "E": 133
  • "F": 133
Quota: 166.66666766667

Elected: "B"

3
  • "B": 168 - 1.333 = 166.667 (keep factor: 0.992)
  • "A": 166 + 0.667 = 166.667
  • "G": 134
  • "C": 133 + 0.667 = 133.667
  • "D": 133
  • "E": 133
  • "F": 133
Quota: 166.66666766667

Eliminated: "D", "E", "F"

4
  • "G": 134 + 133 = 267
  • "B": 166.66666766667 (keep factor: 0.992)
  • "A": 166.667 - 0 = 166.667
  • "C": 133.66666616667
Quota: 122.33333433333

Elected: "A", "C", "G"

(Results from 01:16, 28 July 2021)