| stopOnInvalidCoalitionS {CoopGame} | R Documentation |
Parameter Function stopOnInvalidCoalitionS
Description
stopOnInvalidCoalitionS checks if coalition S as subset of grand coalition N is specified correctly and causes calculation to stop otherwise.
Usage
stopOnInvalidCoalitionS(paramCheckResult, S, N = NULL, 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. |
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 Code Ranges
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 |
Author(s)
Jochen Staudacher jochen.staudacher@hs-kempten.de
Johannes Anwander anwander.johannes@gmail.com
See Also
Other ParameterChecks_CoopGame:
getEmptyParamCheckResult(),
stopOnInconsistentEstateAndClaimsVector(),
stopOnInvalidAllocation(),
stopOnInvalidBoolean(),
stopOnInvalidClaimsVector(),
stopOnInvalidDictator(),
stopOnInvalidEstate(),
stopOnInvalidGameVector(),
stopOnInvalidGrandCoalitionN(),
stopOnInvalidIndex(),
stopOnInvalidLeftRightGloveGame(),
stopOnInvalidNChooseB(),
stopOnInvalidNumberOfPlayers(),
stopOnInvalidNumber(),
stopOnInvalidQuota(),
stopOnInvalidVetoPlayer(),
stopOnInvalidWeightVector(),
stopOnParamCheckError()
Examples
library(CoopGame)
paramCheckResult=getEmptyParamCheckResult()
validCoalition = c(1,2,3)
stopOnInvalidCoalitionS(paramCheckResult, S=validCoalition, N=c(1,2,3,4,5))