Skip to content

Instantly share code, notes, and snippets.

@csarven
Last active November 14, 2023 09:08
Show Gist options
  • Save csarven/68b3dbd018789736286ac4a470cfa0b7 to your computer and use it in GitHub Desktop.
Save csarven/68b3dbd018789736286ac4a470cfa0b7 to your computer and use it in GitHub Desktop.
$ ./runElection.py -s 2 -r TextReport MeekSTV example.blt
OpenSTV version 1.7 (http://www.OpenSTV.org/)
Suggested donation for using OpenSTV for an election is $50. Please go to
http://www.OpenSTV.org/donate to donate via PayPal, Google Checkout, or
Amazon Payments.
Certified election reports are also available. Please go to
http://www.openstv.org/certified-reports for more information.
Loading ballots from file example.blt.
Ballot file contains 7 candidates and 7 ballots.
No candidates have withdrawn.
Ballot file contains 7 non-empty ballots.
Counting votes for Solid CG Election using Meek STV.
7 candidates running for 2 seats.
R|Candidate 1 |Candidate 2 |Candidate 3 |Candidate 4 |Candidate 5
|--------------+--------------+--------------+--------------+--------------
|Candidate 6 |Candidate 7 |Exhausted |Surplus |Threshold
=============================================================================
1| 1.000000| 0.000000| 0.000000| 0.000000| 3.000000
| 1.000000| 2.000000| 0.000000| 0.666666| 2.333334
|--------------------------------------------------------------------------
| Count of first choices. Candidate Candidate 5 has reached the threshold
| and is elected.
=============================================================================
2| 1.000000| | | | 3.000000
| 1.000000| 2.000000| 0.000000| 0.666666| 2.333334
|--------------------------------------------------------------------------
| Count after eliminating Candidate 2, Candidate 3, and Candidate 4 and
| transferring votes. All losing candidates are eliminated.
=============================================================================
3| 1.444444| | | | 2.333334
| 1.000000| 2.222222| 0.000000| 0.000000| 2.333334
|--------------------------------------------------------------------------
| Count after transferring surplus votes. Keep factors of candidates who
| have exceeded the threshold: Candidate 5, 0.777778.
=============================================================================
4| 2.444444| | | | 2.333334
| | 2.222222| 0.000000| 0.111110| 2.333334
|--------------------------------------------------------------------------
| Count after eliminating Candidate 6 and transferring votes. All losing
| candidates are eliminated. Candidate Candidate 1 has reached the
| threshold and is elected.
Winners are Candidate 1 and Candidate 5.
7 2
1 7 2 1 3 4 5 6 0
1 6 1 2 3 4 0
1 5 1 3 2 4 7 6 0
1 7 1 2 4 6 3 0
1 5 1 2 4 7 6 3 0
1 5 7 2 1 3 4 6 0
1 1 7 6 5 3 2 0
0
"Candidate 1"
"Candidate 2"
"Candidate 3"
"Candidate 4"
"Candidate 5"
"Candidate 6"
"Candidate 7"
"Solid CG Election"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment