Module: compute/socialChoiceMethods/methodOfEqualShares

(require("compute/socialChoiceMethods/methodOfEqualShares"))(votes, socialChoiceOptions) → {types.typesSocialChoice.socialChoiceResults}

This method has rounds. groupCost is 1/seats. Add up scores. Divide groupCost by total to get factor to multiply scores by. For each voter, multiply scores by factor to get cost. Subtract cost from budget. If remaining budget is negative, add that amount to the deficit and set budget to 0. Check deficit to see if there is more groupCost to spend. Use this new groupCost like the old groupCost and do the steps above. Do this 10 times. That should be enough, maybe. If there is any deficit remaining, then subtract it from everybody.
Parameters:
Name Type Description
votes types.typesVotes.votes The object for vote data.
socialChoiceOptions types.typesSocialChoice.socialChoiceOptions options to specify a social choice function.
Source:
Returns:
- the results returned from a social choice function.
Type
types.typesSocialChoice.socialChoiceResults

Members

(static, constant) methodOfEqualSharesMetadata :object

an object: this function and descriptions of its name, input, and output
Type:
  • object
Source: