stopOnInvalidAllocation: 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.
# NOT RUN {library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validAllocation=c(1,2,3)
stopOnInvalidAllocation(paramCheckResult,x=validAllocation,n=3)
# }