Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poll initiator can optionally set a poll-wide minimum share and a number of indivisible budget units #201

Open
mensch72 opened this issue Oct 14, 2022 · 0 comments
Assignees
Labels
angular Probably needs Angular-related skills feature A new feature or enhancement ready to implement Sufficiently detailed to start working on --> place in "Issues" typescript Probably needs Typescript-related skills
Milestone

Comments

@mensch72
Copy link
Collaborator

mensch72 commented Oct 14, 2022

User story: In the draft poll page, if the poll type is "share", the initiator can optionally set a minimum share (a percentage m) and optionally a number of indivisible budget units (an integer k>1). If both m and k are set, require that m is a multiple of 1/k.

Effect: In the final resulting shares, each option will get 0 or at least m (if set), and will get a multiple of 1/k (if set). The shares will be drawn by a random process so that each option's expected share equals their target share that results from the normal tallying process.

Implementation:

  • If m is set: sum up the shares s(x) of all options x with s(x)<m. If the sum still < m, add shares of other options from bottom to top in the final ranking, until the sum S>=m. Let X be the set of those options summed up. Assign s(y) to all y not in X deterministically. Draw x from X with probability s(x)/S. Assign S to x and zero to all other members of X. Call the new shares derived like this s'. Note that each s'=0 or >=m.
  • If k is set: Paint a pie chart with pie sizes s'(x) and options placed in order of descending rank. Pick a random offset o between 0 and 1. For l=1...k, assign the l'th budget unit to the option whose pie piece contains the angle 2 pi (l - o) / k. Note that this preserves expected budget shares and, if m is set, the constraint that final share =0 or >= m (since m is a multiple of 1/k).
@mensch72 mensch72 added feature A new feature or enhancement ready to implement Sufficiently detailed to start working on --> place in "Issues" typescript Probably needs Typescript-related skills angular Probably needs Angular-related skills labels Oct 14, 2022
@mensch72 mensch72 added this to the First Release milestone Oct 14, 2022
@mensch72 mensch72 self-assigned this Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
angular Probably needs Angular-related skills feature A new feature or enhancement ready to implement Sufficiently detailed to start working on --> place in "Issues" typescript Probably needs Typescript-related skills
Projects
None yet
Development

No branches or pull requests

1 participant