Description Usage Arguments Value
View source: R/voteByUtilCumu.R
voteByUtilCumu Allocate votes based utility values, cumulation is allowed.
Voters allocate their votes based on their utillity for each of the alternatives being considered. Once removing any
alternatives that are below a voters abstension threshold the utility a voter has for each alternative is calculated.
Then the ratio utilityForAnAlternative/sumOfAllUtilityForAlternatives is calculated for each alternative the voter allocates
their numVotes of votes accoording to those ratios. Rounding to whole votes is acomplished using the
"last integer method" with the function roundPreserveSum
. See ?roundPreserveSum for more details.
This function is usually not called directly but is wrapped by votersVote
.
1 2 3 4 | voteByUtilCumu(
votersUtilsForAltsVoteByUtilCumu,
numVotesPerVoterVoteByUtilCumu
)
|
votersUtilsForAltsVoteByUtilCumu |
numVoters by numAlts matrix of utility values. |
numVotesPerVoterVoteByUtilCumu |
the number of votes each voter is allowed to cast. This function does not allow cumulation of votes. |
outVotesVoteByUtilCumu A 1 x numberOfAlts matrix displaying the number of votes cast for each alternative.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.