Voter simulation script vosim-alex
Michael Allan
mike at zelea.com
Mon Mar 30 10:04:49 EDT 2009
I scripted an improved batch simulator for voters:
http://zelea.com/system/host/t/home/voff/bin/vosim-alex
To build up the delegate structure, you run it in stages:
vosim-alex a-c
vosim-alex a-c 1-2
vosim-alex a-c 1-2 p-q
vosim-alex a-c 1-2 p-q 1-3
If the output looks sane, you pipe it to bash:
vosim-alex a-c | bash
vosim-alex a-c 1-2 | bash
vosim-alex a-c 1-2 p-q | bash
vosim-alex a-c 1-2 p-q 1-3 | bash
Then run vox-list and vox-count. Here are the results.
http://t.zelea.com:8080/voff/w/Count/?s=test-trinity-spadina-mp
Totals are 57 voter registrations, and 54 votes cast - with 18 flowing
to each of the leading candidates (a,b,c).
3
+ 3 * 2
+ 3 * 2 * 2
+ 3 * 2 * 2 * 3
---------------
= 3 + 6 + 12 + 36
Ken wanted roughly 100 voters. This will give 102:
vosim-alex a-c
vosim-alex a-c 1-2
vosim-alex a-c 1-2 p-s
vosim-alex a-c 1-2 p-s 1-3
3
+ 3 * 2
+ 3 * 2 * 4
+ 3 * 2 * 4 * 3
---------------
= 3 + 6 + 24 + 72
(Caveat, it runs slowly. The command shell is loaded for every
separate voter command. In the next release, the shell will accept
the piped output directly, and it will run much faster.)
--
Michael Allan
Toronto, 647-436-4521
http://zelea.com/
More information about the Votorola
mailing list