Appendix 2

Using the 4 weighted voting index routines:

The Scilab routines for the 4 weighted voting procedures are provided in Appendix 1 and links to the .txt versions are provide below here also.

1)    Banzhaf index calculator
2)    Shapley-Shubik index calculator
3)    Randomized Shapley-Shubik index calculator
4)    Johnston index calculator

Simply copy and paste the routines into the Scilab console (standalone or desktop version) or Scilab input dialog box (Sclab in the cloud) after entering the appropriate input (voting weights and quota).
Use the color-coded displayed routines as guides only but copy and paste from the .txt versions.
Comments are shown in red, Scilab code in blue and input fields in green.

The user may change necessary inputs, before copying and pasting. These inputs, include the voting weights and the quota which may be entered as appropriate in the green fields before pasting. Alternatively the input fields could be edited after pasting, in the appropriate dialog box using the cursor. In the case of the randomized Shapley-Shubik index calculator, one other input field, shown also in green, is the size of the sample taken from the n! population of all sequential coalitions.

Note: We recommend using the .txt versions, and not the colorized versions for input. Either download the .txt version of the routine you wish to use or copy and paste from it and not the colorized versions which are primarily for guidance and illustrative purposes.

No comments:

Post a Comment