[Rack] [Board Election] Tool for counting condorcet election votes (Schulze Method)

Benny Baumann BenBE1987 at gmx.net
Sat Dec 25 19:43:52 PST 2010


Hi folks,

I felt a bit bored today, so I implemented a Condorcet election program
giving the full ranking of all elected candidates. Find the PHP source
attached to this mail.

Program seems to give reasonable results for the example from wikipedia
AND last years board election.

The input format is the same as with last year's program. Additional
blank lines are accepted and silently skipped. Currently no reprint of
the processed votes is done, but could easily be added.

Regards,
BenBE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elect.php
Type: application/x-php
Size: 7983 bytes
Desc: not available
Url : http://www.noisebridge.net/pipermail/rack/attachments/20101225/d08015e4/attachment.bin 
-------------- next part --------------
Position: Board
Candidates:  miloh rachel  ani zedd andy mark christie jacob jim john jonathan

3      1       -       -       4       -       -       2       -       -       -
-      3       2       4       -       -       -       -       1       -       -
1      1       2       -       1       -       -       2       -       -       2
6      1       5       -       2       -       4       3       7       -       -
6      3       9       -       1       7       8       2       5       -       4
-      2       -       -       1       -       -       -       3       -       4
2      1       -       -       2       2       1       -       1       -       1
2      1       4       5       6       -       7       -       -       -       3
1      1       2       -       1       -       1       1       1       -       1
2      -       3       1       -       -       -       -       -       -       4
2      3       4       -       1       -       -       -       -       -       -
1      1       2       -       1       -       -       1       -       -       2
-      2       -       4       3       -       1       -       -       -       -
3      1       -       2       -       -       -       -       4       -       -
1      1       4       2       1       3       1       4       3       4       2
-      1       -       -       2       -       -       -       3       -       4
3      -       1       -       2       -       -       4       -       -       -
3      1       -       4       -       -       -       -       2       -       -
1      1       1       2       2       1       2       3       2       -       2
-      1       -       -       2       -       -       3       -       -       4
2      3       1       8       3       7       4       5       6       9       2
1      1       2       -       -       -       1       -       1       -       3
4      1       5       8       2       10      6       3       7       9       11
3      1       3       3       1       4       2       2       1       5       2
3      2       10      11      1       9       8       5       4       6       7
2      3       1       4       5       8       9       11      7       10      6
3      1       -       -       2       -       8       5       -       -       4
2      1       -       3       1       2       2       2       1       -       1
1      1       1       -       1       -       -       -       -       -       -
3      1       2       -       4       -       -       -       -       -       -
-      1       1       -       -       -       2       -       -       -       -
1      2       1       3       3       3       -       -       -       -       2
1      1       -       -       1       -       -       -       -       -       -
4      2       3       -       1       7       9       8       6       -       5
6      2       8       10      1       4       7       5       9       11      3

-------------- next part --------------
Position: Test Election
Candidates: A B C D E

1 3 2 5 4
1 3 2 5 4
1 3 2 5 4
1 3 2 5 4
1 3 2 5 4

1 5 4 2 3
1 5 4 2 3
1 5 4 2 3
1 5 4 2 3
1 5 4 2 3

4 1 5 3 2
4 1 5 3 2
4 1 5 3 2
4 1 5 3 2
4 1 5 3 2
4 1 5 3 2
4 1 5 3 2
4 1 5 3 2

2 3 1 5 4
2 3 1 5 4
2 3 1 5 4

2 4 1 5 3
2 4 1 5 3
2 4 1 5 3
2 4 1 5 3
2 4 1 5 3
2 4 1 5 3
2 4 1 5 3

3 2 1 4 5
3 2 1 4 5

5 4 2 1 3
5 4 2 1 3
5 4 2 1 3
5 4 2 1 3
5 4 2 1 3
5 4 2 1 3
5 4 2 1 3

3 2 5 4 1
3 2 5 4 1
3 2 5 4 1
3 2 5 4 1
3 2 5 4 1
3 2 5 4 1
3 2 5 4 1
3 2 5 4 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.noisebridge.net/pipermail/rack/attachments/20101225/d08015e4/attachment.pgp 


More information about the Rack mailing list