stopOnInvalidAllocation {CoopGame} | R Documentation |
Parameter Function stopOnInvalidAllocation
Description
stopOnInvalidAllocation checks if allocation is specified correctly. Validation result gets stored to object paramCheckResult in case an error occured and causes calculation to stop.
Usage
stopOnInvalidAllocation(paramCheckResult, x, n = NULL, v = NULL)
Arguments
paramCheckResult |
list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message. |
x |
numeric vector containing allocations for each player |
n |
represents the number of players |
v |
Numeric vector of length 2^n - 1 representing the values of the coalitions of a TU game with n players |
Error Code Ranges
Error codes and messages shown to user if error on parameter check occurs
Error Code | Message |
1100 | Allocation 'x' is NULL |
1101 | Allocation 'x' is not of type numeric. |
1102 | Allocation 'x' has wrong number of elements as compared to number of players. |
1103 | Allocation is inconsistent with game vector. |
Author(s)
Jochen Staudacher jochen.staudacher@hs-kempten.de
Johannes Anwander anwander.johannes@gmail.com
See Also
Other ParameterChecks_CoopGame:
getEmptyParamCheckResult()
,
stopOnInconsistentEstateAndClaimsVector()
,
stopOnInvalidBoolean()
,
stopOnInvalidClaimsVector()
,
stopOnInvalidCoalitionS()
,
stopOnInvalidDictator()
,
stopOnInvalidEstate()
,
stopOnInvalidGameVector()
,
stopOnInvalidGrandCoalitionN()
,
stopOnInvalidIndex()
,
stopOnInvalidLeftRightGloveGame()
,
stopOnInvalidNChooseB()
,
stopOnInvalidNumberOfPlayers()
,
stopOnInvalidNumber()
,
stopOnInvalidQuota()
,
stopOnInvalidVetoPlayer()
,
stopOnInvalidWeightVector()
,
stopOnParamCheckError()
Examples
library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validAllocation=c(1,2,3)
stopOnInvalidAllocation(paramCheckResult,x=validAllocation,n=3)