Description Usage Arguments Error Code Ranges Author(s) See Also Examples
View source: R/ParameterChecks_CoopGame.R
stopOnInvalidCoalitionS checks if coalition S as subset of grand coalition N is specified correctly and causes calculation to stop otherwise.
1 | stopOnInvalidCoalitionS(paramCheckResult, S, N = NULL, n = NULL, v = NULL)
|
paramCheckResult |
list object for check result with list element 'errCode' for the error code and 'errMessage' for the error message. |
S |
numeric vector with coalition of players |
N |
represents the grand coalition. |
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 |
1020 | Coalition vector S is invalid as 'NULL' |
1021 | Coalition vector S is invalid as not numeric |
1022 | Coalition vector S no subset of grand coalition N |
1023 | The number of players in S cannot be greater than the number of players in N |
1024 | Specified coalition is inconsistent with game vector |
Jochen Staudacher jochen.staudacher@hs-kempten.de
Johannes Anwander anwander.johannes@gmail.com
Other ParameterChecks_CoopGame:
getEmptyParamCheckResult()
,
stopOnInconsistentEstateAndClaimsVector()
,
stopOnInvalidAllocation()
,
stopOnInvalidBoolean()
,
stopOnInvalidClaimsVector()
,
stopOnInvalidDictator()
,
stopOnInvalidEstate()
,
stopOnInvalidGameVector()
,
stopOnInvalidGrandCoalitionN()
,
stopOnInvalidIndex()
,
stopOnInvalidLeftRightGloveGame()
,
stopOnInvalidNChooseB()
,
stopOnInvalidNumberOfPlayers()
,
stopOnInvalidNumber()
,
stopOnInvalidQuota()
,
stopOnInvalidVetoPlayer()
,
stopOnInvalidWeightVector()
,
stopOnParamCheckError()
1 2 3 4 | library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validCoalition = c(1,2,3)
stopOnInvalidCoalitionS(paramCheckResult, S=validCoalition, N=c(1,2,3,4,5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.