Description Usage Arguments Error Code Ranges Author(s) See Also Examples
View source: R/ParameterChecks_CoopGame.R
stopOnInvalidAllocation checks if allocation is specified correctly. Validation result gets stored to object paramCheckResult in case an error occured and causes calculation to stop.
1 | stopOnInvalidAllocation(paramCheckResult, x, n = NULL, v = NULL)
|
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 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. |
Jochen Staudacher jochen.staudacher@hs-kempten.de
Johannes Anwander anwander.johannes@gmail.com
Other ParameterChecks_CoopGame:
getEmptyParamCheckResult()
,
stopOnInconsistentEstateAndClaimsVector()
,
stopOnInvalidBoolean()
,
stopOnInvalidClaimsVector()
,
stopOnInvalidCoalitionS()
,
stopOnInvalidDictator()
,
stopOnInvalidEstate()
,
stopOnInvalidGameVector()
,
stopOnInvalidGrandCoalitionN()
,
stopOnInvalidIndex()
,
stopOnInvalidLeftRightGloveGame()
,
stopOnInvalidNChooseB()
,
stopOnInvalidNumberOfPlayers()
,
stopOnInvalidNumber()
,
stopOnInvalidQuota()
,
stopOnInvalidVetoPlayer()
,
stopOnInvalidWeightVector()
,
stopOnParamCheckError()
1 2 3 4 | library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validAllocation=c(1,2,3)
stopOnInvalidAllocation(paramCheckResult,x=validAllocation,n=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.